1 Info <<
"Reading mechanical properties\n"
4 mechanicalPropertiesPtr_.reset(
7 "mechanicalProperties",
11 IOobject::NO_WRITE)));
12 IOdictionary& mechanicalProperties = mechanicalPropertiesPtr_();
14 const dictionary& rhoDict(mechanicalProperties.subDict(
"rho"));
15 word rhoType(rhoDict.lookup(
"type"));
24 if (rhoType ==
"uniform")
26 scalar rhoValue(readScalar(rhoDict.lookup(
"value")));
37 else if (rhoType ==
"field")
39 rhoIO.readOpt() = IOobject::MUST_READ;
49 <<
"Valid type entries are uniform or field for rho"
53 volScalarField&
rho = rhoPtr_();
55 const dictionary& EDict(mechanicalProperties.subDict(
"E"));
56 word EType(EDict.lookup(
"type"));
65 if (EType ==
"uniform")
67 scalar rhoEValue(readScalar(EDict.lookup(
"value")));
75 dimMass / dimLength / sqr(dimTime),
78 else if (EType ==
"field")
80 EHeader.readOpt() = IOobject::MUST_READ;
90 <<
"Valid type entries are uniform or field for E"
94 volScalarField& rhoE = EPtr_();
103 const dictionary& nuDict(mechanicalProperties.subDict(
"nu"));
104 word nuType(nuDict.lookup(
"type"));
106 if (nuType ==
"uniform")
108 scalar nuValue(readScalar(nuDict.lookup(
"value")));
118 else if (nuType ==
"field")
120 nuIO.readOpt() = IOobject::MUST_READ;
129 <<
"Valid type entries are uniform or field for nu"
130 << abort(FatalError);
133 volScalarField& nu = nuPtr_();
135 Info <<
"Normalising E : E/rho\n"
137 volScalarField E(rhoE /
rho);
139 Info <<
"Calculating Lame's coefficients\n"
145 E / (2.0 * (1.0 + nu))));
146 lambdaPtr_.reset(
new volScalarField(
148 nu* E / ((1.0 + nu) * (1.0 - 2.0 * nu))));
150 Switch planeStress(mechanicalProperties.lookup(
"planeStress"));
154 Info <<
"Plane Stress\n"
157 lambdaPtr_() = nu * E / ((1.0 + nu) * (1.0 - nu));
161 Info <<
"Plane Strain\n"