37void Foam::reducedUnits::calcRefValues()
42 || refLength_ < VSMALL
47 <<
"One of more referencence values too small for floating point "
49 <<
"refTime_ = " << refTime_
50 <<
", refLength = " << refTemp_
51 <<
", refMass = " << refMass_
55 refEnergy_ = refLength_*refLength_*refMass_/(refTime_*refTime_);
57 refTemp_ = refEnergy_ /
kb;
59 refForce_ = refEnergy_/refLength_;
61 refVelocity_ =
Foam::sqrt(refEnergy_/refMass_);
65 refPressure_ = refEnergy_/refVolume_;
67 refMassDensity_ = refMass_/refVolume_;
69 refNumberDensity_ = 1.0/refVolume_;
79 refMass_(1.660538782e-27)
92 refLength_(refLength),
119 refLength_ = refLength;
132 reducedUnitsDict.
readEntry(
"refLength", refLength_);
133 reducedUnitsDict.
readEntry(
"refTime", refTime_);
134 reducedUnitsDict.
readEntry(
"refMass", refMass_);
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect,...
static const scalar kb
Static data someStaticData.
void setRefValues(scalar refLength, scalar refTime, scalar refMass)
reducedUnits()
Construct with no argument, uses default values:
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
constexpr char nl
The newline '\n' character (0x0a).