34 template<
class RhoFieldType>
35 void Foam::MRFZone::makeRelativeRhoFlux
37 const RhoFieldType& rho,
58 label facei = internalFaces_[i];
59 phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
62 makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryFieldRef());
66 template<
class RhoFieldType>
67 void Foam::MRFZone::makeRelativeRhoFlux
69 const RhoFieldType& rho,
70 FieldField<fvsPatchField, scalar>& phi
84 forAll(includedFaces_, patchi)
86 forAll(includedFaces_[patchi], i)
90 phi[
patchi][patchFacei] = 0.0;
95 forAll(excludedFaces_, patchi)
97 forAll(excludedFaces_[patchi], i)
101 phi[
patchi][patchFacei] -=
103 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
104 & Sf.boundaryField()[
patchi][patchFacei];
110 template<
class RhoFieldType>
111 void Foam::MRFZone::makeRelativeRhoFlux
113 const RhoFieldType& rho,
129 forAll(includedFaces_[patchi], i)
133 phi[patchFacei] = 0.0;
137 forAll(excludedFaces_[patchi], i)
143 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
144 & Sf.boundaryField()[
patchi][patchFacei];
149 template<
class RhoFieldType>
150 void Foam::MRFZone::makeAbsoluteRhoFlux
152 const RhoFieldType& rho,
173 label facei = internalFaces_[i];
174 phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
177 surfaceScalarField::Boundary& phibf = phi.boundaryFieldRef();
181 forAll(includedFaces_, patchi)
183 forAll(includedFaces_[patchi], i)
187 phibf[
patchi][patchFacei] +=
188 rho.boundaryField()[
patchi][patchFacei]
189 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
190 & Sf.boundaryField()[
patchi][patchFacei];
195 forAll(excludedFaces_, patchi)
197 forAll(excludedFaces_[patchi], i)
201 phibf[
patchi][patchFacei] +=
202 rho.boundaryField()[
patchi][patchFacei]
203 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
204 & Sf.boundaryField()[
patchi][patchFacei];
225 phii[internalFaces_[i]] =
Zero;
231 forAll(includedFaces_, patchi)
233 forAll(includedFaces_[patchi], i)
239 forAll(excludedFaces_, patchi)
241 forAll(excludedFaces_[patchi], i)
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Generic GeometricField class.
Vector< scalar > vector
A scalar version of the templated Vector.
const Time & time() const
Return the top-level database.
Pre-declare SubField and related Field type.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void zero(GeometricField< Type, fvsPatchField, surfaceMesh > &phi) const
Zero the MRF region of the given field.
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
scalar timeOutputValue() const
Return current time value.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Field< vector > vectorField
Specialisation of Field<T> for vector.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField