31 #include "surfaceInterpolate.H" 61 template<
class ModelType>
62 template<
class GeoField>
68 typename GeoField::Boundary& fieldBf =
field.boundaryFieldRef();
70 forAll(phase1_.phi()().boundaryField(), patchi)
74 isA<fixedValueFvsPatchScalarField>
76 phase1_.phi()().boundaryField()[patchi]
80 fieldBf[patchi] =
Zero;
86 template<
class ModelType>
90 template<
class>
class PatchField,
98 (ModelType::*method)(Args ...)
const,
110 if (model_ || model1In2_)
113 blendedInterfacialModel::interpolate<scalarGeoField>
115 blending_.f1(phase1_, phase2_)
119 if (model_ || model2In1_)
122 blendedInterfacialModel::interpolate<scalarGeoField>
124 blending_.f2(phase1_, phase2_)
130 IOobject::scopedName(ModelType::typeName,
name),
131 IOobject::NO_REGISTER,
141 <<
"Cannot treat an interfacial model with no distinction " 142 <<
"between continuous and dispersed phases as signed" 146 x.ref() += (model_().*method)(
args ...)*(scalar(1) - f1() - f2());
151 x.ref() += (model1In2_().*method)(
args ...)*f1;
171 && (model_ || model1In2_ || model2In1_)
174 correctFixedFluxBCs(
x.ref());
183 template<
class ModelType>
192 const bool correctFixedFluxBCs
208 model1In2_(model1In2),
209 model2In1_(model2In1),
210 correctFixedFluxBCs_(correctFixedFluxBCs)
214 template<
class ModelType>
222 const bool correctFixedFluxBCs
237 correctFixedFluxBCs_(correctFixedFluxBCs)
239 if (modelTable.
found(pair))
251 if (modelTable.
found(pair1In2))
257 modelTable[pair1In2],
263 if (modelTable.
found(pair2In1))
269 modelTable[pair2In1],
279 template<
class ModelType>
286 template<
class ModelType>
289 const class phaseModel& phase
299 template<
class ModelType>
305 return &
phase == &(phase1_) ? model1In2_ : model2In1_;
309 template<
class ModelType>
315 return evaluate(
k,
"K", ModelType::dimK,
false);
319 template<
class ModelType>
325 return evaluate(
k,
"K", ModelType::dimK,
false, residualAlpha);
329 template<
class ModelType>
333 return evaluate(&ModelType::Kf,
"Kf", ModelType::dimK,
false);
337 template<
class ModelType>
346 template<
class ModelType>
354 template<
class ModelType>
362 template<
class ModelType>
366 return evaluate(&ModelType::dmdt,
"dmdt", ModelType::dimDmdt,
false);
370 template<
class ModelType>
bool hasModel(const phaseModel &phase) const
Return true if a model is specified for the supplied phase.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const ModelType & model(const phaseModel &phase) const
Return the model for the supplied phase.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool found(const Key &key) const
Same as contains()
~BlendedInterfacialModel()
Destructor.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
tmp< volScalarField > K() const
Return the blended force coefficient.
Generic GeometricField class.
label k
Boltzmann constant.
Generic dimensioned Type class.
tmp< surfaceScalarField > Ff() const
Return the face blended force.
tmp< GeometricField< Type, fvPatchField, volMesh > > F() const
Return the blended force.
CGAL::Exact_predicates_exact_constructions_kernel K
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define forAll(list, i)
Loop across all elements in list.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
static tmp< GeoField > interpolate(tmp< volScalarField > f)
Convenience function to interpolate blending values. Needs to be.
volVectorField F(fluid.F())
A HashTable similar to std::unordered_map.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< surfaceScalarField > Kf() const
Return the face blended force coefficient.
tmp< volScalarField > D() const
Return the blended diffusivity.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
const dimensionedScalar & D
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
A class for managing temporary objects.
surfaceScalarField Ff(fluid.Ff())
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
const dimensionSet dimArea(sqr(dimLength))
tmp< volScalarField > dmdt() const
Return the blended mass transfer rate.
static constexpr const zero Zero
Global zero (0)