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:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user