30 template<
class BaseThermo>
37 scalarField& CpCells = this->Cp_.primitiveFieldRef();
38 scalarField& CvCells = this->Cv_.primitiveFieldRef();
39 scalarField& psiCells = this->psi_.primitiveFieldRef();
40 scalarField& rhoCells = this->rho_.primitiveFieldRef();
41 scalarField& muCells = this->mu_.primitiveFieldRef();
42 scalarField& kappaCells = this->kappa_.primitiveFieldRef();
44 auto Yslicer = this->Yslicer();
48 auto composition = this->cellComposition(Yslicer, celli);
50 const typename BaseThermo::mixtureType::thermoMixtureType&
51 thermoMixture = this->thermoMixture(composition);
53 const typename BaseThermo::mixtureType::transportMixtureType&
55 this->transportMixture(composition, thermoMixture);
57 TCells[celli] = thermoMixture.The
64 CpCells[celli] = thermoMixture.Cp(pCells[celli], TCells[celli]);
65 CvCells[celli] = thermoMixture.Cv(pCells[celli], TCells[celli]);
66 psiCells[celli] = thermoMixture.psi(pCells[celli], TCells[celli]);
67 rhoCells[celli] = thermoMixture.rho(pCells[celli], TCells[celli]);
69 muCells[celli] = transportMixture.mu(pCells[celli], TCells[celli]);
71 transportMixture.kappa(pCells[celli], TCells[celli]);
74 volScalarField::Boundary& pBf =
75 this->p_.boundaryFieldRef();
77 volScalarField::Boundary& TBf =
78 this->T_.boundaryFieldRef();
80 volScalarField::Boundary& CpBf =
81 this->Cp_.boundaryFieldRef();
83 volScalarField::Boundary& CvBf =
84 this->Cv_.boundaryFieldRef();
86 volScalarField::Boundary& psiBf =
87 this->psi_.boundaryFieldRef();
89 volScalarField::Boundary& rhoBf =
90 this->rho_.boundaryFieldRef();
92 volScalarField::Boundary& heBf =
93 this->
he().boundaryFieldRef();
95 volScalarField::Boundary& muBf =
96 this->mu_.boundaryFieldRef();
98 volScalarField::Boundary& kappaBf =
99 this->kappa_.boundaryFieldRef();
118 this->patchFaceComposition(Yslicer,
patchi, facei);
120 const typename BaseThermo::mixtureType::thermoMixtureType&
121 thermoMixture = this->thermoMixture(composition);
123 const typename BaseThermo::mixtureType::transportMixtureType&
125 this->transportMixture(composition, thermoMixture);
127 phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
129 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
130 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
131 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
132 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
134 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
135 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
143 this->patchFaceComposition(Yslicer,
patchi, facei);
145 const typename BaseThermo::mixtureType::thermoMixtureType&
146 thermoMixture = this->thermoMixture(composition);
148 const typename BaseThermo::mixtureType::transportMixtureType&
150 this->transportMixture(composition, thermoMixture);
152 pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
154 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
155 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
156 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
157 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
159 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
160 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
169 template<
class BaseThermo>
173 const word& phaseName
176 BaseThermo(mesh, phaseName)
184 template<
class BaseThermo>
191 template<
class BaseThermo>
194 if (BaseThermo::debug)
201 if (BaseThermo::debug)
#define forAll(list, i)
Loop across all elements in list.
Thermo implementation based on density.
virtual void correct()
Update properties.
RhoFluidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual ~RhoFluidThermo()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from string.
volScalarField scalarField(fieldObject, mesh)
#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.
fvPatchField< scalar > fvPatchScalarField