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.get<word>(
"type"));
29 if (rhoType ==
"uniform")
31 scalar rhoValue(rhoDict.get<scalar>(
"value"));
48 else if (rhoType ==
"field")
50 rhoIO.readOpt(IOobject::MUST_READ);
64 <<
"Valid type entries are uniform or field for rho" 73 autoPtr<volScalarField>
EPtr;
86 scalar rhoEValue(
EDict.get<scalar>(
"value"));
103 else if (
EType ==
"field")
105 EHeader.readOpt(IOobject::MUST_READ);
119 <<
"Valid type entries are uniform or field for E" 141 scalar nuValue(
nuDict.get<scalar>(
"value"));
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 if (mechanicalProperties.get<
bool>(
"planeStress"))
192 threeK = E/(1.0 -
nu);
IOobject rhoIO("rho", Time::timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject EHeader("E", Time::timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
autoPtr< volScalarField > EPtr
word EType(EDict.get< word >("type"))
const dimensionSet dimless
Dimensionless.
word nuType(nuDict.get< word >("type"))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
autoPtr< volScalarField > nuPtr
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
const dictionary & EDict(mechanicalProperties.subDict("E"))
errorManip< error > abort(error &err)
const dictionary & nuDict(mechanicalProperties.subDict("nu"))
const dimensionedScalar mu
Atomic mass unit.
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.get< word >"type"));autoPtr< volScalarField > rhoPtr
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
IOobject nuIO("nu", Time::timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)