56 return ras.devRhoReff();
63 return rho()*ras.devReff();
67 const compressible::LESModel& les =
70 return les.devRhoBeff();
74 const incompressible::LESModel& les
77 return rho()*les.devBeff();
95 (
"transportProperties");
115 <<
"No valid model for viscous stress calculation."
125 if (rhoName_ ==
"rhoInf")
127 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
159 if (rhoName_ !=
"rhoInf")
162 <<
"Dynamic pressure is expected but kinematic is provided."
178 const bool loadFromFiles
189 directForceDensity_(
false),
197 if (!isA<fvMesh>(obr_))
202 "Foam::forces::forces"
205 "const objectRegistry&, "
206 "const dictionary&, "
209 ) <<
"No fvMesh available, deactivating."
231 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
236 dict.
readIfPresent(
"directForceDensity", directForceDensity_);
238 if (directForceDensity_)
250 WarningIn(
"void forces::read(const dictionary& dict)")
251 <<
"Could not find " << fDName_ <<
" in database." <<
nl
252 <<
" De-activating forces."
277 WarningIn(
"void forces::read(const dictionary& dict)")
278 <<
"Could not find " << UName_ <<
", " << pName_;
280 if (rhoName_ !=
"rhoInf")
282 Info<<
" or " << rhoName_;
285 Info<<
" in database." <<
nl <<
" De-activating forces."
297 CofR_ = dict.
lookup(
"CofR");
305 if (forcesFilePtr_.empty())
309 Info<<
"Creating forces file." <<
endl;
317 obr_.time().timeName(obr_.time().startTime().value());
323 forcesDir = obr_.time().
path()/
".."/name_/startTimeName;
327 forcesDir = obr_.time().
path()/name_/startTimeName;
334 forcesFilePtr_.reset(
new OFstream(forcesDir/(
type() +
".dat")));
345 if (forcesFilePtr_.valid())
349 <<
"forces(pressure, viscous) moment(pressure, viscous)"
378 forcesFilePtr_() << obr_.time().value() <<
tab << fm <<
endl;
382 Info<<
"forces output:" <<
nl
383 <<
" forces(pressure, viscous)" << fm.
first() <<
nl
384 <<
" moment(pressure, viscous)" << fm.
second() <<
nl
400 if (directForceDensity_)
407 mesh.Sf().boundaryField();
411 label
patchi = iter.key();
442 mesh.Sf().boundaryField();
445 const volSymmTensorField::GeometricBoundaryField& devRhoReffb
446 = tdevRhoReff().boundaryField();
449 scalar pRef = pRef_/
rho(p);
453 label
patchi = iter.key();