solvers::solid: Support mesh motion

Mesh motion is now supported in solid regions, but with the restriction
that it must be a solid-body-type motion. The mesh must not deform; all
cell volumes and face area magnitudes must remain constant. An error
will be generated if a motion strategy is selected that does not obey
this constraint.
This commit is contained in:
Will Bainbridge
2023-02-02 11:25:07 +00:00
parent 05d67b6166
commit df0f7f16be
8 changed files with 71 additions and 8 deletions

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "solid.H"
#include "fvMeshMover.H"
#include "localEulerDdtScheme.H"
#include "addToRunTimeSelectionTable.H"
@ -161,7 +162,25 @@ void Foam::solvers::solid::preSolve()
bool Foam::solvers::solid::moveMesh()
{
return true;
if (pimple.firstIter() || pimple.moveMeshOuterCorrectors())
{
if (!mesh.mover().solidBody())
{
FatalErrorInFunction
<< "Region " << name() << " of type " << type()
<< " does not support non-solid body mesh motion"
<< exit(FatalError);
}
mesh.move();
if (mesh.changing())
{
return mesh.moving();
}
}
return false;
}