45 auto add = [&](
const word& sidePhaseName)
47 const word nameSidePhaseName =
50 if (!this->
found(nameSidePhaseName))
return;
72 dict.add(keyword, wlats[i].t);
100 template<
class ModelType>
107 if (i0 != word::npos)
110 if (i1 != word::npos)
117 if (
name(
name.size() - 5, 5) ==
"Model")
126 template<
class ModelType,
class ... InterfaceTypes>
150 && isA<InterfaceTypes>(modelInterfacePtr())
156 refCast<InterfaceTypes>(modelInterfacePtr())
163 if (!interfacePtr.
valid())
166 <<
"Interface " << modelInterfacePtr->name()
167 <<
" is not of suitable type for construction of a "
168 << ModelType::typeName
181 const word name = interfacePtr->name();
191 dicts[names[
name]].add
193 modelInterfacePtr->name(),
206 template<
class ModelType>
221 generateInterfacialModels<ModelType, phaseInterface>
224 NullObjectRef<phaseInterface>(),
232 models.insert(listInterfaces[i], listModels.
set(i,
nullptr));
237 template<
class ModelType>
248 generateInterfacialModels
250 interfacialDict<dictionary>(modelName<ModelType>()),
256 template<
class ValueType>
270 values.
insert(interfacePtr(), value);
275 template<
class ValueType>
282 generateInterfacialValues(interfacialDict<ValueType>(
valueName), values);
286 template<
class ModelType>
292 if (
dict.size() != 1)
295 <<
"Too many matching entries for construction of a "
296 << ModelType::typeName <<
nl <<
dict.
toc()
303 <<
"Non-sub-dictionary entries found for specification of a "
304 << ModelType::typeName
312 template<
class ModelType>
321 <<
"A " << ModelType::typeName <<
" was specified for pair "
322 << interface.
name() <<
", but one of these phases is stationary. "
323 <<
"Mass transfer is not supported on stationary phases"
329 template<
class ModelType>
336 mesh().foundObject<ModelType>
343 template<
class ModelType>
350 mesh().lookupObject<ModelType>
graph_traits< Graph >::vertices_size_type size_type
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
An STL-conforming hash table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
static word groupName(Name name, const word &group)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void append(T *)
Append an element at the end of the list.
T * first()
Return the first entry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
bool empty() const
Return true if the autoPtr is empty (ie, no pointer set)
T * ptr()
Return object pointer for reuse.
void set(T *)
Set pointer to that given.
const fileName & name() const
Return the dictionary name.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
wordList toc() const
Return the table of contents.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A wordList with hashed indices for faster lookup by name.
bool found(const word &) const
Does the list contain the specified name.
void append(const word &)
Append an element at the end of the list.
Traits class for primitives.
Word-pair based class used for keying interface models in hash tables.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
static word oldNamePartsToName(const phaseSystem &fluid, const wordList &oldNameParts)
Convert old-format interface name parts to an interface name. Used.
virtual word name() const
Name.
static autoPtr< phaseInterface > New(const phaseSystem &fluid, const word &name)
Select given fluid and name.
const phaseModel & phase1() const
Return phase 1.
const phaseModel & phase2() const
Return phase 2.
virtual bool stationary() const =0
Return whether the phase is stationary.
dictionary interfacialDict(const word &name) const
Return the dictionary containing interfacial model or value.
bool foundInterfacialModel(const phaseInterface &interface) const
Check availability of a sub model for a given interface.
void validateMassTransfer(const phaseInterface &interface) const
Check that mass transfer is supported across the given interface.
void generateInterfacialModels(const dictionary &dict, const phaseInterface &interface, PtrList< phaseInterface > &interfaces, PtrList< ModelType > &models) const
Generate interfacial-model lists.
const phaseModelList & phases() const
Return the phase models.
word modelName() const
Return the model name. This is the same as the model's typename.
void generateInterfacialValues(const dictionary &dict, HashTable< ValueType, phaseInterfaceKey, phaseInterfaceKey::hash > &values) const
Generate interfacial-model tables.
static const dictionary & modelSubDict(const dictionary &dict)
Return the dictionary from which to construct a low-level.
const ModelType & lookupInterfacialModel(const phaseInterface &interface) const
Return a sub model for an interface.
static word separator()
Return the separator that delimits this interface's name.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
word valueName(const direction argument)
Return the name of the value entry for the given argument.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
word name(const bool)
Return a word representation of a bool.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.