fvMesh: Separated fvMesh::move() and fvMesh::update()
fvMesh::update() now executes at the beginning of the time-step, before time is incremented and handles topology change, mesh to mesh mapping and redistribution without point motion. Following each of these mesh changes fields are mapped from the previous mesh state to new mesh state in a conservative manner. These mesh changes not occur at most once per time-step. fvMesh::move() is executed after time is incremented and handles point motion mesh morphing during the time-step in an Arbitrary Lagrangian Eulerian approach requiring the mesh motion flux to match the cell volume change. fvMesh::move() can be called any number of times during the time-step to allow iterative update of the coupling between the mesh motion and field solution.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -382,9 +382,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io, const IOobject& dictIO)
|
||||
new fvMesh
|
||||
(
|
||||
io,
|
||||
move(newPoints),
|
||||
move(newFaces),
|
||||
move(newCells)
|
||||
std::move(newPoints),
|
||||
std::move(newFaces),
|
||||
std::move(newCells)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -95,15 +95,21 @@ int main(int argc, char *argv[])
|
||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
||||
);
|
||||
|
||||
while (runTime.loop())
|
||||
while (runTime.run())
|
||||
{
|
||||
// Update the mesh for topology change, mesh to mesh mapping
|
||||
mesh.update();
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
mesh.update();
|
||||
// Move the mesh
|
||||
mesh.move();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user