34 template<
class RhoFieldType>
35 void Foam::MRFZone::makeRelativeRhoFlux
37 const RhoFieldType& rho,
53 label facei = internalFaces_[i];
54 phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
57 makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryFieldRef());
61 template<
class RhoFieldType>
62 void Foam::MRFZone::makeRelativeRhoFlux
64 const RhoFieldType& rho,
65 FieldField<fvsPatchField, scalar>& phi
74 forAll(includedFaces_, patchi)
76 forAll(includedFaces_[patchi], i)
80 phi[
patchi][patchFacei] = 0.0;
85 forAll(excludedFaces_, patchi)
87 forAll(excludedFaces_[patchi], i)
93 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
94 & Sf.boundaryField()[
patchi][patchFacei];
100 template<
class RhoFieldType>
101 void Foam::MRFZone::makeRelativeRhoFlux
103 const RhoFieldType& rho,
114 forAll(includedFaces_[patchi], i)
118 phi[patchFacei] = 0.0;
122 forAll(excludedFaces_[patchi], i)
128 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
129 & Sf.boundaryField()[
patchi][patchFacei];
134 template<
class RhoFieldType>
135 void Foam::MRFZone::makeAbsoluteRhoFlux
137 const RhoFieldType& rho,
153 label facei = internalFaces_[i];
154 phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
161 forAll(includedFaces_, patchi)
163 forAll(includedFaces_[patchi], i)
167 phibf[
patchi][patchFacei] +=
168 rho.boundaryField()[
patchi][patchFacei]
169 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
170 & Sf.boundaryField()[
patchi][patchFacei];
175 forAll(excludedFaces_, patchi)
177 forAll(excludedFaces_[patchi], i)
181 phibf[
patchi][patchFacei] +=
182 rho.boundaryField()[
patchi][patchFacei]
183 * (Omega ^ (Cf.boundaryField()[
patchi][patchFacei] - origin_))
184 & Sf.boundaryField()[
patchi][patchFacei];
200 phii[internalFaces_[i]] =
Zero;
206 forAll(includedFaces_, patchi)
208 forAll(includedFaces_[patchi], i)
214 forAll(excludedFaces_, patchi)
216 forAll(excludedFaces_[patchi], i)
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
FvWallInfoData< WallInfo, label > 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.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Generic GeometricField class.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of the boundary field.
Vector< scalar > vector
A scalar version of the templated Vector.
const Time & time() const
Return the top-level database.
scalar userTimeValue() const
Return current user time value.
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.
Generic GeometricBoundaryField class.
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