75 Tc_(
dict.get<scalar>(
"Tc")),
76 Pc_(
dict.get<scalar>(
"Pc")),
77 Vc_(
dict.get<scalar>(
"Vc")),
78 Zc_(
dict.get<scalar>(
"Zc")),
79 Tt_(
dict.get<scalar>(
"Tt")),
80 Pt_(
dict.get<scalar>(
"Pt")),
81 Tb_(
dict.get<scalar>(
"Tb")),
82 dipm_(
dict.get<scalar>(
"dipm")),
83 omega_(
dict.get<scalar>(
"omega")),
84 delta_(
dict.get<scalar>(
"delta"))
97 auto* ctorPtr = ConstructorTable(
name);
105 *ConstructorTablePtr_
123 word liquidType(
dict.dictName());
125 const bool hadExplicitType =
dict.readIfPresent(
"type", liquidType);
127 if (
dict.found(
"defaultCoeffs") && !hadExplicitType)
131 if (
dict.get<
bool>(
"defaultCoeffs"))
133 return New(liquidType);
136 auto* ctorPtr = dictionaryConstructorTable(liquidType);
145 *dictionaryConstructorTablePtr_
155 auto* ctorPtr = dictionaryConstructorTable(liquidType);
164 *dictionaryConstructorTablePtr_
193 <<
"Pressure below triple point pressure: "
194 <<
"p = " <<
p <<
" < Pt = " << Pt_ <<
nl <<
endl;
206 while ((Thi - Tlo) > 1.0e-4)
208 if ((pv(
p,
T) -
p) <= 0)
227 dict.readIfPresent(
"Tc", Tc_);
228 dict.readIfPresent(
"Pc", Pc_);
229 dict.readIfPresent(
"Vc", Vc_);
230 dict.readIfPresent(
"Zc", Zc_);
231 dict.readIfPresent(
"Tt", Tt_);
232 dict.readIfPresent(
"Pt", Pt_);
234 dict.readIfPresent(
"dipm", dipm_);
235 dict.readIfPresent(
"omega", omega_);
236 dict.readIfPresent(
"delta", delta_);
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
The thermophysical properties of a liquid.
scalar Vc() const
Critical volume [m^3/kmol].
scalar Zc() const
Critical compressibility factor.
scalar delta() const
Solubility parameter [(J/m^3)^(1/2)].
scalar Tb() const
Normal boiling temperature [K].
scalar Pc() const
Critical pressure [Pa].
virtual scalar pv(scalar p, scalar T) const =0
Vapour pressure [Pa].
scalar Pt() const
Triple point pressure [Pa].
scalar S(const scalar p, const scalar T) const
scalar omega() const
Pitzer's acentric factor [].
scalar Tt() const
Triple point temperature [K].
scalar dipm() const
Dipole moment [].
liquidProperties(scalar W, scalar Tc, scalar Pc, scalar Vc, scalar Zc, scalar Tt, scalar Pt, scalar Tb, scalar dipm, scalar omega, scalar delta)
Construct from components.
virtual void writeData(Ostream &os) const =0
Write the function coefficients.
static autoPtr< liquidProperties > New(const word &name)
Return a pointer to a new liquidProperties created from name.
virtual scalar pvInvert(scalar p) const
Invert the vapour pressure relationship to retrieve the.
scalar Tc() const
Critical temperature [K].
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
Base-class for thermophysical properties of solids, liquids and gases providing an interface compatib...
thermophysicalProperties(scalar W)
Construct from molecular weight.
scalar W() const
Molecular weight [kg/kmol].
virtual void writeData(Ostream &os) const =0
Write the function coefficients.
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
Namespace for handling debugging switches.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.