28 template<
class Thermo>
46 template<
class Thermo>
55 constPr_(ct.constPr_),
61 template<
class Thermo>
72 template<
class Thermo>
88 template<
class Thermo>
99 template<
class Thermo>
106 return constPr_ ? this->
Cp(p, T)*
mu(p, T)*rPr_ : kappa_;
112 template<
class Thermo>
113 inline void Foam::constTransport<Thermo>::operator+=
118 scalar Y1 = this->
Y();
120 Thermo::operator+=(st);
122 if (
mag(this->
Y()) > small)
127 && (constPr_ != st.constPr_)
131 <<
"Constant " << (constPr_ ?
"Pr" :
"kappa") <<
" for " 132 << (this->
name().size() ? this->
name() :
"others") <<
" but " 133 <<
"constant " << (st.constPr_ ?
"Pr" :
"kappa") <<
" for " 134 << (st.name().size() ? st.name() :
"others")
139 scalar Y2 = st.Y()/this->
Y();
141 mu_ = Y1*mu_ + Y2*st.mu_;
142 rPr_ = constPr_ ? 1/(Y1/rPr_ + Y2/st.rPr_) : NaN;
143 kappa_ = constPr_ ? NaN : Y1*kappa_ + Y2*st.kappa_;
148 template<
class Thermo>
149 inline void Foam::constTransport<Thermo>::operator*=
154 Thermo::operator*=(s);
160 template<
class Thermo>
169 static_cast<const Thermo&>(ct1) + static_cast<const Thermo&>(ct2)
172 if (
mag(t.Y()) < small)
185 scalar Y1 = ct1.Y()/t.Y();
186 scalar Y2 = ct2.Y()/t.Y();
191 && (ct1.constPr_ != ct2.constPr_)
195 <<
"Constant " << (ct1.constPr_ ?
"Pr" :
"kappa") <<
" for " 196 << (ct1.name().size() ? ct1.name() :
"others") <<
" but " 197 <<
"constant " << (ct2.constPr_ ?
"Pr" :
"kappa") <<
" for " 198 << (ct2.name().size() ? ct2.name() :
"others")
205 Y1*ct1.mu_ + Y2*ct2.mu_,
207 ct1.constPr_ ? 1/(Y1/ct1.rPr_ + Y2/ct2.rPr_) : NaN,
208 ct1.constPr_ ? NaN : Y1*ct1.kappa_ + Y2*ct2.kappa_
214 template<
class Thermo>
223 s*
static_cast<const Thermo&
>(ct),
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Transport package with constant properties.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
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.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class for handling words, derived from string.
autoPtr< constTransport > clone() const
Construct and return a clone.
const dimensionedScalar mu
Atomic mass unit.
word name(const complex &)
Return a string representation of a complex.
PtrList< volScalarField > & Y
scalar Cp(const scalar p, const scalar T) const
dimensioned< scalar > mag(const dimensioned< Type > &)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static autoPtr< constTransport > New(const dictionary &dict)
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].