40 #include "surfaceInterpolate.H" 52 elasticityMotionSolver,
67 if (isA<fixedValueFvPatchVectorField>(bc))
70 refCast<fixedValueFvPatchVectorField>(bc);
71 fixedValueBCs == fixedValueBCs/scalar(
nSteps_);
112 Foam::elasticityMotionSolver::elasticityMotionSolver
138 fixedValuePointPatchVectorField::typeName
152 pointMotionU_.boundaryField().types()
156 coeffDict().
found(
"interpolation")
164 nSteps_(this->coeffDict().
get<label>(
"steps")),
165 nIters_(this->coeffDict().
get<label>(
"iters")),
166 tolerance_(this->coeffDict().
get<scalar>(
"tolerance"))
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
229 tmp<vectorField> newPoints
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")
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
label nSteps_
Intermediate steps to solve the PDEs.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
vectorIOField pointIOField
pointIOField is a vectorIOField.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
virtual void solve()
Solve for motion.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Calculate the matrix for the laplacian of the field.
Virtual base class for mesh motion solver.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
Lookup type of boundary radiation properties.
void setBoundaryConditions()
Set boundary conditions of cellMotionU based on pointMotionU.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Mesh representing a set of points created from polyMesh.
#define forAll(list, i)
Loop across all elements in list.
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Calculate the divergence of the given field.
Abstract base class for cell-centre mesh motion diffusivity.
int debug
Static debugging option.
Base class for interpolation of cell displacement fields, generated by fvMotionSolvers, to the points. This base class implements the default method which applies volPointInterpolation only.
defineTypeNameAndDebug(combustionModel, 0)
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.
Calculate the matrix for the divergence of the given field and flux.
volVectorField cellMotionU_
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
static autoPtr< motionDiffusivity > New(const fvMesh &mesh, Istream &mdData)
Select null constructed.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Do not request registration (bool: false)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
virtual tmp< pointField > curPoints() const
Return point location. Mesh is actually moved in solve()
static constexpr const zero Zero
Global zero (0)