Commit a6918385 authored by Henry Weller's avatar Henry Weller
Browse files

reactingEulerFoam: Correct continuity error at the end of the energy correction loop

to handle the change in density generated by the temperature correction.
parent 18d2b2e0
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment