32 template<
class ModelType>
35 const dictionary& dict,
36 const phaseInterface& interface
43 IOobject::groupName(typeName, interface.
name()),
51 PtrList<phaseInterface> interfaces;
52 PtrList<ModelType> models;
53 interface.fluid().generateInterfacialModels<ModelType, sidedPhaseInterface>
65 const sidedPhaseInterface&
interface =
66 refCast<const sidedPhaseInterface>(interfaces[i]);
68 if (interface_.index(interface.phase()) == 0)
70 modelInPhase1_.set(models.set(i,
nullptr).ptr());
74 modelInPhase2_.set(models.set(i,
nullptr).ptr());
82 template<
class ModelType>
89 template<
class ModelType>
97 template<
class ModelType>
100 const phaseModel& phase
104 interface_.index(phase) == 0
105 ? modelInPhase1_.valid()
106 : modelInPhase2_.valid();
110 template<
class ModelType>
113 const phaseModel& phase
116 if (!haveModelInThe(phase))
119 <<
"There is no " <<
type() <<
" active for the " 120 << phase.name() <<
" side of the " 121 << interface_.name() <<
" interface" 126 interface_.index(phase) == 0
132 template<
class ModelType>
135 const phaseModel& phase
138 if (!haveModelInThe(phase))
141 <<
"There is no " <<
type() <<
" active for the " 142 << phase.name() <<
" side of the " 143 << interface_.name() <<
" interface" 148 interface_.index(phase) == 0
154 template<
class ModelType>
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
SidedInterfacialModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
To & refCast(From &r)
Reference type cast template function.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
bool writeData(Ostream &os) const
Dummy write for regIOobject.
word name(const complex &)
Return a string representation of a complex.
bool haveModelInThe(const phaseModel &phase) const
Does a model exist in the given phase?
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const phaseInterface & interface() const
Access the interface.
~SidedInterfacialModel()
Destructor.
const ModelType & modelInThe(const phaseModel &phase) const
Access the model within the given phase.