Go to the documentation of this file.
28 #include "BlendedInterfacialModel.H"
32 template<
class modelType>
61 template<
class modelType>
64 const word& modelName,
75 generatePairs(modelDicts);
77 createSubModels(modelDicts, models);
81 template<
class modelType>
84 const word& modelName,
91 const bool correctFixedFluxBCs
98 modelTypeTable tempModels;
99 generatePairsAndSubModels(modelName, tempModels);
103 blendingMethods_.found(modelName)
104 ? blendingMethods_[modelName]
105 : blendingMethods_.found(member(modelName))
106 ? blendingMethods_[member(modelName)]
107 : blendingMethods_[
"default"]
119 const phasePairKey key(iter.key().first(), iter.key().second());
120 const phasePairKey key1In2(key.first(), key.second(),
true);
121 const phasePairKey key2In1(key.second(), key.first(),
true);
130 phaseModels_[key.first()],
131 phaseModels_[key.second()],
133 tempModels.found(key ) ? tempModels[key ] : noModel,
134 tempModels.found(key1In2) ? tempModels[key1In2] : noModel,
135 tempModels.found(key2In1) ? tempModels[key2In1] : noModel,
141 if (!phasePairs_.found(key))
150 phaseModels_[key.first()],
151 phaseModels_[key.second()]
160 template<
class modelType>
163 const word& modelName,
170 const bool correctFixedFluxBCs
181 modelTypeTable tempModels;
182 generatePairsAndSubModels
184 IOobject::groupName(modelName,
phase.
name()),
189 forAllIter(
typename modelTypeTable, tempModels, tempModelIter)
193 if (!models.found(key))
202 const phasePair& pair = phasePairs_[key];
207 <<
"A two-sided " << modelType::typeName <<
" was "
208 <<
"specified for the " <<
phase.
name() <<
" side of the "
209 << pair <<
" pair, but that phase is not part of that pair."
213 models[key][pair.
index(
phase)].set(tempModelIter().ptr());
219 template<
class GeoField>
223 const word& fieldName,
239 IOobject::groupName(fieldName,
phase.
name()),
247 template<
class GeoField>
251 const word& fieldName,
252 const GeoField&
field,
260 template<
class GeoField>
264 const word& fieldName,
280 IOobject::groupName(fieldName,
phase.
name()),
288 template<
class GeoField>
292 const word& fieldName,
293 const GeoField&
field,
303 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
328 this->mesh_.time().timeName(),
339 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
364 this->mesh_.time().timeName(),
375 template<
class modelType>
413 template<
class modelType>
433 template<
class modelType>
444 template<
class modelType>
455 template<
class modelType>
487 template<
class modelType>
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
virtual word otherName() const
Other pair name.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object.
A class for handling words, derived from Foam::string.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
A class for managing temporary objects.
Ordered or unordered hashing of word pair.
void fillFields(const word &name, const dimensionSet &dims, PtrList< GeometricField< Type, PatchField, GeoMesh >> &fieldList) const
Fill up gaps in a phase-indexed list of fields with zeros.
void createSubModels(const dictTable &modelDicts, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
void addField(const phaseModel &phase, const word &fieldName, tmp< GeoField > field, PtrList< GeoField > &fieldList) const
Add the field to a phase-indexed list, with the given name,.
label index(const phaseModel &phase) const
Return the index of the given phase. Generates a FatalError if.
const modelType & lookupSubModel(const phasePair &key) const
Return a sub model between a phase pair.
Dimension set for the base types.
const word & name() const
Name function is needed to disambiguate those inherited.
bool foundSubModel(const phasePair &key) const
Check availability of a sub model for a given phase pair.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAll(list, i)
Loop across all elements in list.
bool set(const Key &key, T *ptr)
Assign a new entry, overwriting existing entries.
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
word name(const complex &c)
Return string representation of complex.
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const Type & lookupObject(const word &name, const bool recursive=false) const
const BlendedInterfacialModel< modelType > & lookupBlendedSubModel(const phasePair &key) const
Return a blended sub model between a phase pair.
bool contains(const phaseModel &phase) const
Return true if this phasePair contains the given phase.
Generic dimensioned Type class.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
const T * set(const label i) const
Return const pointer to element (if set) or nullptr.
bool ordered() const
Return the ordered flag.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fvMesh & mesh() const
Return the mesh.
const word & name() const
A HashTable similar to std::unordered_map.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An ordered pair of two objects of type <T> with first() and second() elements.
A HashTable of pointers to objects of type <T>.
Traits class for primitives.
static word groupName(StringType name, const word &group)
Create dot-delimited name.group.
virtual word name() const
Pair name.
bool foundBlendedSubModel(const phasePair &key) const
Check availability of a blended sub model for a given phase pair.
Generic GeometricField class.