39 namespace functionObjects
49 template<
class modelType>
53 const BlendedInterfacialModel<modelType>& model =
54 fluid_.lookupBlendedSubModel<modelType>(pair);
56 if (&pair.phase1() == &phase_)
58 return -model.template F<vector>();
62 return model.template F<vector>();
73 const dictionary& dict
76 fvMeshFunctionObject(name, runTime, dict),
79 mesh_.lookupObject<phaseModel>
81 IOobject::groupName(
"alpha", dict.
lookup(
"phase"))
84 fluid_(mesh_.lookupObject<phaseSystem>(
"phaseProperties"))
95 const phasePair& pair = pairIter();
97 if (pair.contains(phase_) && !pair.ordered())
99 if (fluid_.foundBlendedSubModel<dragModel>(pair))
109 mesh_.time().timeName(),
118 if (fluid_.foundBlendedSubModel<virtualMassModel>(pair))
122 virtualMassModel::typeName,
132 mesh_.time().timeName(),
141 if (fluid_.foundBlendedSubModel<liftModel>(pair))
151 mesh_.time().timeName(),
160 if (fluid_.foundBlendedSubModel<wallLubricationModel>(pair))
164 wallLubricationModel::typeName,
171 "wallLubricationForce",
174 mesh_.time().timeName(),
183 if (fluid_.foundBlendedSubModel<turbulentDispersionModel>(pair))
187 turbulentDispersionModel::typeName,
194 "turbulentDispersionForce",
197 mesh_.time().timeName(),
231 HashPtrTable<volVectorField>,
236 *forceFieldIter() =
Zero;
247 const phasePair& pair = pairIter();
249 if (pair.contains(phase_) && !pair.ordered())
251 if (fluid_.foundBlendedSubModel<dragModel>(pair))
253 *forceFields_[dragModel::typeName] +=
254 fluid_.lookupBlendedSubModel<dragModel>(pair).
K()
255 *(pair.otherPhase(phase_).U() - phase_.U());
258 if (fluid_.foundBlendedSubModel<virtualMassModel>(pair))
260 *forceFields_[virtualMassModel::typeName] +=
261 fluid_.lookupBlendedSubModel<virtualMassModel>(pair).
K()
262 *(pair.otherPhase(phase_).DUDt() - phase_.DUDt());
265 if (fluid_.foundBlendedSubModel<liftModel>(pair))
267 *forceFields_[liftModel::typeName] +=
268 nonDragForce<liftModel>(pair);
271 if (fluid_.foundBlendedSubModel<wallLubricationModel>(pair))
273 *forceFields_[wallLubricationModel::typeName] +=
274 nonDragForce<wallLubricationModel>(pair);
277 if (fluid_.foundBlendedSubModel<turbulentDispersionModel>(pair))
279 *forceFields_[turbulentDispersionModel::typeName] +=
280 nonDragForce<turbulentDispersionModel>(pair);
293 HashPtrTable<volVectorField>,
virtual bool read(const dictionary &dict)
Read the input data.
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
GeometricField< vector, fvPatchField, volMesh > volVectorField
CGAL::Exact_predicates_exact_constructions_kernel K
virtual bool read()
Read the transportProperties dictionary and update.
Macros for easy insertion into run-time selection tables.
dictionary()
Construct top-level dictionary null.
const dimensionSet dimVolume(pow3(dimLength))
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual ~phaseForces()
Destructor.
static word groupName(Name name, const word &group)
const word & name() const
Name function is needed to disambiguate those inherited.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual bool execute()
Calculate the force fields.
const dimensionSet dimForce
defineTypeNameAndDebug(Qdot, 0)
tmp< volVectorField > nonDragForce(const phasePair &key) const
Evaluate and return non-drag force.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
Write using given format, version and compression.
A class for managing temporary objects.
phaseForces(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
virtual bool write()
Write the force fields.