30 template<
class BaseThermo>
33 const bool isotropic = this->isotropic();
36 const auto& pCells = this->p_;
39 scalarField& CpCells = this->Cp_.primitiveFieldRef();
40 scalarField& CvCells = this->Cv_.primitiveFieldRef();
41 scalarField& rhoCells = this->rho_.primitiveFieldRef();
42 scalarField& kappaCells = this->kappa_.primitiveFieldRef();
43 vectorField& KappaCells = this->Kappa_.primitiveFieldRef();
45 auto Yslicer = this->Yslicer();
49 auto composition = this->cellComposition(Yslicer, celli);
51 const typename BaseThermo::mixtureType::thermoMixtureType&
52 thermoMixture = this->thermoMixture(composition);
54 const typename BaseThermo::mixtureType::transportMixtureType&
56 this->transportMixture(composition, thermoMixture);
58 TCells[celli] = thermoMixture.The
65 CpCells[celli] = thermoMixture.Cp(pCells[celli], TCells[celli]);
66 CvCells[celli] = thermoMixture.Cv(pCells[celli], TCells[celli]);
67 rhoCells[celli] = thermoMixture.rho(pCells[celli], TCells[celli]);
72 transportMixture.kappa(pCells[celli], TCells[celli]);
77 transportMixture.Kappa(pCells[celli], TCells[celli]);
83 this->
he().boundaryFieldRef();
85 const auto& pBf = this->p_.boundaryField();
88 this->T_.boundaryFieldRef();
91 this->Cp_.boundaryFieldRef();
94 this->Cv_.boundaryFieldRef();
97 this->rho_.boundaryFieldRef();
100 this->kappa_.boundaryFieldRef();
103 this->Kappa_.boundaryFieldRef();
108 const auto& pp = pBf[
patchi];
121 this->patchFaceComposition(Yslicer,
patchi, facei);
123 const typename BaseThermo::mixtureType::thermoMixtureType&
124 thermoMixture = this->thermoMixture(composition);
126 const typename BaseThermo::mixtureType::transportMixtureType&
128 this->transportMixture(composition, thermoMixture);
130 phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
132 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
133 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
134 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
139 transportMixture.kappa(pp[facei], pT[facei]);
144 transportMixture.Kappa(pp[facei], pT[facei]);
153 this->patchFaceComposition(Yslicer,
patchi, facei);
155 const typename BaseThermo::mixtureType::thermoMixtureType&
156 thermoMixture = this->thermoMixture(composition);
158 const typename BaseThermo::mixtureType::transportMixtureType&
160 this->transportMixture(composition, thermoMixture);
162 pT[facei] = thermoMixture.The(phe[facei], pp[facei] ,pT[facei]);
164 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
165 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
166 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
171 transportMixture.kappa(pp[facei], pT[facei]);
176 transportMixture.Kappa(pp[facei], pT[facei]);
186 template<
class BaseThermo>
190 const word& phaseName
193 BaseThermo(mesh, phaseName),
198 BaseThermo::phasePropertyName(
"Kappa", phaseName),
214 template<
class BaseThermo>
221 template<
class BaseThermo>
224 if (BaseThermo::debug)
231 if (BaseThermo::debug)
238 template<
class BaseThermo>
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricBoundaryField class.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual void correct()
Update properties.
virtual ~SolidThermo()
Destructor.
SolidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual const volVectorField & Kappa() const
Anisotropic thermal conductivity [W/m/K].
void calculate()
Calculate the thermo variables.
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual bool fixesValue() const
Return true if this patch field fixes a value.
A class for handling words, derived from string.
#define InfoInFunction
Report an information message using Foam::Info.
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, PatchField, GeoMesh > &distance)
Calculate distance data from patches.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimThermalConductivity