30#include "BlendedInterfacialModel.H"
32#include "virtualMassModel.H"
34#include "wallLubricationModel.H"
35#include "turbulentDispersionModel.H"
51template<
class modelType>
53Foam::functionObjects::phaseForces::nonDragForce(
const phasePair& pair)
const
56 fluid_.lookupBlendedSubModel<modelType>(pair);
58 if (&pair.
phase1() == &phase_)
71Foam::functionObjects::phaseForces::phaseForces
81 mesh_.lookupObject<phaseModel>
83 IOobject::groupName(
"alpha",
dict.
get<word>(
"phase"))
86 fluid_(mesh_.lookupObject<phaseSystem>(
"phaseProperties"))
97 const phasePair& pair = iter();
99 if (pair.contains(phase_) && !pair.ordered())
101 if (fluid_.foundBlendedSubModel<dragModel>(pair))
111 mesh_.time().timeName(),
120 if (fluid_.foundBlendedSubModel<virtualMassModel>(pair))
124 virtualMassModel::typeName,
134 mesh_.time().timeName(),
143 if (fluid_.foundBlendedSubModel<liftModel>(pair))
153 mesh_.time().timeName(),
162 if (fluid_.foundBlendedSubModel<wallLubricationModel>(pair))
166 wallLubricationModel::typeName,
173 "wallLubricationForce",
176 mesh_.time().timeName(),
185 if (fluid_.foundBlendedSubModel<turbulentDispersionModel>(pair))
189 turbulentDispersionModel::typeName,
196 "turbulentDispersionForce",
199 mesh_.time().timeName(),
214Foam::functionObjects::phaseForces::~phaseForces()
220bool Foam::functionObjects::phaseForces::read(
const dictionary&
dict)
222 fvMeshFunctionObject::read(
dict);
228bool Foam::functionObjects::phaseForces::execute()
251 if (pair.contains(phase_) && !pair.ordered())
253 if (
type ==
"dragModel")
256 fluid_.lookupBlendedSubModel<
dragModel>(pair).
K()
257 *(pair.otherPhase(phase_).
U() - phase_.U());
260 if (
type ==
"virtualMassModel")
265 pair.otherPhase(phase_).DUDt()
270 if (
type ==
"liftModel")
272 force = nonDragForce<liftModel>(pair);
275 if (
type ==
"wallLubricationModel")
277 force = nonDragForce<wallLubricationModel>(pair);
280 if (
type ==
"turbulentDispersionModel")
282 force = nonDragForce<turbulentDispersionModel>(pair);
292bool Foam::functionObjects::phaseForces::write()
301 writeObject(iter()->
name());
CGAL::Exact_predicates_exact_constructions_kernel K
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
const multiphaseInter::phaseModel & phase1() const
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
volVectorField F(fluid.F())
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
GeometricField< vector, fvPatchField, volMesh > volVectorField
bool read(const char *buf, int32_t &val)
Same as readInt32.
const dimensionSet dimForce
const dimensionSet dimVolume(pow3(dimLength))
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.