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(),
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() +
')');
379 tmp<surfaceScalarField> alpha1alpha2f;
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() =
550 phase1_.turbulence().correct();
551 phase2_.turbulence().correct();
561 readOK &= phase1_.read(*
this);
562 readOK &= phase2_.read(*
this);
575 return pair_->sigma();
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual ~twoPhaseSystem()
Destructor.
word dictName() const
The local dictionary name (final part of scoped name)
phaseModel & phase1_
Phase model 1.
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. ...
tmp< volScalarField > Kd() const
Return the drag coefficient.
fvMatrix< scalar > fvScalarMatrix
tmp< volVectorField > F() const
Return the combined force (lift + wall-lubrication)
tmp< volVectorField > U() const
Return the mixture velocity.
void correct()
Correct two-phase properties other than turbulence.
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< volScalarField > rho() const
Return the mixture density.
tmp< surfaceScalarField > Ff() const
Return the combined face-force (lift + wall-lubrication)
bool found(const Key &key) const
True if hashed key is found in table.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
const word & name() const noexcept
Return the object name.
tmp< volScalarField > sigma() const
Return the surface tension coefficient.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
word alpharScheme("div(phirb,alpha)")
Ostream & endl(Ostream &os)
Add newline and flush stream.
Calculate the matrix for the laplacian of the field.
Calculate the snGrad of the given volField.
const volScalarField & alpha2
const dimensionSet dimless
Dimensionless.
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.
surfaceScalarField & phi1
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
tmp< volScalarField > D() const
Return the turbulent diffusivity.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void solve()
Solve for the phase fractions.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Calculate the first temporal derivative.
tmp< surfaceScalarField > Vmf() const
Return the face virtual mass coefficient.
const dimensionedScalar e
Elementary charge.
phaseModel & phase2_
Phase model 2.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
Calculate the curl of the given volField by constructing the Hodge-dual of the symmetric part of the ...
const Time & time() const noexcept
Return time registry.
Calculate the face-flux of the given field.
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
tmp< volScalarField > Vm() const
Return the virtual mass coefficient.
twoPhaseSystem(const fvMesh &)
Construct from fvMesh.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
surfaceScalarField & phi2
bool read()
Read base phaseProperties dictionary.
Calculate the divergence of the given field.
const uniformDimensionedVectorField & g
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
tmp< volScalarField > Kh() const
Return the heat transfer coefficient.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
tmp< surfaceScalarField > Kdf() const
Return the face drag coefficient.
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 correctTurbulence()
Correct two-phase turbulence.
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
MULES: Multidimensional universal limiter for explicit solution.
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &weightField) const
Calculate and return weighted average.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
void explicitSolve(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su)
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< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static constexpr const zero Zero
Global zero (0)
const volScalarField & alpha1