30 template<
class BaseThermo>
37 scalarField& CpCells = this->Cp_.primitiveFieldRef();
38 scalarField& CvCells = this->Cv_.primitiveFieldRef();
39 scalarField& psiCells = this->psi_.primitiveFieldRef();
40 scalarField& muCells = this->mu_.primitiveFieldRef();
41 scalarField& kappaCells = this->kappa_.primitiveFieldRef();
43 auto Yslicer = this->Yslicer();
47 auto composition = this->cellComposition(Yslicer, celli);
49 const typename BaseThermo::mixtureType::thermoMixtureType&
50 thermoMixture = this->thermoMixture(composition);
52 const typename BaseThermo::mixtureType::transportMixtureType&
54 this->transportMixture(composition, thermoMixture);
56 TCells[celli] = thermoMixture.The
63 CpCells[celli] = thermoMixture.Cp(pCells[celli], TCells[celli]);
64 CvCells[celli] = thermoMixture.Cv(pCells[celli], TCells[celli]);
65 psiCells[celli] = thermoMixture.psi(pCells[celli], TCells[celli]);
67 muCells[celli] = transportMixture.mu(pCells[celli], TCells[celli]);
69 transportMixture.kappa(pCells[celli], TCells[celli]);
72 volScalarField::Boundary& pBf =
73 this->p_.boundaryFieldRef();
75 volScalarField::Boundary& TBf =
76 this->T_.boundaryFieldRef();
78 volScalarField::Boundary& CpBf =
79 this->Cp_.boundaryFieldRef();
81 volScalarField::Boundary& CvBf =
82 this->Cv_.boundaryFieldRef();
84 volScalarField::Boundary& psiBf =
85 this->psi_.boundaryFieldRef();
87 volScalarField::Boundary& heBf =
88 this->
he().boundaryFieldRef();
90 volScalarField::Boundary& muBf =
91 this->mu_.boundaryFieldRef();
93 volScalarField::Boundary& kappaBf =
94 this->kappa_.boundaryFieldRef();
112 this->patchFaceComposition(Yslicer,
patchi, facei);
114 const typename BaseThermo::mixtureType::thermoMixtureType&
115 thermoMixture = this->thermoMixture(composition);
117 const typename BaseThermo::mixtureType::transportMixtureType&
119 this->transportMixture(composition, thermoMixture);
121 phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
123 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
124 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
125 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
127 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
128 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
136 this->patchFaceComposition(Yslicer,
patchi, facei);
138 const typename BaseThermo::mixtureType::thermoMixtureType&
139 thermoMixture = this->thermoMixture(composition);
141 const typename BaseThermo::mixtureType::transportMixtureType&
143 this->transportMixture(composition, thermoMixture);
145 pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
147 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
148 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
149 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
151 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
152 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
161 template<
class BaseThermo>
165 const word& phaseName
168 BaseThermo(mesh, phaseName)
173 this->psi_.oldTime();
179 template<
class BaseThermo>
186 template<
class BaseThermo>
189 if (BaseThermo::debug)
195 this->psi_.oldTime();
199 if (BaseThermo::debug)
#define forAll(list, i)
Loop across all elements in list.
Thermo implementation based on compressibility.
virtual void correct()
Update properties.
virtual ~PsiThermo()
Destructor.
PsiThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
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