62 mesh.pointsInstance(),
68 auto& oDelta = *oDelta_;
75 mesh.pointsInstance(),
81 auto& nDelta = *nDelta_;
96 mag(
n[facei] & (
C[owner[facei]] - Cf[facei]));
98 mag(
n[facei] & (
C[neighbour[facei]] - Cf[facei]));
105 const fvPatch& currPatch =
mesh.boundary()[patchi];
108 const vectorField nPatch(currPatch.Sf()/currPatch.magSf());
111 if (currPatch.coupled())
118 const label own = pOwner[facei];
121 oDelta.boundaryFieldRef()[patchi][facei] =
122 mag(nPatch[facei] & (pCf[facei] -
C[own]));
126 nDelta.boundaryFieldRef()[patchi] =
127 currPatch.weights()*oDelta.boundaryFieldRef()[patchi]
128 /(scalar(1) - currPatch.weights());
137 const label own = pOwner[facei];
140 oDelta.boundaryFieldRef()[patchi][facei] =
141 mag(nPatch[facei] & (pCf[facei] -
C[own]));
143 nDelta.boundaryFieldRef()[patchi][facei] =
144 mag(nPatch[facei] & (pCf[facei] -
C[own]));
155 const GeometricField<Type, fvPatchField, volMesh>& vf
158 const fvMesh&
mesh = vf.mesh();
162 auto tresult = tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
::New 166 "weightedFlux::interpolate(" + vf.name() +
')',
167 mesh.time().timeName(),
173 auto& result = tresult.ref();
180 const scalar sigmaDeltaO = sigma_[owner[facei]]/oDelta[facei];
181 const scalar sigmaDeltaN = sigma_[neighbour[facei]]/nDelta[facei];
184 (vf[owner[facei]]*sigmaDeltaO + vf[neighbour[facei]]*sigmaDeltaN)
185 /(sigmaDeltaO + sigmaDeltaN);
189 auto& bfld = result.boundaryFieldRef();
193 fvsPatchField<Type>& pfld = bfld[patchi];
198 pfld = vf.boundaryField()[patchi];
207 sigma_.boundaryField()[patchi].patchNeighbourField()
210 Field<Type> vfO(vf.boundaryField()[patchi].patchInternalField());
211 Field<Type> vfN(vf.boundaryField()[patchi].patchNeighbourField());
215 const label own = pOwner[facei];
217 const scalar sigmaDeltaO =
218 sigma_[own]/oDelta.boundaryField()[patchi][facei];
220 const scalar sigmaDeltaN =
221 sigmaN[facei]/nDelta.boundaryField()[patchi][facei];
224 (vfO[facei]*sigmaDeltaO + vfN[facei]*sigmaDeltaN)
225 /(sigmaDeltaO + sigmaDeltaN);
Weighted flux interpolation scheme class.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual ~weightedFlux()
Destructor.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Interpolate the cell values to faces.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
makeSurfaceInterpolationScheme(cellCoBlended)
void clearOut()
Clear all fields.
Template functions to aid in the implementation of demand driven data.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const polyBoundaryMesh & patches
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void deleteDemandDrivenData(DataPtr &dataPtr)
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.