Commit cd5ade6c authored by Henry's avatar Henry
Browse files

compressibleInterDyMFoam and interPhaseChangeDyMFoam: cache divU before time...

compressibleInterDyMFoam and interPhaseChangeDyMFoam: cache divU before time advancement to ensure the old-time meshPhi are used to make phi absolute
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1531
parent f99884de
......@@ -73,17 +73,19 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
{
// Store divU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
runTime++;
#include "CourantNo.H"
#include "setDeltaT.H"
Info<< "Time = " << runTime.timeName() << nl << endl;
runTime++;
{
// Store divU from the previous mesh for the correctPhi
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
Info<< "Time = " << runTime.timeName() << nl << endl;
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
......
......@@ -94,6 +94,12 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "../interFoam/interDyMFoam/readControls.H"
// Store divU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
#include "CourantNo.H"
#include "setDeltaT.H"
......@@ -106,9 +112,6 @@ int main(int argc, char *argv[])
{
if (pimple.firstIter() || moveMeshOuterCorrectors)
{
// Store divU from the previous mesh for the correctPhi
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
mesh.update();
......
Markdown is supported
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