36 #include "volFields.H"
37 #include "surfaceFields.H"
38 #include "fvMatrices.H"
42 template<
class RhoFieldType>
43 void Foam::MRFZoneDF::makeRelativeRhoFlux(
44 const RhoFieldType&
rho,
45 surfaceScalarField&
phi)
const
52 const surfaceVectorField& Cf = mesh_.Cf();
53 const surfaceVectorField& Sf = mesh_.Sf();
55 const vector
Omega = omega_ * axis_;
57 const vectorField& Cfi = Cf;
58 const vectorField& Sfi = Sf;
59 scalarField& phii =
phi.primitiveFieldRef();
64 label facei = internalFaces_[i];
65 phii[facei] -=
rho[facei] * (
Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
68 makeRelativeRhoFlux(
rho.boundaryField(),
phi.boundaryFieldRef());
71 template<
class RhoFieldType>
72 void Foam::MRFZoneDF::makeRelativeRhoFlux(
73 const RhoFieldType&
rho,
74 FieldField<fvsPatchField, scalar>&
phi)
const
81 const surfaceVectorField& Cf = mesh_.Cf();
82 const surfaceVectorField& Sf = mesh_.Sf();
84 const vector Omega = omega_ * axis_;
87 forAll(includedFaces_, patchi)
89 forAll(includedFaces_[patchi], i)
91 label patchFacei = includedFaces_[patchi][i];
93 phi[patchi][patchFacei] = 0.0;
98 forAll(excludedFaces_, patchi)
100 forAll(excludedFaces_[patchi], i)
102 label patchFacei = excludedFaces_[patchi][i];
104 phi[patchi][patchFacei] -=
105 rho[patchi][patchFacei]
106 * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
107 & Sf.boundaryField()[patchi][patchFacei];
112 template<
class RhoFieldType>
113 void Foam::MRFZoneDF::makeRelativeRhoFlux(
114 const RhoFieldType&
rho,
116 const label patchi)
const