39 namespace functionObjects
53 const dictionary& dict
56 fvMeshFunctionObject(name, runTime, dict),
59 mesh_.lookupObject<phaseModel>
61 IOobject::groupName(
"alpha", dict.
lookup(
"phase"))
64 fluid_(mesh_.lookupObject<phaseSystem>(phaseSystem::propertiesName))
70 const phaseModel& otherPhase = fluid_.phases()[
phasei];
72 if (&otherPhase == &phase_)
continue;
74 const phaseInterface interface(phase_, otherPhase);
76 if (fluid_.foundInterfacialModel<blendedDragModel>(interface))
86 mesh_.time().timeName(),
95 if (fluid_.foundInterfacialModel<blendedVirtualMassModel>(interface))
99 virtualMassModel::typeName,
109 mesh_.time().timeName(),
118 if (fluid_.foundInterfacialModel<blendedLiftModel>(interface))
128 mesh_.time().timeName(),
139 fluid_.foundInterfacialModel
140 <blendedWallLubricationModel>(interface)
145 wallLubricationModel::typeName,
152 "wallLubricationForce",
155 mesh_.time().timeName(),
166 fluid_.foundInterfacialModel
167 <blendedTurbulentDispersionModel>(interface)
172 turbulentDispersionModel::typeName,
179 "turbulentDispersionForce",
182 mesh_.time().timeName(),
215 HashPtrTable<volVectorField>,
220 *forceFieldIter() =
Zero;
226 const phaseModel& otherPhase = fluid_.phases()[
phasei];
228 if (&otherPhase == &phase_)
continue;
230 const phaseInterface interface(phase_, otherPhase);
232 if (fluid_.foundInterfacialModel<blendedDragModel>(interface))
234 *forceFields_[dragModel::typeName] +=
235 fluid_.lookupInterfacialModel<blendedDragModel>(interface).
K()
236 *(otherPhase.U() - phase_.U());
239 if (fluid_.foundInterfacialModel<blendedVirtualMassModel>(interface))
241 *forceFields_[virtualMassModel::typeName] +=
242 fluid_.lookupInterfacialModel
243 <blendedVirtualMassModel>(interface).
K()
244 *(otherPhase.DUDt() - phase_.DUDt());
247 if (fluid_.foundInterfacialModel<blendedLiftModel>(interface))
249 *forceFields_[liftModel::typeName] +=
250 (&interface.phase1() == &phase_ ? -1 : +1)
251 *fluid_.lookupInterfacialModel<blendedLiftModel>(interface).F();
256 fluid_.foundInterfacialModel
257 <blendedWallLubricationModel>(interface)
260 *forceFields_[wallLubricationModel::typeName] +=
261 (&interface.phase1() == &phase_ ? -1 : +1)
262 *fluid_.lookupInterfacialModel
263 <blendedWallLubricationModel>(interface).F();
268 fluid_.foundInterfacialModel
269 <blendedTurbulentDispersionModel>(interface)
272 *forceFields_[turbulentDispersionModel::typeName] +=
273 fluid_.lookupInterfacialModel
274 <blendedTurbulentDispersionModel>(interface).D()
278 /
max(phase_ + otherPhase, otherPhase.residualAlpha())
291 HashPtrTable<volVectorField>,
296 writeObject(forceFieldIter()->
name());
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
virtual bool read(const dictionary &dict)
Read the input data.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
bool read(const char *, int32_t &)
stressControl lookup("compactNormalStress") >> compactNormalStress
Calculate the gradient of the given field.
virtual ~phaseForces()
Destructor.
static word groupName(Name name, const word &group)
const dimensionSet dimForce
virtual bool execute()
Calculate the force fields.
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
const dimensionSet dimVolume
phaseForces(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
virtual bool write()
Write the force fields.
const volScalarField & K() const