35 void Foam::reducedUnits::calcRefValues()
40 || refLength_ < vSmall
45 <<
"One of more reference values too small for floating point "
47 <<
"refTime_ = " << refTime_
48 <<
", refLength = " << refTemp_
49 <<
", refMass = " << refMass_
53 refEnergy_ = refLength_*refLength_*refMass_/(refTime_*refTime_);
55 refTemp_ = refEnergy_ /
kb;
57 refForce_ = refEnergy_/refLength_;
59 refVelocity_ =
Foam::sqrt(refEnergy_/refMass_);
63 refPressure_ = refEnergy_/refVolume_;
65 refMassDensity_ = refMass_/refVolume_;
67 refNumberDensity_ = 1.0/refVolume_;
77 refMass_(1.660538782e-27)
90 refLength_(refLength),
123 refLength_ = refLength;
138 refLength_ = reducedUnitsDict.template lookup<scalar>(
"refLength");
140 refTime_ = reducedUnitsDict.template lookup<scalar>(
"refTime");
142 refMass_ = reducedUnitsDict.template lookup<scalar>(
"refMass");
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static const scalar kb
Static data someStaticData.
void setRefValues(scalar refLength, scalar refTime, scalar refMass)
reducedUnits()
Construct with no argument, uses default values:
~reducedUnits()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManip< error > abort(error &err)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)