35 void Foam::reducedUnits::calcRefValues()
40 || refLength_ < VSMALL
45 <<
"One of more referencence 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.660538782
e-27)
90 refLength_(refLength),
150 void Foam::reducedUnits::operator=(
const reducedUnits& rhs)
156 <<
"Attempted assignment to self"
const double e
Elementary charge.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar sqrt(const dimensionedScalar &ds)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
errorManip< error > abort(error &err)
reducedUnits()
Construct with no argument, uses default values:
~reducedUnits()
Destructor.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
static const scalar kb
Static data someStaticData.
void setRefValues(scalar refLength, scalar refTime, scalar refMass)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.