solvers::multiphaseEuler: Updated and tested LTS support
This commit is contained in:
@ -98,6 +98,60 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh)
|
||||
:
|
||||
fluidSolver(mesh),
|
||||
|
||||
faceMomentum
|
||||
(
|
||||
pimple.dict().lookupOrDefault<Switch>("faceMomentum", false)
|
||||
),
|
||||
|
||||
partialElimination
|
||||
(
|
||||
pimple.dict().lookupOrDefault<Switch>("partialElimination", false)
|
||||
),
|
||||
|
||||
nEnergyCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
|
||||
),
|
||||
|
||||
trDeltaT
|
||||
(
|
||||
LTS
|
||||
? new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fv::localEulerDdt::rDeltaTName,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 1),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
: nullptr
|
||||
),
|
||||
|
||||
trDeltaTf
|
||||
(
|
||||
LTS && faceMomentum
|
||||
? new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fv::localEulerDdt::rDeltaTfName,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 1)
|
||||
)
|
||||
: nullptr
|
||||
),
|
||||
|
||||
buoyancy(mesh),
|
||||
|
||||
fluidPtr(phaseSystem::New(mesh)),
|
||||
@ -120,12 +174,6 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh)
|
||||
fluid.incompressible()
|
||||
),
|
||||
|
||||
faceMomentum(false),
|
||||
|
||||
partialElimination(false),
|
||||
|
||||
nEnergyCorrectors(1),
|
||||
|
||||
MRF(fluid.MRF())
|
||||
{
|
||||
// Read the controls
|
||||
@ -137,48 +185,6 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh)
|
||||
{
|
||||
correctCoNum();
|
||||
}
|
||||
else if (LTS)
|
||||
{
|
||||
Info<< "Using LTS" << endl;
|
||||
|
||||
trDeltaT = tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fv::localEulerDdt::rDeltaTName,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 1),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
if (faceMomentum)
|
||||
{
|
||||
trDeltaTf = tmp<surfaceScalarField>
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fv::localEulerDdt::rDeltaTfName,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 1)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -75,6 +75,28 @@ class multiphaseEuler
|
||||
|
||||
protected:
|
||||
|
||||
// Controls
|
||||
|
||||
//- Cell/face momentum equation switch
|
||||
// Defaults to false, i.e. uses the cell momentum equation
|
||||
Switch faceMomentum;
|
||||
|
||||
//- Partial elimination drag contribution optimisation
|
||||
// Defaults to false
|
||||
Switch partialElimination;
|
||||
|
||||
//- Number of energy correctors
|
||||
// Used to improve stability of phase-change sibulations
|
||||
// Defaults to 1
|
||||
int nEnergyCorrectors;
|
||||
|
||||
|
||||
//- Optional LTS reciprocal time-step field
|
||||
tmp<volScalarField> trDeltaT;
|
||||
|
||||
//- Optional LTS reciprocal face time-step field
|
||||
tmp<surfaceScalarField> trDeltaTf;
|
||||
|
||||
//- Buoyancy force
|
||||
solvers::buoyancy buoyancy;
|
||||
|
||||
@ -105,22 +127,6 @@ protected:
|
||||
Foam::pressureReference pressureReference;
|
||||
|
||||
|
||||
// Controls
|
||||
|
||||
//- Cell/face momentum equation switch
|
||||
// Defaults to false, i.e. uses the cell momentum equation
|
||||
Switch faceMomentum;
|
||||
|
||||
//- Partial elimination drag contribution optimisation
|
||||
// Defaults to false
|
||||
Switch partialElimination;
|
||||
|
||||
//- Number of energy correctors
|
||||
// Used to improve stability of phase-change sibulations
|
||||
// Defaults to 1
|
||||
int nEnergyCorrectors;
|
||||
|
||||
|
||||
// Optional models
|
||||
|
||||
const IOMRFZoneList& MRF;
|
||||
@ -128,12 +134,6 @@ protected:
|
||||
|
||||
// Cached temporary fields
|
||||
|
||||
//- Optional LTS reciprocal time-step field
|
||||
tmp<volScalarField> trDeltaT;
|
||||
|
||||
//- Optional LTS reciprocal face time-step field
|
||||
tmp<surfaceScalarField> trDeltaTf;
|
||||
|
||||
//- Temporary phase momentum matrices
|
||||
// shared between the momentum predictor and pressure corrector
|
||||
PtrList<fvVectorMatrix> UEqns;
|
||||
|
||||
Reference in New Issue
Block a user