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")));
48 else if (rhoType ==
"field")
50 rhoIO.readOpt() = IOobject::MUST_READ;
64 <<
"Valid type entries are uniform or field for rho" 70 const dictionary&
EDict(mechanicalProperties.subDict(
"E"));
73 autoPtr<volScalarField>
EPtr;
103 else if (
EType ==
"field")
105 EHeader.readOpt() = IOobject::MUST_READ;
119 <<
"Valid type entries are uniform or field for E" 136 const dictionary&
nuDict(mechanicalProperties.subDict(
"nu"));
157 else if (
nuType ==
"field")
159 nuIO.readOpt() = IOobject::MUST_READ;
172 <<
"Valid type entries are uniform or field for nu" 178 Info<<
"Normalising E : E/rho\n" <<
endl;
181 Info<<
"Calculating Lame's coefficients\n" <<
endl;
187 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
193 lambda = nu*E/((1.0 +
nu)*(1.0 - nu));
194 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)