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.
This commit is contained in:
parent
4e5dc43418
commit
8f7228d6f3
@ -182,6 +182,11 @@
|
||||
if (alphaApplyPrevCorr && MULESCorr)
|
||||
{
|
||||
talphaPhiCorr0 = alphaPhi - talphaPhiCorr0;
|
||||
talphaPhiCorr0.ref().rename("alphaPhiCorr0");
|
||||
}
|
||||
else
|
||||
{
|
||||
talphaPhiCorr0.clear();
|
||||
}
|
||||
|
||||
if
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,6 +125,9 @@ int main(int argc, char *argv[])
|
||||
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||
<< " s" << endl;
|
||||
|
||||
// Do not apply previous time-step mesh compression flux
|
||||
talphaPhiCorr0.clear();
|
||||
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user