interPhaseChangeDyMFoam: cache divU before time advancement to ensure the old-time meshPhi are used to make phi absolute
This commit is contained in:
parent
ef5faef7d2
commit
84cdf51d40
1 changed files with 6 additions and 3 deletions
|
|
@ -93,6 +93,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"
|
||||
|
||||
|
|
@ -105,9 +111,6 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
// Store divU from the previous mesh for the correctPhi
|
||||
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
|
||||
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
mesh.update();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue