36 template<
class RhoFieldType>
37 void Foam::MRFZone::makeRelativeRhoFlux
39 const RhoFieldType&
rho,
60 label facei = internalFaces_[i];
61 phii[facei] -=
rho[facei]*(
Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
64 makeRelativeRhoFlux(
rho.boundaryField(),
phi.boundaryFieldRef());
68 template<
class RhoFieldType>
69 void Foam::MRFZone::makeRelativeRhoFlux
71 const RhoFieldType&
rho,
72 FieldField<fvsPatchField, scalar>&
phi 83 const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
86 forAll(includedFaces_, patchi)
88 forAll(includedFaces_[patchi], i)
90 label patchFacei = includedFaces_[patchi][i];
92 phi[patchi][patchFacei] = 0.0;
97 forAll(excludedFaces_, patchi)
99 forAll(excludedFaces_[patchi], i)
101 label patchFacei = excludedFaces_[patchi][i];
103 phi[patchi][patchFacei] -=
104 rho[patchi][patchFacei]
105 * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
106 & Sf.boundaryField()[patchi][patchFacei];
112 template<
class RhoFieldType>
113 void Foam::MRFZone::makeRelativeRhoFlux
115 const RhoFieldType&
rho,
128 const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
131 forAll(includedFaces_[patchi], i)
133 label patchFacei = includedFaces_[patchi][i];
135 phi[patchFacei] = 0.0;
139 forAll(excludedFaces_[patchi], i)
141 label patchFacei = excludedFaces_[patchi][i];
145 * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
146 & Sf.boundaryField()[patchi][patchFacei];
151 template<
class RhoFieldType>
152 void Foam::MRFZone::makeAbsoluteRhoFlux
154 const RhoFieldType&
rho,
166 const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
175 label facei = internalFaces_[i];
176 phii[facei] +=
rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
183 forAll(includedFaces_, patchi)
185 forAll(includedFaces_[patchi], i)
187 label patchFacei = includedFaces_[patchi][i];
189 phibf[patchi][patchFacei] +=
190 rho.boundaryField()[patchi][patchFacei]
191 * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
192 & Sf.boundaryField()[patchi][patchFacei];
197 forAll(excludedFaces_, patchi)
199 forAll(excludedFaces_[patchi], i)
201 label patchFacei = excludedFaces_[patchi][i];
203 phibf[patchi][patchFacei] +=
204 rho.boundaryField()[patchi][patchFacei]
205 * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
206 & Sf.boundaryField()[patchi][patchFacei];
215 GeometricField<Type, fvsPatchField, surfaceMesh>&
phi 223 Field<Type>& phii =
phi.primitiveFieldRef();
227 phii[internalFaces_[i]] =
Zero;
230 auto& phibf =
phi.boundaryFieldRef();
232 forAll(includedFaces_, patchi)
234 forAll(includedFaces_[patchi], i)
236 phibf[patchi][includedFaces_[patchi][i]] =
Zero;
240 forAll(excludedFaces_, patchi)
242 forAll(excludedFaces_[patchi], i)
244 phibf[patchi][excludedFaces_[patchi][i]] =
Zero;
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
const Time & time() const
Return the top-level database.
#define forAll(list, i)
Loop across all elements in list.
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.
vector Omega() const
Return the current Omega vector.
scalar timeOutputValue() const
Return the current user-time value. (ie, after applying any timeToUserTime() conversion) ...
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
static constexpr const zero Zero
Global zero (0)