mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
reactingEulerFoam: Correct continuity error at the end of the energy correction loop
to handle the change in density generated by the temperature correction.
This commit is contained in:
@ -35,6 +35,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
|
||||
}
|
||||
|
||||
fluid.correctThermo();
|
||||
fluid.correct();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -89,9 +89,6 @@ PtrList<surfaceScalarField> phiFs(phases.size());
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
// Update continuity errors due to temperature changes
|
||||
fluid.correct();
|
||||
|
||||
volScalarField rho("rho", fluid.rho());
|
||||
|
||||
// Correct p_rgh for consistency with p and the updated densities
|
||||
|
||||
@ -74,11 +74,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
//#include "pUf/createDDtU.H"
|
||||
|
||||
int nEnergyCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
@ -87,6 +82,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
|
||||
int nEnergyCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
|
||||
);
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
|
||||
@ -49,6 +49,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
|
||||
}
|
||||
|
||||
fluid.correctThermo();
|
||||
fluid.correct();
|
||||
}
|
||||
|
||||
Info<< phase1.name() << " min/max T "
|
||||
|
||||
@ -83,9 +83,6 @@ tmp<surfaceScalarField> phiF2;
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
// Update continuity errors due to temperature changes
|
||||
fluid.correct();
|
||||
|
||||
volScalarField rho("rho", fluid.rho());
|
||||
|
||||
// Correct p_rgh for consistency with p and the updated densities
|
||||
|
||||
@ -93,9 +93,6 @@ tmp<surfaceScalarField> Ff2;
|
||||
|
||||
while (pimple.correct())
|
||||
{
|
||||
// Update continuity errors due to temperature changes
|
||||
fluid.correct();
|
||||
|
||||
volScalarField rho("rho", fluid.rho());
|
||||
|
||||
// Correct p_rgh for consistency with p and the updated densities
|
||||
|
||||
@ -75,11 +75,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "pUf/createDDtU.H"
|
||||
|
||||
int nEnergyCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
@ -88,6 +83,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
|
||||
int nEnergyCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1)
|
||||
);
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
|
||||
Reference in New Issue
Block a user