Go to the documentation of this file.
31 #include "BlendedInterfacialModel.H"
32 #include "virtualMassModel.H"
33 #include "heatTransferModel.H"
34 #include "liftModel.H"
35 #include "wallLubricationModel.H"
36 #include "turbulentDispersionModel.H"
38 #include "surfaceInterpolate.H"
49 #include "blendingMethod.H"
66 mesh.time().constant(),
68 IOobject::MUST_READ_IF_MODIFIED,
79 this->get<wordList>(
"phases")[0]
86 this->get<wordList>(
"phases")[1]
94 mesh.time().timeName(),
107 mesh.time().timeName(),
109 IOobject::READ_IF_PRESENT,
116 phase2_.volScalarField::operator=(scalar(1) - phase1_);
122 blendingMethods_.insert
128 this->get<wordList>(
"phases")
183 blendingMethods_.found(
"drag")
184 ? blendingMethods_[
"drag"]
185 : blendingMethods_[
"default"]
200 blendingMethods_.found(
"virtualMass")
201 ? blendingMethods_[
"virtualMass"]
202 : blendingMethods_[
"default"]
216 blendingMethods_.found(
"heatTransfer")
217 ? blendingMethods_[
"heatTransfer"]
218 : blendingMethods_[
"default"]
232 blendingMethods_.found(
"lift")
233 ? blendingMethods_[
"lift"]
234 : blendingMethods_[
"default"]
242 wallLubrication_.reset
246 lookup(
"wallLubrication"),
248 blendingMethods_.found(
"wallLubrication")
249 ? blendingMethods_[
"wallLubrication"]
250 : blendingMethods_[
"default"]
258 turbulentDispersion_.reset
262 lookup(
"turbulentDispersion"),
264 blendingMethods_.found(
"turbulentDispersion")
265 ? blendingMethods_[
"turbulentDispersion"]
266 : blendingMethods_[
"default"]
286 return phase1_*phase1_.thermo().rho() + phase2_*phase2_.thermo().rho();
292 return phase1_*phase1_.U() + phase2_*phase2_.U();
318 return virtualMass_->K();
324 return virtualMass_->Kf();
330 return heatTransfer_->K();
336 return lift_->F<
vector>() + wallLubrication_->F<
vector>();
342 return lift_->Ff() + wallLubrication_->Ff();
348 return turbulentDispersion_->D();
370 word alphaScheme(
"div(phi," +
alpha1.name() +
')');
381 if (pPrimeByA_.valid())
424 if (dgdt_[celli] > 0.0)
426 Sp[celli] -= dgdt_[celli]/
max(1.0 -
alpha1[celli], 1
e-4);
427 Su[celli] += dgdt_[celli]/
max(1.0 -
alpha1[celli], 1
e-4);
429 else if (dgdt_[celli] < 0.0)
451 phase1_.correctInflowOutflow(alphaPhic1);
458 !(++alphaSubCycle).
end();
469 (alphaSubCycle.index()*
Sp)(),
470 (
Su - (alphaSubCycle.index() - 1)*
Sp*
alpha1)(),
471 UniformField<scalar>(phase1_.alphaMax()),
475 if (alphaSubCycle.index() == 1)
477 phase1_.alphaPhi() = alphaPhic10;
481 phase1_.alphaPhi() += alphaPhic10;
497 UniformField<scalar>(phase1_.alphaMax()),
501 phase1_.alphaPhi() = alphaPhic1;
504 if (pPrimeByA_.valid())
515 phase1_.alphaPhi() += alpha1Eqn.flux();
518 phase1_.alphaRhoPhi() =
521 phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
522 phase2_.correctInflowOutflow(phase2_.alphaPhi());
523 phase2_.alphaRhoPhi() =
527 <<
alpha1.weightedAverage(mesh_.V()).value()
550 phase1_.turbulence().correct();
551 phase2_.turbulence().correct();
561 readOK &= phase1_.read(*
this);
562 readOK &= phase2_.read(*
this);
575 return pair_->sigma();
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
tmp< volVectorField > F() const
Return the combined force (lift + wall-lubrication)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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...
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const volScalarField & alpha2
surfaceScalarField & phi1
const word dictName("faMeshDefinition")
Calculate the snGrad of the given volField.
void correct()
Correct two-phase properties other than turbulence.
static word timeName(const scalar t, const int precision=precision_)
tmp< volScalarField > D() const
Return the turbulent diffusivity.
virtual bool read()
Read object.
tmp< volScalarField > sigma() const
Return the surface tension coefficient.
Calculate the divergence of the given field.
tmp< volVectorField > U() const
Return the mixture velocity.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const volScalarField & alpha1
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
tmp< surfaceScalarField > Ff() const
Return the combined face-force (lift + wall-lubrication)
word alpharScheme("div(phirb,alpha)")
surfaceScalarField & phi2
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAll(list, i)
Loop across all elements in list.
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
Calculate the curl of the given volField by constructing the Hodge-dual of the symmetric part of the ...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
fvMatrix< scalar > fvScalarMatrix
tmp< volScalarField > Vm() const
Return the virtual mass coefficient.
messageStream Info
Information stream (stdout output on master, null elsewhere)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
Calculate the matrix for the laplacian of the field.
tmp< surfaceScalarField > Kdf() const
Return the face drag coefficient.
tmp< surfaceScalarField > Vmf() const
Return the face virtual mass coefficient.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual void solve()
Solve for the phase fractions.
Lookup type of boundary radiation properties.
tmp< volScalarField > Kh() const
Return the heat transfer coefficient.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
twoPhaseSystem(const fvMesh &)
Construct from fvMesh.
Mesh data needed to do the Finite Volume discretisation.
const uniformDimensionedVectorField & g
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.
void correctBoundaryConditions()
Correct boundary field.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
bool read()
Read base phaseProperties dictionary.
Calculate the face-flux of the given field.
const dimensionedScalar e
Elementary charge.
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
void correctTurbulence()
Correct two-phase turbulence.
Calculate the first temporal derivative.
virtual ~twoPhaseSystem()
Destructor.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< volScalarField > Kd() const
Return the drag coefficient.
MULES: Multidimensional universal limiter for explicit solution.
const Time & time() const noexcept
Return time registry.
tmp< volScalarField > rho() const
Return the mixture density.
Calculate the matrix for the first temporal derivative.
const dimensionSet dimless
Dimensionless.