36template<
class RhoFieldType>
37void Foam::MRFZone::makeRelativeRhoFlux
39 const RhoFieldType&
rho,
40 surfaceScalarField&
phi
60 label facei = internalFaces_[i];
61 phii[facei] -=
rho[facei]*(
Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
68template<
class RhoFieldType>
69void 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];
112template<
class RhoFieldType>
113void 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];
151template<
class RhoFieldType>
152void 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];
227 phii[internalFaces_[i]] =
Zero;
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;
Generic templated field type.
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
vector Omega() const
Return the current Omega vector.
scalar timeOutputValue() const
Return current time value.
const Time & time() const
Return the top-level database.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
const surfaceVectorField & Sf() const
Return cell face area vectors.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A special matrix type and solver, designed for finite volume solutions of scalar equations.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0)
#define forAll(list, i)
Loop across all elements in list.
A non-counting (dummy) refCount.