Skip to content
Snippets Groups Projects
Commit 8f7228d6 authored by Henry Weller's avatar Henry Weller
Browse files

interDyMFoam: delete alphaPhiCorr0 if the mesh changes

The previous time-step compression flux is not valid/accurate on the new mesh
and it is better to re-calculate it rather than map it from the previous mesh to
the new mesh.
parent 4e5dc434
Branches
Tags
No related merge requests found
...@@ -182,6 +182,11 @@ ...@@ -182,6 +182,11 @@
if (alphaApplyPrevCorr && MULESCorr) if (alphaApplyPrevCorr && MULESCorr)
{ {
talphaPhiCorr0 = alphaPhi - talphaPhiCorr0; talphaPhiCorr0 = alphaPhi - talphaPhiCorr0;
talphaPhiCorr0.ref().rename("alphaPhiCorr0");
}
else
{
talphaPhiCorr0.clear();
} }
if if
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -125,6 +125,9 @@ int main(int argc, char *argv[]) ...@@ -125,6 +125,9 @@ int main(int argc, char *argv[])
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate << runTime.elapsedCpuTime() - timeBeforeMeshUpdate
<< " s" << endl; << " s" << endl;
// Do not apply previous time-step mesh compression flux
talphaPhiCorr0.clear();
gh = (g & mesh.C()) - ghRef; gh = (g & mesh.C()) - ghRef;
ghf = (g & mesh.Cf()) - ghRef; ghf = (g & mesh.Cf()) - ghRef;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment