create rhoeps field in createFields.H

this was a major issue:
rhoeps must be created outside the run loop and have old time values,
otherwise any time derivative will be zero, leading to incorrect results
This commit is contained in:
danielque
2021-12-23 15:22:40 +01:00
parent 30662789fa
commit a271fd0aa0
2 changed files with 3 additions and 1 deletions

View File

@ -122,7 +122,6 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
}
volScalarField rhoeps("rhoeps",rho*voidfraction);
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{

View File

@ -65,6 +65,9 @@ Info<< "Reading thermophysical properties\n" << endl;
dimensionedScalar("zero", dimensionSet(1,-1,-3,0,0,0,0), 0.0)
);
volScalarField rhoeps("rhoeps", rho*voidfraction);
rhoeps.oldTime(); // switch on saving old time
Info<< "\nCreating fluid-particle heat flux field\n" << endl;
volScalarField Qsource
(