diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.C b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.C index b89960d3a7..50bbb23346 100644 --- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.C +++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.C @@ -98,6 +98,60 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh) : fluidSolver(mesh), + faceMomentum + ( + pimple.dict().lookupOrDefault("faceMomentum", false) + ), + + partialElimination + ( + pimple.dict().lookupOrDefault("partialElimination", false) + ), + + nEnergyCorrectors + ( + pimple.dict().lookupOrDefault("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 - ( - 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 - ( - new surfaceScalarField - ( - IOobject - ( - fv::localEulerDdt::rDeltaTfName, - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar(dimless/dimTime, 1) - ) - ); - } - } } diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.H b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.H index d608dde3ce..117be21c6a 100644 --- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.H +++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseEuler/multiphaseEuler.H @@ -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 trDeltaT; + + //- Optional LTS reciprocal face time-step field + tmp 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 trDeltaT; - - //- Optional LTS reciprocal face time-step field - tmp trDeltaTf; - //- Temporary phase momentum matrices // shared between the momentum predictor and pressure corrector PtrList UEqns;