37 void 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.660538782
e-27)
92 refLength_(refLength),
119 refLength_ = refLength;
132 reducedUnitsDict.
readEntry(
"refLength", refLength_);
133 reducedUnitsDict.
readEntry(
"refTime", refTime_);
134 reducedUnitsDict.
readEntry(
"refMass", refMass_);
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.
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar sqrt(const dimensionedScalar &ds)
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...
const dimensionedScalar e
Elementary charge.
errorManip< error > abort(error &err)
reducedUnits()
Construct with no argument, uses default values:
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
static const scalar kb
Static data someStaticData.
void setRefValues(scalar refLength, scalar refTime, scalar refMass)