Go to the documentation of this file. 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")));
45 zeroGradientFvPatchField<scalar>::typeName
49 else if (rhoType ==
"field")
51 rhoIO.readOpt() = IOobject::MUST_READ;
65 <<
"Valid type entries are uniform or field for rho"
71 const dictionary&
EDict(mechanicalProperties.subDict(
"E"));
74 autoPtr<volScalarField>
EPtr;
101 zeroGradientFvPatchField<scalar>::typeName
105 else if (
EType ==
"field")
107 EHeader.readOpt() = IOobject::MUST_READ;
121 <<
"Valid type entries are uniform or field for E"
138 const dictionary&
nuDict(mechanicalProperties.subDict(
"nu"));
156 zeroGradientFvPatchField<scalar>::typeName
160 else if (
nuType ==
"field")
162 nuIO.readOpt() = IOobject::MUST_READ;
175 <<
"Valid type entries are uniform or field for nu"
181 Info<<
"Normalising E : E/rho\n" <<
endl;
184 Info<<
"Calculating Lame's coefficients\n" <<
endl;
190 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
197 threeK = E/(1.0 -
nu);
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
word nuType(nuDict.lookup("type"))
const dimensionedScalar mu
Atomic mass unit.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject rhoIO("rho", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
autoPtr< volScalarField > nuPtr
const dictionary & EDict(mechanicalProperties.subDict("E"))
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
IOobject EHeader("E", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
const dictionary & nuDict(mechanicalProperties.subDict("nu"))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
word EType(EDict.lookup("type"))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimVolume(pow3(dimLength))
Info<< "Reading mechanical properties\n"<< 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
autoPtr< volScalarField > EPtr
IOobject nuIO("nu", runTime.timeName(0), mesh, IOobject::NO_READ, IOobject::NO_WRITE)
dimensionedScalar lambda(laminarTransport.lookup("lambda"))