1 Info<<
"Reading mechanical properties\n" <<
endl;
3 IOdictionary mechanicalProperties
7 "mechanicalProperties",
10 IOobject::MUST_READ_IF_MODIFIED,
15 const dictionary& rhoDict(mechanicalProperties.subDict(
"rho"));
16 word rhoType(rhoDict.lookup(
"type"));
29 if (rhoType ==
"uniform")
31 scalar rhoValue(
readScalar(rhoDict.lookup(
"value")));
47 else if (rhoType ==
"field")
49 rhoIO.readOpt() = IOobject::MUST_READ;
63 <<
"Valid type entries are uniform or field for rho" 69 const dictionary&
EDict(mechanicalProperties.subDict(
"E"));
72 autoPtr<volScalarField>
EPtr;
101 else if (
EType ==
"field")
103 EHeader.readOpt() = IOobject::MUST_READ;
117 <<
"Valid type entries are uniform or field for E" 134 const dictionary&
nuDict(mechanicalProperties.subDict(
"nu"));
154 else if (
nuType ==
"field")
156 nuIO.readOpt() = IOobject::MUST_READ;
169 <<
"Valid type entries are uniform or field for nu" 175 Info<<
"Normalising E : E/rho\n" <<
endl;
178 Info<<
"Calculating Lame's coefficients\n" <<
endl;
184 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
190 lambda = nu*E/((1.0 +
nu)*(1.0 - nu));
191 threeK = E/(1.0 -
nu);
IOobject EHeader("E", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
autoPtr< volScalarField > EPtr
Info<< "Reading mechanical properties\"<< endl;IOdictionary mechanicalProperties(IOobject("mechanicalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dictionary &rhoDict(mechanicalProperties.subDict("rho"));word rhoType(rhoDict.lookup("type"));autoPtr< volScalarField > rhoPtr
IOobject nuIO("nu", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
autoPtr< volScalarField > nuPtr
word nuType(nuDict.lookup("type"))
const dictionary & EDict(mechanicalProperties.subDict("E"))
errorManip< error > abort(error &err)
const dictionary & nuDict(mechanicalProperties.subDict("nu"))
const dimensionedScalar mu
Atomic mass unit.
word EType(EDict.lookup("type"))
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
IOobject rhoIO("rho", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)