39Foam::mixedEnergyFvPatchScalarField::
40mixedEnergyFvPatchScalarField
46 mixedFvPatchScalarField(
p, iF)
48 valueFraction() = 0.0;
55Foam::mixedEnergyFvPatchScalarField::
56mixedEnergyFvPatchScalarField
64 mixedFvPatchScalarField(ptf,
p, iF, mapper)
68Foam::mixedEnergyFvPatchScalarField::
69mixedEnergyFvPatchScalarField
76 mixedFvPatchScalarField(
p, iF,
dict)
80Foam::mixedEnergyFvPatchScalarField::
81mixedEnergyFvPatchScalarField
86 mixedFvPatchScalarField(tppsf)
90Foam::mixedEnergyFvPatchScalarField::
91mixedEnergyFvPatchScalarField
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);
123 thermo.Cpv(pw, Tw, patchi)*Tw.refGrad()
124 + patch().deltaCoeffs()*
130 mixedFvPatchScalarField::updateCoeffs();
143 label index = this->patch().index();
145 const label nbrPatchId = this->patch().patch().neighbPolyPatchID();
147 const label globalPatchID =
152 this->patch().patch(),
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];
185 if (this->patch().patch().masterImplicit())
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;
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Abstract base-class for fluid and solid thermodynamic properties.
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const FieldField< Field, Type > & internalCoeffs() const noexcept
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Return optional lduAdressing.
Field< Type > & source() noexcept
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const labelListListList & cellBoundMap() const
Return patch local sub-face to nbrCellId map.
const labelListListList & faceBoundMap() const
Return boundary face map.
label findNbrMeshId(const polyPatch &pp, const label iMesh) const
Find nrb mesh Id for mapped patches.
const labelListList & patchLocalToGlobalMap() const
Return patchLocalToGlobalMap.
This boundary condition provides a mixed condition for internal energy.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void manipulateMatrix(fvMatrix< scalar > &m, const label iMatrix, const direction cmpt)
Manipulate matrix.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual Field< Type > & source()
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
#define forAll(list, i)
Loop across all elements in list.