25 const word objFuncName,
26 const word objFuncPart,
27 const dictionary& objFuncDict)
38 rho_(daTurb_.getRho())
43 #ifdef CompressibleFlow
46 if (
mesh_.thisDb().foundObject<volScalarField>(
"p_rgh"))
54 #ifdef IncompressibleFlow
63 const labelList& objFuncFaceSources,
64 const labelList& objFuncCellSources,
65 scalarList& objFuncFaceValues,
66 scalarList& objFuncCellValues,
89 forAll(objFuncFaceValues, idxI)
91 objFuncFaceValues[idxI] = 0.0;
96 const objectRegistry& db =
mesh_.thisDb();
97 const volVectorField&
U = db.lookupObject<volVectorField>(
"U");
99 const volVectorField::Boundary& UBf =
U.boundaryField();
100 const volScalarField::Boundary& rhoBf =
rho_.boundaryField();
102 forAll(objFuncFaceSources, idxI)
104 const label& objFuncFaceI = objFuncFaceSources[idxI];
109 vector US = UBf[patchI][faceI];
110 vector Sf =
mesh_.Sf().boundaryField()[patchI][faceI];
111 scalar rhoS = rhoBf[patchI][faceI];
112 scalar mfr = rhoS * (US & Sf);
113 objFuncFaceValues[idxI] = mfr *
scale_;
115 objFuncValue += objFuncFaceValues[idxI];
119 reduce(objFuncValue, sumOp<scalar>());