Go to the documentation of this file.
30 #include "dragModel.H"
31 #include "virtualMassModel.H"
64 phase1_(phaseModels_[0]),
65 phase2_(phaseModels_[1])
67 phase2_.volScalarField::operator=(scalar(1) - phase1_);
136 word alphaScheme(
"div(phi," +
alpha1.name() +
')');
145 if (phase1_.divU().valid() && phase2_.divU().valid())
155 else if (phase1_.divU().valid())
163 else if (phase2_.divU().valid())
177 if (DByAfs().
found(phase1_.name()) && DByAfs().found(phase2_.name()))
181 *DByAfs()[phase1_.name()] + *DByAfs()[phase2_.name()]
225 if (dgdt[celli] > 0.0)
230 else if (dgdt[celli] < 0.0)
268 !(++alphaSubCycle).
end();
279 (alphaSubCycle.index()*
Sp)(),
280 (
Su - (alphaSubCycle.index() - 1)*
Sp*
alpha1)(),
285 if (alphaSubCycle.index() == 1)
314 if (alphaDbyA.
valid())
325 phase1_.alphaPhiRef() += alpha1Eqn.
flux();
328 phase1_.alphaRhoPhiRef() =
331 phase2_.alphaPhiRef() = phi_ - phase1_.alphaPhi();
332 phase2_.correctInflowOutflow(phase2_.alphaPhiRef());
333 phase2_.alphaRhoPhiRef() =
337 <<
alpha1.weightedAverage(mesh_.V()).value()
338 <<
" Min(alpha1) = " <<
min(
alpha1).value()
339 <<
" Max(alpha1) = " <<
max(
alpha1).value()
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,...
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
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.
const surfaceScalarField Kdf("Kdf", fluid.Kdf())
A class for handling words, derived from Foam::string.
static tmp< volScalarField > localRSubDeltaT(const fvMesh &mesh, const label nAlphaSubCycles)
Calculate and return the reciprocal of the local sub-cycling.
A class for managing temporary objects.
const volScalarField & alpha2
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
surfaceScalarField & phi1
const Time & time() const
Return time.
Calculate the snGrad of the given volField.
static word timeName(const scalar t, const int precision=precision_)
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
tmp< volScalarField > sigma() const
Return the surface tension coefficient.
Calculate the divergence of the given field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Calculate the field for explicit evaluation of implicit and explicit sources.
const volScalarField & alpha1
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
void clip(const dimensioned< MinMax< Type >> &range)
Clip the field to be bounded within the specified range.
const volScalarField Kd(fluid.Kd())
word alpharScheme("div(phirb,alpha)")
surfaceScalarField & phi2
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
surfaceScalarField phir(fvc::flux(UdmModel.Udm()))
tmp< volScalarField > Vm() const
Return the virtual mass coefficient.
messageStream Info
Information stream (uses stdout - output is on the master only)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
word name(const complex &c)
Return string representation of complex.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
Calculate the matrix for the laplacian of the field.
tmp< surfaceScalarField > Kdf() const
Return the face drag 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.
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 surfaceScalarField & alphaPhi1
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.
Calculate the matrix for implicit and explicit sources.
void correctBoundaryConditions()
Correct boundary field.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the face-flux of the given field.
const dimensionedScalar e
Elementary charge.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Calculate the first temporal derivative.
virtual ~twoPhaseSystem()
Destructor.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Class to represent a system of phases and model interfacial transfers between them.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
bool valid() const noexcept
True for non-null pointer/reference.
tmp< volScalarField > Kd() const
Return the drag coefficient.
MULES: Multidimensional universal limiter for explicit solution.
defineTypeNameAndDebug(combustionModel, 0)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
Calculate the matrix for the first temporal derivative.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Perform a subCycleTime on a field.