ENH: MRF: Added support for mesh refinement/unrefinement and other topology changes

This commit is contained in:
Henry Weller
2017-08-18 22:22:47 +01:00
committed by Andrew Heather
parent c06f716555
commit be9d388a68
11 changed files with 176 additions and 129 deletions

View File

@ -110,6 +110,8 @@ int main(int argc, char *argv[])
if (mesh.changing())
{
MRF.update();
Info<< "Execution time for mesh.update() = "
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
<< " s" << endl;

View File

@ -136,6 +136,8 @@ int main(int argc, char *argv[])
gh = (g & mesh.C()) - ghRef;
ghf = (g & mesh.Cf()) - ghRef;
MRF.update();
}
if ((mesh.changing() && correctPhi) || mesh.topoChanging())

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -111,22 +111,25 @@ int main(int argc, char *argv[])
Info<< "Execution time for mesh.update() = "
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
<< " s" << endl;
}
if (mesh.changing() && correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & Uf;
MRF.update();
#include "correctPhi.H"
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf;
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
}
#include "correctPhi.H"
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
}