28 template<
class Thermo>
46 template<
class Thermo>
55 constPr_(ct.constPr_),
61 template<
class Thermo>
74 template<
class Thermo>
85 template<
class Thermo>
92 return constPr_ ? this->
Cp(p,
T)*
mu(
p,
T)*rPr_ : kappa_;
98 template<
class Thermo>
104 scalar Y1 = this->
Y();
106 Thermo::operator+=(st);
108 if (
mag(this->
Y()) > small)
113 && (constPr_ != st.constPr_)
117 <<
"Constant " << (constPr_ ?
"Pr" :
"kappa") <<
" for "
118 << (this->
name().size() ? this->
name() :
"others") <<
" but "
119 <<
"constant " << (st.constPr_ ?
"Pr" :
"kappa") <<
" for "
120 << (st.name().size() ? st.name() :
"others")
125 scalar Y2 = st.Y()/this->
Y();
127 mu_ = Y1*mu_ + Y2*st.mu_;
128 rPr_ = constPr_ ? 1/(Y1/rPr_ + Y2/st.rPr_) : NaN;
129 kappa_ = constPr_ ? NaN : Y1*kappa_ + Y2*st.kappa_;
134 template<
class Thermo>
140 Thermo::operator*=(
s);
146 template<
class Thermo>
155 static_cast<const Thermo&
>(ct1) +
static_cast<const Thermo&
>(ct2)
158 if (
mag(t.Y()) < small)
171 scalar Y1 = ct1.Y()/t.Y();
172 scalar Y2 = ct2.Y()/t.Y();
176 constTransport<Thermo>::debug
177 && (ct1.constPr_ != ct2.constPr_)
181 <<
"Constant " << (ct1.constPr_ ?
"Pr" :
"kappa") <<
" for "
182 << (ct1.name().size() ? ct1.name() :
"others") <<
" but "
183 <<
"constant " << (ct2.constPr_ ?
"Pr" :
"kappa") <<
" for "
184 << (ct2.name().size() ? ct2.name() :
"others")
188 return constTransport<Thermo>
191 Y1*ct1.mu_ + Y2*ct2.mu_,
193 ct1.constPr_ ? 1/(Y1/ct1.rPr_ + Y2/ct2.rPr_) : NaN,
194 ct1.constPr_ ? NaN : Y1*ct1.kappa_ + Y2*ct2.kappa_
200 template<
class Thermo>
204 const constTransport<Thermo>& ct
207 return constTransport<Thermo>
209 s*
static_cast<const Thermo&
>(ct),
scalar Cp(const scalar p, const scalar T) const
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Transport package with constant properties.
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
autoPtr< constTransport > clone() const
Construct and return a clone.
constTransport(const Thermo &t, const scalar mu, const bool constPr, const scalar rPr, const scalar kappa)
Construct from components.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
const dimensionedScalar mu
Atomic mass unit.
errorManipArg< error, int > exit(error &err, const int errNo=1)
word name(const bool)
Return a word representation of a bool.
dimensioned< scalar > mag(const dimensioned< Type > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< volScalarField > & Y