solvers::incompressibleDriftFlux: New solver module for two-phase flow with drift-flux
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces driftFluxFoam and all the corresponding
tutorials have been updated and moved to
tutorials/modules/incompressibleDriftFlux.
Class
Foam::solvers::incompressibleDriftFlux
Description
Solver module for 2 incompressible fluids using the mixture approach with
the drift-flux approximation for relative motion of the phases, with
optional mesh motion and mesh topology changes including adaptive
re-meshing.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved with mixture transport modelling in which a
single laminar, RAS or LES model is selected to model the momentum stress.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian
particles, surface film etc. and constraining or limiting the solution.
SourceFiles
incompressibleDriftFlux.C
See also
Foam::solvers::VoFSolver
Foam::solvers::twoPhaseVoFSolver
Foam::solvers::compressibleVoF
This commit is contained in:
@ -33,6 +33,41 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::solvers::twoPhaseVoFSolver::alphaPhi
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const volScalarField& alpha,
|
||||
const dictionary& alphaControls
|
||||
)
|
||||
{
|
||||
const word alphaScheme(mesh.schemes().div(divAlphaName)[1].wordToken());
|
||||
|
||||
ITstream compressionScheme
|
||||
(
|
||||
compressionSchemes.found(alphaScheme)
|
||||
? mesh.schemes().div(divAlphaName)
|
||||
: ITstream
|
||||
(
|
||||
divAlphaName,
|
||||
tokenList
|
||||
{
|
||||
word("Gauss"),
|
||||
word("interfaceCompression"),
|
||||
alphaScheme,
|
||||
alphaControls.lookup<scalar>("cAlpha")
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
return fvc::flux
|
||||
(
|
||||
phi,
|
||||
alpha,
|
||||
compressionScheme
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::twoPhaseVoFSolver::alphaSolve
|
||||
(
|
||||
const dictionary& alphaControls
|
||||
@ -55,25 +90,6 @@ void Foam::solvers::twoPhaseVoFSolver::alphaSolve
|
||||
alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
|
||||
);
|
||||
|
||||
const word alphaScheme(mesh.schemes().div(divAlphaName)[1].wordToken());
|
||||
|
||||
ITstream compressionScheme
|
||||
(
|
||||
compressionSchemes.found(alphaScheme)
|
||||
? mesh.schemes().div(divAlphaName)
|
||||
: ITstream
|
||||
(
|
||||
divAlphaName,
|
||||
tokenList
|
||||
{
|
||||
word("Gauss"),
|
||||
word("interfaceCompression"),
|
||||
alphaScheme,
|
||||
alphaControls.lookup<scalar>("cAlpha")
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Set the off-centering coefficient according to ddt scheme
|
||||
scalar ocCoeff = 0;
|
||||
@ -219,11 +235,11 @@ void Foam::solvers::twoPhaseVoFSolver::alphaSolve
|
||||
// Split operator
|
||||
tmp<surfaceScalarField> talphaPhi1Un
|
||||
(
|
||||
fvc::flux
|
||||
alphaPhi
|
||||
(
|
||||
phiCN(),
|
||||
(cnCoeff*alpha1 + (1.0 - cnCoeff)*alpha1.oldTime())(),
|
||||
compressionScheme.rewind()
|
||||
alphaControls
|
||||
)
|
||||
);
|
||||
|
||||
@ -399,8 +415,6 @@ void Foam::solvers::twoPhaseVoFSolver::alphaPredictor()
|
||||
{
|
||||
alphaSolve(alphaControls);
|
||||
}
|
||||
|
||||
mixture.correct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -155,8 +155,8 @@ void Foam::solvers::twoPhaseVoFSolver::preSolve()
|
||||
void Foam::solvers::twoPhaseVoFSolver::prePredictor()
|
||||
{
|
||||
VoFSolver::prePredictor();
|
||||
|
||||
alphaPredictor();
|
||||
mixture.correct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -119,14 +119,21 @@ private:
|
||||
//- Solve for the phase-fractions
|
||||
void alphaSolve(const dictionary& alphaControls);
|
||||
|
||||
//- Solve for the phase-fractions
|
||||
void alphaPredictor();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
virtual tmp<surfaceScalarField> alphaPhi
|
||||
(
|
||||
const surfaceScalarField& phi,
|
||||
const volScalarField& alpha,
|
||||
const dictionary& alphaControls
|
||||
);
|
||||
|
||||
//- Solve for the phase-fractions
|
||||
void alphaPredictor();
|
||||
|
||||
//- Adjust the rDeltaT in the vicinity of the interface
|
||||
virtual void setInterfaceRDeltaT(volScalarField& rDeltaT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user