46 mixedFvPatchScalarField(
p, iF)
48 valueFraction() = 0.0;
64 mixedFvPatchScalarField(ptf,
p, iF, mapper)
76 mixedFvPatchScalarField(
p, iF,
dict)
86 mixedFvPatchScalarField(tppsf)
97 mixedFvPatchScalarField(tppsf, iF)
110 const label patchi =
patch().index();
113 mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
120 valueFraction() = Tw.valueFraction();
121 refValue() =
thermo.
he(pw, Tw.refValue(), patchi);
124 +
patch().deltaCoeffs()*
130 mixedFvPatchScalarField::updateCoeffs();
143 label index = this->
patch().index();
145 const label nbrPatchId = this->
patch().patch().neighbPolyPatchID();
147 const label globalPatchID =
157 refCast<const mixedFvPatchField>(
thermo.T().boundaryField()[index]);
177 label globalFaceI =
faceMap[j];
179 label myCellI = myCells[j];
180 label nbrCellI = nbrCells[j];
182 const scalar intCorr = -intCoeffsCmpt[j];
183 const scalar srcCorr = -sourceCorr[j];
187 if (myCellI > nbrCellI)
191 matrix.
lower()[globalFaceI] += intCorr;
196 matrix.
upper()[globalFaceI] += intCorr;
199 matrix.
diag()[myCellI] -= intCorr;
200 matrix.
source()[myCellI] += srcCorr;
204 if (myCellI < nbrCellI)
206 matrix.
upper()[globalFaceI] += intCorr;
212 matrix.
lower()[globalFaceI] += intCorr;
216 matrix.
diag()[myCellI] -= intCorr;
217 matrix.
source()[myCellI] += srcCorr;
252 mixedEnergyFvPatchScalarField
const scalarField & diag() const
Abstract base-class for fluid and solid thermodynamic properties.
const labelListList & patchLocalToGlobalMap() const
Return patchLocalToGlobalMap.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Return optional lduAdressing.
label findNbrMeshId(const polyPatch &pp, const label iMesh) const
Find nrb mesh Id for mapped patches.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
mixedEnergyFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual const volScalarField & T() const
Temperature [K].
virtual Field< Type > & source()
virtual tmp< volScalarField > Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
#define forAll(list, i)
Loop across all elements in list.
virtual volScalarField & p()
Pressure [Pa].
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
psiReactionThermo & thermo
fvPatchField< scalar > fvPatchScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
const scalarField & lower() const
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
virtual void manipulateMatrix(fvMatrix< scalar > &m, const label iMatrix, const direction cmpt)
Manipulate matrix.
bool asymmetric() const noexcept
Matrix is asymmetric (ie, full)
const labelListListList & faceBoundMap() const
Return boundary face map.
This boundary condition provides a mixed condition for internal energy.
const labelListListList & cellBoundMap() const
Return patch local sub-face to nbrCellId map.
Field< Type > & source() noexcept
const scalarField & upper() const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
const FieldField< Field, Type > & internalCoeffs() const noexcept
fvBoundary scalar field containing pseudo-matrix coeffs for internal cells
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
static constexpr const zero Zero
Global zero (0)