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"
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();
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();
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 > &weightField) const
Calculate and return weighted average.
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
void correctBoundaryConditions()
Correct boundary field.
bool found(const Key &key) const
Return true if hashed entry is found in table.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
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
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
word dictName() const
The local dictionary name (final part of scoped name)
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const noexcept
Return time registry.
constant condensation/saturation model.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Lookup type of boundary radiation properties.
virtual bool read()
Read object.
A class for managing temporary objects.
Class which solves the volume fraction equations for two phases.
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.
tmp< volScalarField > sigma() const
Return the surface tension coefficient.
tmp< volScalarField > rho() const
Return the mixture density.
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.
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)
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)
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.
const dimensionSet dimless
Dimensionless.
fvMatrix< scalar > fvScalarMatrix
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
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.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.