mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
LTS: Simplify the selection of LTS operation
This commit is contained in:
@ -73,7 +73,6 @@ License
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reaction source time scale
|
// Reaction source time scale
|
||||||
if (alphaTemp < 1.0)
|
|
||||||
{
|
{
|
||||||
volScalarField::DimensionedInternalField rDeltaTT
|
volScalarField::DimensionedInternalField rDeltaTT
|
||||||
(
|
(
|
||||||
|
|||||||
@ -175,9 +175,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
||||||
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
||||||
|
|
||||||
bool LTS =
|
bool LTS = fv::localEulerDdt::enabled(mesh);
|
||||||
word(mesh.ddtScheme("default"))
|
|
||||||
== fv::localEulerDdtScheme<scalar>::typeName;
|
|
||||||
|
|
||||||
word alphaScheme("div(phi," + alpha1.name() + ')');
|
word alphaScheme("div(phi," + alpha1.name() + ')');
|
||||||
word alpharScheme("div(phir," + alpha1.name() + ')');
|
word alpharScheme("div(phir," + alpha1.name() + ')');
|
||||||
|
|||||||
@ -78,9 +78,7 @@ void Foam::combustionModels::laminar<Type>::correct()
|
|||||||
{
|
{
|
||||||
if (integrateReactionRate_)
|
if (integrateReactionRate_)
|
||||||
{
|
{
|
||||||
word ddtScheme(this->mesh().ddtScheme("Yi"));
|
if (fv::localEulerDdt::enabled(this->mesh()))
|
||||||
|
|
||||||
if (ddtScheme == fv::localEulerDdtScheme<scalar>::typeName)
|
|
||||||
{
|
{
|
||||||
const scalarField& rDeltaT =
|
const scalarField& rDeltaT =
|
||||||
fv::localEulerDdt::localRDeltaT(this->mesh());
|
fv::localEulerDdt::localRDeltaT(this->mesh());
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
bool LTS =
|
bool LTS = fv::localEulerDdt::enabled(mesh);
|
||||||
word(mesh.ddtScheme("default"))
|
|
||||||
== fv::localEulerDdtScheme<scalar>::typeName;
|
|
||||||
|
|
||||||
tmp<volScalarField> trDeltaT;
|
tmp<volScalarField> trDeltaT;
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,14 @@ Foam::word Foam::fv::localEulerDdt::rSubDeltaTName("rSubDeltaTName");
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::fv::localEulerDdt::enabled(const fvMesh& mesh)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
word(mesh.ddtScheme("default"))
|
||||||
|
== fv::localEulerDdtScheme<scalar>::typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::fv::localEulerDdt::localRDeltaT
|
const Foam::volScalarField& Foam::fv::localEulerDdt::localRDeltaT
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
|
|||||||
@ -37,6 +37,7 @@ See Also
|
|||||||
Foam::fv::CoEulerDdtScheme
|
Foam::fv::CoEulerDdtScheme
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
localEulerDdt.C
|
||||||
localEulerDdtScheme.C
|
localEulerDdtScheme.C
|
||||||
localEulerDdtSchemes.C
|
localEulerDdtSchemes.C
|
||||||
|
|
||||||
@ -71,13 +72,18 @@ public:
|
|||||||
//- Name of the reciprocal local sub-cycling time-step field
|
//- Name of the reciprocal local sub-cycling time-step field
|
||||||
static word rSubDeltaTName;
|
static word rSubDeltaTName;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
localEulerDdt()
|
localEulerDdt()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return true if LTS is enabled
|
||||||
|
static bool enabled(const fvMesh& mesh);
|
||||||
|
|
||||||
//- Return the reciprocal of the local time-step
|
//- Return the reciprocal of the local time-step
|
||||||
// looked-up from the objectRegistry
|
// looked-up from the objectRegistry
|
||||||
static const volScalarField& localRDeltaT(const fvMesh& mesh);
|
static const volScalarField& localRDeltaT(const fvMesh& mesh);
|
||||||
|
|||||||
@ -89,11 +89,7 @@ void Foam::MULES::correct
|
|||||||
{
|
{
|
||||||
const fvMesh& mesh = psi.mesh();
|
const fvMesh& mesh = psi.mesh();
|
||||||
|
|
||||||
bool LTS =
|
if (fv::localEulerDdt::enabled(mesh))
|
||||||
word(mesh.ddtScheme("default"))
|
|
||||||
== fv::localEulerDdtScheme<scalar>::typeName;
|
|
||||||
|
|
||||||
if (LTS)
|
|
||||||
{
|
{
|
||||||
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
||||||
|
|
||||||
|
|||||||
@ -111,11 +111,7 @@ void Foam::MULES::explicitSolve
|
|||||||
|
|
||||||
psi.correctBoundaryConditions();
|
psi.correctBoundaryConditions();
|
||||||
|
|
||||||
bool LTS =
|
if (fv::localEulerDdt::enabled(mesh))
|
||||||
word(mesh.ddtScheme("default"))
|
|
||||||
== fv::localEulerDdtScheme<scalar>::typeName;
|
|
||||||
|
|
||||||
if (LTS)
|
|
||||||
{
|
{
|
||||||
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user