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"))
183 cellMotionU_.primitiveFieldRef() =
Zero;
187 setBoundaryConditions();
190 for (label istep = 0; istep < nSteps_; ++istep)
195 diffusivityPtr_->correct();
198 for (label iter = 0; iter < nIters_; ++iter)
200 Info<<
"Iteration " << iter <<
endl;
201 cellMotionU_.storePrevIter();
209 scalar residual =
mag(dEqn.solve().initialResidual());
210 cellMotionU_.relax();
213 fvMesh_.time().printExecutionTime(
Info);
216 if (residual < tolerance_)
218 Info<<
"\n***Reached mesh movement convergence limit for step " 220 <<
" iteration " << iter <<
"***\n\n";
225 interpolationPtr_->interpolate
231 tmp<vectorField> newPoints
233 fvMesh_.points() + pointMotionU_.primitiveField()
255 fvMesh_.movePoints(newPoints);
256 fvMesh_.checkMesh(
true);
260 Info<<
" Writing new mesh points " <<
endl;
266 mesh().pointsInstance(),
290 diffusivityPtr_.reset(
nullptr);
294 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). Generates a FatalError on failed casts and uses the virtual type() m...
virtual void solve()
Solve for motion.
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.
vectorField pointField
pointField is a vectorField.
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
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.
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)