33 template<
class BasicSol
idThermo,
class MixtureType>
37 const auto& pCells = this->p_;
40 scalarField& CpCells = this->Cp_.primitiveFieldRef();
41 scalarField& CvCells = this->Cv_.primitiveFieldRef();
42 scalarField& rhoCells = this->rho_.primitiveFieldRef();
43 scalarField& kappaCells = this->kappa_.primitiveFieldRef();
47 const typename MixtureType::thermoMixtureType& thermoMixture =
48 this->cellThermoMixture(celli);
50 const typename MixtureType::transportMixtureType& transportMixture =
51 this->cellTransportMixture(celli, thermoMixture);
53 TCells[celli] = thermoMixture.THE
60 CpCells[celli] = thermoMixture.Cp(pCells[celli], TCells[celli]);
61 CvCells[celli] = thermoMixture.Cv(pCells[celli], TCells[celli]);
62 rhoCells[celli] = thermoMixture.rho(pCells[celli], TCells[celli]);
65 transportMixture.kappa(pCells[celli], TCells[celli]);
69 volScalarField::Boundary& heBf =
70 this->
he().boundaryFieldRef();
72 const auto& pBf = this->p_.boundaryField();
74 volScalarField::Boundary& TBf =
75 this->T_.boundaryFieldRef();
77 volScalarField::Boundary& CpBf =
78 this->Cp_.boundaryFieldRef();
80 volScalarField::Boundary& CvBf =
81 this->Cv_.boundaryFieldRef();
83 volScalarField::Boundary& rhoBf =
84 this->rho_.boundaryFieldRef();
86 volScalarField::Boundary& kappaBf =
87 this->kappa_.boundaryFieldRef();
92 const auto& pp = pBf[
patchi];
103 const typename MixtureType::thermoMixtureType&
104 thermoMixture = this->patchFaceThermoMixture(patchi, facei);
106 const typename MixtureType::transportMixtureType&
108 this->patchFaceTransportMixture
109 (patchi, facei, thermoMixture);
111 phe[facei] = thermoMixture.HE(pp[facei], pT[facei]);
113 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
114 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
115 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
117 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
124 const typename MixtureType::thermoMixtureType&
125 thermoMixture = this->patchFaceThermoMixture(patchi, facei);
127 const typename MixtureType::transportMixtureType&
129 this->patchFaceTransportMixture
130 (patchi, facei, thermoMixture);
132 pT[facei] = thermoMixture.THE(phe[facei], pp[facei] ,pT[facei]);
134 prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
135 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
136 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
138 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
143 this->kappa_.correctBoundaryConditions();
149 template<
class BasicSol
idThermo,
class MixtureType>
154 const word& phaseName
165 template<
class BasicSol
idThermo,
class MixtureType>
172 template<
class BasicSol
idThermo,
class MixtureType>
189 template<
class BasicSol
idThermo,
class MixtureType>
193 const fvMesh& mesh = this->T_.mesh();
205 const auto& pCells = this->p_;
214 this->cellTransportMixture
217 ).Kappa(pCells[celli], TCells[celli]);
224 const auto& pp = this->p_.boundaryField()[
patchi];
232 this->patchFaceTransportMixture
236 ).Kappa(pp[facei], pT[facei]);
244 template<
class BasicSol
idThermo,
class MixtureType>
251 const auto& pp = this->p_.boundaryField()[
patchi];
260 this->patchFaceTransportMixture
264 ).Kappa(pp[patchi], Tp[facei]);
271 template<
class BasicSol
idThermo,
class MixtureType>
275 const fvMesh& mesh = this->T_.mesh();
296 KappaLocal.primitiveFieldRef() =
297 coordinates.
R(mesh.
C()).transformVector(Kappa);
301 KappaLocal.boundaryFieldRef()[
patchi] =
310 template<
class BasicSol
idThermo,
class MixtureType>
317 const fvMesh& mesh = this->T_.mesh();
326 .transformVector(Kappa(patchi));
330 template<
class BasicSol
idThermo,
class MixtureType>
334 const fvMesh& mesh = this->T_.mesh();
346 template<
class BasicSol
idThermo,
class MixtureType>
363 "laplacian(alphae,e)" 371 KappaLocal()/this->
Cv(),
373 "laplacian(alphae,e)" Base class for other coordinate system specifications.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
scalar Cv(const scalar p, const scalar T) const
#define forAll(list, i)
Loop across all elements in list.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const fvSchemes & schemes() const
Return the fvSchemes.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Calculate the matrix for the laplacian of the field.
void setFluxRequired(const word &name) const
volVectorField vectorField(fieldObject, mesh)
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimLength
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
virtual void correct()
Update properties.
virtual tmp< volVectorField > Kappa() const
Anisotropic thermal conductivity [W/m/K].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, PatchField, GeoMesh > &distance)
Calculate distance data from patches.
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from string.
Calculate the laplacian of the given field.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
volScalarField scalarField(fieldObject, mesh)
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
heSolidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
const dimensionSet dimEnergy
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
Internal & ref()
Return a reference to the dimensioned internal field.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
Energy for a solid mixture.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
A class for managing temporary objects.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
virtual ~heSolidThermo()
Destructor.
const dimensionSet dimTemperature
const coordinateRotation & R() const
Return const reference to co-ordinate rotation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
#define InfoInFunction
Report an information message using Foam::Info.