Go to the documentation of this file.
29 #include "dragModel.H"
30 #include "virtualMassModel.H"
63 phase1_(phaseModels_[0]),
64 phase2_(phaseModels_[1])
66 phase2_.volScalarField::operator=(scalar(1) - phase1_);
135 word alphaScheme(
"div(phi," +
alpha1.name() +
')');
144 if (phase1_.divU().valid() && phase2_.divU().valid())
154 else if (phase1_.divU().valid())
162 else if (phase2_.divU().valid())
176 if (DByAfs().
found(phase1_.name()) && DByAfs().found(phase2_.name()))
180 *DByAfs()[phase1_.name()] + *DByAfs()[phase2_.name()]
224 if (dgdt[celli] > 0.0)
229 else if (dgdt[celli] < 0.0)
267 !(++alphaSubCycle).
end();
278 (alphaSubCycle.index()*
Sp)(),
279 (
Su - (alphaSubCycle.index() - 1)*
Sp*
alpha1)(),
284 if (alphaSubCycle.index() == 1)
313 if (alphaDbyA.
valid())
324 phase1_.alphaPhiRef() += alpha1Eqn.
flux();
327 phase1_.alphaRhoPhiRef() =
330 phase2_.alphaPhiRef() = phi_ - phase1_.alphaPhi();
331 phase2_.correctInflowOutflow(phase2_.alphaPhiRef());
332 phase2_.alphaRhoPhiRef() =
336 <<
alpha1.weightedAverage(mesh_.V()).value()
337 <<
" Min(alpha1) = " <<
min(
alpha1).value()
338 <<
" 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< volScalarField > sigma() const
Return the surface tension coefficient.
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.
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...
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.
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.
const volScalarField Kd(fluid.Kd())
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.
const surfaceScalarField Kdf("Kdf", fluid.Kdf())
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
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.