28 #include "BlendedInterfacialModel.H" 29 #include "dragModel.H" 30 #include "virtualMassModel.H" 31 #include "liftModel.H" 32 #include "wallLubricationModel.H" 33 #include "turbulentDispersionModel.H" 39 namespace functionObjects
49 Foam::functionObjects::phaseForces::dragForce()
const 51 tmp<volVectorField> tdragForce
58 mesh_.time().timeName(),
75 const phasePair& pair = iter();
77 if (pair.contains(phase_) && !pair.ordered())
79 const BlendedInterfacialModel<dragModel>& drag =
80 fluid_.lookupBlendedSubModel<dragModel>(pair);
82 dragForce += drag.K()*(pair.otherPhase(phase_).U() - phase_.U());
91 Foam::functionObjects::phaseForces::virtualMassForce()
const 93 tmp<volVectorField> tvirtualMassForce
100 mesh_.time().timeName(),
117 const phasePair& pair = iter();
119 if (pair.contains(phase_) && !pair.ordered())
121 const BlendedInterfacialModel<virtualMassModel>& virtualMass =
122 fluid_.lookupBlendedSubModel<virtualMassModel>(pair);
127 pair.otherPhase(phase_).DUDt()
133 return tvirtualMassForce;
138 Foam::functionObjects::phaseForces::liftForce()
const 140 tmp<volVectorField> tLiftForce
147 mesh_.time().timeName(),
164 const phasePair& pair = iter();
166 if (pair.contains(phase_) && !pair.ordered())
168 const BlendedInterfacialModel<liftModel>& lift =
169 fluid_.lookupBlendedSubModel<liftModel>(pair);
171 if (&pair.phase1() == &phase_)
173 liftForce += lift.F<
vector>();
177 liftForce -= lift.F<
vector>();
187 Foam::functionObjects::phaseForces::wallLubricationForce()
const 189 tmp<volVectorField> tWallLubricationForce
195 "wallLubricationForce",
196 mesh_.time().timeName(),
213 const phasePair& pair = iter();
215 if (pair.contains(phase_) && !pair.ordered())
217 const BlendedInterfacialModel<wallLubricationModel>&
219 fluid_.lookupBlendedSubModel<wallLubricationModel>(pair);
221 if (&pair.phase1() == &phase_)
223 wallLubricationForce += wallLubrication.F<
vector>();
227 wallLubricationForce -= wallLubrication.F<
vector>();
232 return tWallLubricationForce;
237 Foam::functionObjects::phaseForces::turbulentDispersionForce()
const 239 tmp<volVectorField> tturbulentDispersionForce
245 "turbulentDispersionForce",
246 mesh_.time().timeName(),
263 const phasePair& pair = iter();
265 if (pair.contains(phase_) && !pair.ordered())
267 const BlendedInterfacialModel<turbulentDispersionModel>&
268 turbulentDispersion = fluid_.lookupBlendedSubModel
270 turbulentDispersionModel
273 if (&pair.phase1() == &phase_)
275 turbulentDispersionForce += turbulentDispersion.F<
vector>();
279 turbulentDispersionForce -= turbulentDispersion.F<
vector>();
284 return tturbulentDispersionForce;
290 Foam::functionObjects::phaseForces::phaseForces
294 const dictionary&
dict 297 fvMeshFunctionObject(name, runTime, dict),
300 mesh_.lookupObject<phaseModel>
302 IOobject::groupName(
"alpha", dict.
lookup(
"phaseName"))
305 fluid_(mesh_.lookupObject<phaseSystem>(
"phaseProperties")),
310 IOobject::groupName(
"dragForce", phase_.name()),
323 IOobject::groupName(
"virtualMassForce", phase_.name()),
336 IOobject::groupName(
"liftForce", phase_.name()),
345 wallLubricationForce_
349 IOobject::groupName(
"wallLubricationForce", phase_.name()),
358 turbulentDispersionForce_
362 IOobject::groupName(
"turbulentDispersionForce", phase_.name()),
394 dragForce_ = dragForce();
395 virtualMassForce_ = virtualMassForce();
396 liftForce_ = liftForce();
397 wallLubricationForce_ = wallLubricationForce();
398 turbulentDispersionForce_ = turbulentDispersionForce();
407 virtualMassForce_.write();
409 wallLubricationForce_.write();
410 turbulentDispersionForce_.write();
virtual bool read(const dictionary &dict)
Read the input data.
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Vector< scalar > vector
A scalar version of the templated Vector.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
const dimensionSet dimVolume(pow3(dimLength))
bool read(const char *, int32_t &)
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual ~phaseForces()
Destructor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual bool execute()
Calculate the force fields.
const dimensionSet dimForce
word name(const complex &)
Return a string representation of a complex.
Internal & ref()
Return a reference to the dimensioned internal field.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
A class for managing temporary objects.
virtual bool write()
Write the force fields.
addToRunTimeSelectionTable(functionObject, add, dictionary)