40#include "surfaceInterpolate.H"
71 fixedValueBCs == fixedValueBCs/scalar(
nSteps_);
112Foam::elasticityMotionSolver::elasticityMotionSolver
138 fixedValuePointPatchVectorField::
typeName
152 pointMotionU_.boundaryField().types()
156 coeffDict().
found(
"interpolation")
164 nSteps_(this->coeffDict().get<label>(
"steps")),
181 cellMotionU_.primitiveFieldRef() =
Zero;
185 setBoundaryConditions();
188 for (label istep = 0; istep < nSteps_; ++istep)
193 diffusivityPtr_->correct();
196 for (label iter = 0; iter < nIters_; ++iter)
198 Info<<
"Iteration " << iter <<
endl;
199 cellMotionU_.storePrevIter();
207 scalar residual =
mag(dEqn.solve().initialResidual());
208 cellMotionU_.relax();
211 fvMesh_.time().printExecutionTime(
Info);
214 if (residual < tolerance_)
216 Info<<
"\n***Reached mesh movement convergence limit for step "
218 <<
" iteration " << iter <<
"***\n\n";
223 interpolationPtr_->interpolate
231 fvMesh_.points() + pointMotionU_.primitiveField()
253 fvMesh_.movePoints(newPoints);
254 fvMesh_.checkMesh(
true);
258 Info<<
" Writing new mesh points " <<
endl;
264 mesh().pointsInstance(),
289 diffusivityPtr_.reset(
nullptr);
293 coeffDict().
lookup(
"diffusivity")
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Mesh deformation based on the linear elasticity equations. The boundary displacement is set as a boun...
volVectorField cellMotionU_
virtual tmp< pointField > curPoints() const
Return point location. Mesh is actually moved in solve().
autoPtr< motionDiffusivity > diffusivityPtr_
Diffusivity used to control the motion.
label nSteps_
Intermediate steps to solve the PDEs.
scalar tolerance_
Residual threshold.
label nIters_
Number of laplacian iterations per solution step.
void setBoundaryConditions()
Set boundary conditions of cellMotionU based on pointMotionU.
autoPtr< motionInterpolation > interpolationPtr_
Interpolation used to transfer cell displacement to the points.
pointVectorField pointMotionU_
virtual void movePoints(const pointField &)
Update local data for geometry changes.
fvMesh & fvMesh_
Since the mesh deformation is broken down to multiple steps, mesh points need to be moved here....
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
virtual void solve()
Solve for motion.
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Mesh data needed to do the Finite Volume discretisation.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Abstract base class for cell-centre mesh motion diffusivity.
static autoPtr< motionDiffusivity > New(const fvMesh &mesh, Istream &mdData)
Select null constructed.
Base class for interpolation of cell displacement fields, generated by fvMotionSolvers,...
Virtual base class for mesh motion solver.
const polyMesh & mesh() const
Return reference to mesh.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
virtual tmp< pointField > newPoints()
Provide new points for motion. Solves for motion.
motionSolver(const polyMesh &mesh)
Construct from polyMesh.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
Mesh representing a set of points created from polyMesh.
Mesh consisting of general polyhedral cells.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh").
Lookup type of boundary radiation properties.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the divergence of the given field.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
Namespace for handling debugging switches.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const dimensionSet dimless
Dimensionless.
messageStream Info
Information stream (stdout output on master, null elsewhere).
vectorIOField pointIOField
pointIOField is a vectorIOField.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fvMatrix< vector > fvVectorMatrix
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
fvPatchField< vector > fvPatchVectorField
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.