61 const label s = i == 0 ? -1 : +1;
66 <<
"Blending parameter " <<
name <<
" is "
67 << (i == 0 ?
"less" :
"greater") <<
" than "
76 <<
"wrong token type - expected Scalar or the word 'none', found "
98 readParameter(name1,
dict, bounds, allowNone),
99 readParameter(name2,
dict, bounds, allowNone)
116 alphas.
first().mesh(),
133 if (0b01 << iter.index() & set)
137 ?
max(iter().residualAlpha(), alphas[iter().index()])()
138 : alphas[iter().index()];
157 if (0b01 << iter.index() & set)
159 talphaParameter.
ref() +=
160 max(iter().residualAlpha(), alphas[iter().index()])
161 *parameters[iter.index()].value;
165 return talphaParameter/
alpha(alphas, set,
true);
172 const label phaseSet,
173 const label systemSet
178 ?
alpha(alphas, phaseSet,
false)
179 :
alpha(alphas, phaseSet,
true)/
alpha(alphas, systemSet,
true);
186 const label phaseSet,
187 const label systemSet
190 label canBeContinuousPhaseSet = 0b00;
191 label canBeContinuousSystemSet = 0b00;
194 if (canBeContinuous(iter.index()))
196 canBeContinuousPhaseSet += 0b01 << iter.index() & phaseSet;
197 canBeContinuousSystemSet += 0b01 << iter.index() & systemSet;
201 if (canBeContinuousPhaseSet == 0)
203 return constant(alphas, 0);
206 if (canBeContinuousPhaseSet == canBeContinuousSystemSet)
208 return constant(alphas, 1);
215 canBeContinuousPhaseSet,
216 canBeContinuousSystemSet
229 interface_(interface)
246 return f(alphas, 0b10, 0b11);
255 return f(alphas, 0b01, 0b11);
264 return 1 -
f(alphas, 0b11, 0b00);
#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.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
static word groupName(Name name, const word &group)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
T & first()
Return reference to the first element of the list.
Abstract base class for functions that are used to combine interfacial sub-models according to the vo...
virtual ~blendingMethod()
Destructor.
tmp< volScalarField > x(const UPtrList< const volScalarField > &alphas, const label phaseSet, const label systemSet) const
Return the coordinate of the blending function.
tmp< volScalarField > f1DispersedIn2(const UPtrList< const volScalarField > &alphas) const
Return the coefficient for models in which phase 1 is dispersed in.
tmp< volScalarField > parameter(const UPtrList< const volScalarField > &alphas, const label set, const Pair< blendingParameter > ¶meters) const
Get a blending parameter averaged for the given set.
blendingMethod(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
static blendingParameter readParameter(const word &name, const dictionary &dict, const Pair< scalar > &bounds, const bool allowNone)
Read a parameter and check it lies within specified bounds.
tmp< volScalarField > f2DispersedIn1(const UPtrList< const volScalarField > &alphas) const
Return the coefficient for models in which phase 2 is dispersed in.
tmp< volScalarField > alpha(const UPtrList< const volScalarField > &alphas, const label set, const bool protect) const
Get the volume fraction of the given set.
tmp< volScalarField > constant(const UPtrList< const volScalarField > &alphas, const scalar k) const
Return a constant field with the given value.
virtual tmp< volScalarField > f(const UPtrList< const volScalarField > &alphas, const label phaseSet, const label systemSet) const
Evaluate the blending function. Filters out phases that cannot.
static Pair< blendingParameter > readParameters(const word &name, const dictionary &dict, const phaseInterface &interface, const Pair< scalar > &bounds, const bool allowNone)
Read a parameter for each phase in the interface.
tmp< volScalarField > fDisplaced(const UPtrList< const volScalarField > &alphas) const
Return the coefficient for when the interface is displaced by a.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Class to represent an interface between phases. Derivations can further specify the configuration of ...
const phaseModel & phase1() const
Return phase 1.
const phaseModel & phase2() const
Return phase 2.
const word & name() const
Return the name of this phase.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A token holds items read from Istream.
InfoProxy< token > info() const
Return info proxy.
const word & wordToken() const
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)