32 Foam::scalar Foam::wallCellWallFunctionFvPatchScalarField::tol_ = 1
e-1;
51 if (masterPatchi_ == -1)
53 label masterPatchi = -1;
57 if (isA<wallCellWallFunctionFvPatchScalarField>(bf[
patchi]))
60 refCast<wallCellWallFunctionFvPatchScalarField>(bf[
patchi]);
62 if (masterPatchi == -1)
67 epsilonPf.masterPatchi_ = masterPatchi;
73 if (
patch().index() != masterPatchi_)
79 if (wallCellsPtr_.valid() && !vf.
mesh().changing())
89 vf.
mesh().nFaces() - vf.
mesh().nInternalFaces(),
94 if (isA<wallCellWallFunctionFvPatchScalarField>(bf[
patchi]))
114 forAll(bFaceIsWall, bFacei)
116 if (bFaceIsWall[bFacei])
118 const label facei = bFacei + vf.
mesh().nInternalFaces();
119 const label celli = vf.
mesh().faceOwner()[facei];
120 cellMagWallArea[celli] += vf.
mesh().magFaceAreas()[facei];
130 if (isA<wallCellWallFunctionFvPatchScalarField>(bf[
patchi]))
144 wallCellFractionPtr_.reset
146 max((tWallCellFraction - tol_)/(1 - tol_), scalar(0)).ptr()
160 forAll(patchFaceCells, patchFacei)
162 vf[patchFaceCells[patchFacei]] += pf[patchFacei];
185 if (isA<wallCellWallFunctionFvPatchScalarField>(bf[
patchi]))
187 patchFieldAddToCellField
193 patchFieldAddToCellField
220 wallCellsPtr_(nullptr),
221 wallCellFractionPtr_(nullptr)
239 wallCellsPtr_(nullptr),
240 wallCellFractionPtr_(nullptr)
256 wallCellsPtr_(nullptr),
257 wallCellFractionPtr_(nullptr)
271 mapper(*
this, ptf, [&](){
return this->patchInternalField(); });
272 wallCellsPtr_.clear();
273 wallCellFractionPtr_.clear();
283 wallCellsPtr_.clear();
284 wallCellFractionPtr_.clear();
#define forAll(list, i)
Loop across all elements in list.
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...
const Mesh & mesh() const
Return mesh.
Generic GeometricBoundaryField class.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A List with indirect addressing.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Abstract base class for field mapping.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
virtual void operator==(const fvPatchField< Type > &)
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
const fvPatch & patch() const
Return patch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const scalarField & magSf() const
Return face area magnitudes.
virtual const labelUList & faceCells() const
Return faceCells.
A class for managing temporary objects.
Base class for wall functions that modify cell values.
tmp< scalarField > patchFieldsToWallCellField(const PtrList< scalarField > &pfs) const
Average a set of patch fields into a wall cell field.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
virtual void map(const fvPatchScalarField &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
static void patchFieldAddToCellField(const fvPatch &fvp, const scalarField &pf, scalarField &vf)
Sum values from a patch field into a cell field.
wallCellWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
void initMaster()
Initialise the master cell indices and fractions, and allocate the.
const dimensionedScalar e
Elementary charge.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)