31#include "BlendedInterfacialModel.H"
32#include "virtualMassModel.H"
33#include "heatTransferModel.H"
35#include "wallLubricationModel.H"
36#include "turbulentDispersionModel.H"
38#include "surfaceInterpolate.H"
49#include "blendingMethod.H"
122 blendingMethods_.insert
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"]
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();
368 word alphaScheme(
"div(phi," +
alpha1.name() +
')');
371 alpha1.correctBoundaryConditions();
377 tmp<surfaceScalarField> alpha1alpha2f;
379 if (pPrimeByA_.valid())
397 mesh_.newIOobject(
"Sp"),
404 mesh_.newIOobject(
"Su"),
412 if (dgdt_[celli] > 0.0)
414 Sp[celli] -= dgdt_[celli]/
max(1.0 -
alpha1[celli], 1
e-4);
415 Su[celli] += dgdt_[celli]/
max(1.0 -
alpha1[celli], 1
e-4);
417 else if (dgdt_[celli] < 0.0)
439 phase1_.correctInflowOutflow(alphaPhic1);
446 !(++alphaSubCycle).
end();
457 (alphaSubCycle.index()*
Sp)(),
458 (
Su - (alphaSubCycle.index() - 1)*
Sp*
alpha1)(),
463 if (alphaSubCycle.index() == 1)
465 phase1_.alphaPhi() = alphaPhic10;
469 phase1_.alphaPhi() += alphaPhic10;
489 phase1_.alphaPhi() = alphaPhic1;
492 if (pPrimeByA_.valid())
503 phase1_.alphaPhi() += alpha1Eqn.flux();
506 phase1_.alphaRhoPhi() =
509 phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
510 phase2_.correctInflowOutflow(phase2_.alphaPhi());
511 phase2_.alphaRhoPhi() =
537 phase1_.turbulence().correct();
538 phase2_.turbulence().correct();
548 readOK &= phase1_.read(*
this);
549 readOK &= phase2_.read(*
this);
562 return pair_->sigma();
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
MULES: Multidimensional universal limiter for explicit solution.
const uniformDimensionedVectorField & g
const volScalarField & alpha1
surfaceScalarField & phi2
const volScalarField & alpha2
surfaceScalarField & phi1
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &weights, const label comm=UPstream::worldComm) const
Return the global weighted average.
DimensionedField< scalar, volMesh > Internal
void clamp_range(const dimensioned< MinMax< Type > > &range)
Clamp field values (in-place) to the specified range.
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const word & name() const noexcept
Return the object name.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return an entry data stream. FatalIOError if not found, or not a stream.
word dictName() const
The local dictionary name (final part of scoped name).
Mesh data needed to do the Finite Volume discretisation.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
HashTable< scalar, phasePairKey, phasePairKey::hash > scalarTable
Scalar hash table.
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
Dictionary hash table.
virtual bool read()
Read object.
bool end() const
Return true if the number of sub-cycles has been reached.
Perform a subCycleTime on a field.
A class for managing temporary objects.
tmp< surfaceScalarField > Ff() const
Return the combined face-force (lift + wall-lubrication).
tmp< volVectorField > F() const
Return the combined force (lift + wall-lubrication).
tmp< volScalarField > D() const
Return the turbulent diffusivity.
tmp< volScalarField > Kd() const
Return the drag coefficient.
void correct()
Correct two-phase properties other than turbulence.
virtual ~twoPhaseSystem()
Destructor.
phaseModel & phase1_
Phase model 1.
tmp< surfaceScalarField > Kdf() const
Return the face drag coefficient.
tmp< surfaceScalarField > Vmf() const
Return the face virtual mass coefficient.
tmp< volVectorField > U() const
Return the mixture velocity.
phaseModel & phase2_
Phase model 2.
void correctTurbulence()
Correct two-phase turbulence.
const fvMesh & mesh() const
Return the mesh.
tmp< volScalarField > sigma() const
Return the surface tension coefficient.
tmp< volScalarField > rho() const
Return the mixture density.
twoPhaseSystem(const fvMesh &)
Construct from fvMesh.
tmp< volScalarField > Kh() const
Return the heat transfer coefficient.
virtual void solve()
Solve for the phase fractions.
bool read()
Read base phaseProperties dictionary.
tmp< volScalarField > Vm() const
Return the virtual mass coefficient.
A class for handling words, derived from Foam::string.
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
word alpharScheme("div(phirb,alpha)")
Calculate the curl of the given volField by constructing the Hodge-dual of the symmetric part of the ...
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the face-flux of the given field.
Calculate the snGrad of the given volField.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the laplacian of the field.
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
Different types of constants.
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< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
List< word > wordList
List of word.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
fvMatrix< scalar > fvScalarMatrix
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0).
void Sp(fvMatrix< typename Expr::value_type > &m, const Expr2 &mult, const Expr &expression)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void Su(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.