54Foam::displacementComponentLaplacianFvMotionSolver::
55displacementComponentLaplacianFvMotionSolver
67 "cellDisplacement" + cmptName_,
75 cellMotionBoundaryTypes<scalar>(pointDisplacement_.boundaryField())
77 pointLocation_(nullptr),
80 coeffDict().
found(
"interpolation")
90 coeffDict().
found(
"frozenPointsZone")
91 ? fvMesh_.pointZones().findZoneID
93 coeffDict().get<
word>(
"frozenPointsZone")
118 Info<<
"displacementComponentLaplacianFvMotionSolver :"
119 <<
" Read pointVectorField "
120 << pointLocation_().name()
121 <<
" to be used for boundary conditions on points."
123 <<
"Boundary conditions:"
124 << pointLocation_().boundaryField().types() <<
endl;
142 interpolationPtr_->interpolate
152 pointDisplacement_.boundaryField().size()
153 != cellDisplacement_.boundaryField().size()
156 pointDisplacement_.correctBoundaryConditions();
164 Info<<
"displacementComponentLaplacianFvMotionSolver : applying "
165 <<
" boundary conditions on " << pointLocation_().name()
166 <<
" to new point location."
172 pointLocation_().primitiveFieldRef() = fvMesh_.points();
174 pointLocation_().primitiveFieldRef().replace
177 points0_ + pointDisplacement_.primitiveField()
180 pointLocation_().correctBoundaryConditions();
183 if (frozenPointsZone_ != -1)
185 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
189 label pointi = pz[i];
191 pointLocation_()[pointi][cmpt_] = points0_[pointi];
202 auto& curPoints = tcurPoints.ref();
207 points0_ + pointDisplacement_.primitiveField()
211 if (frozenPointsZone_ != -1)
213 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
217 label pointi = pz[i];
219 curPoints[pointi][cmpt_] = points0_[pointi];
234 movePoints(fvMesh_.points());
236 diffusivityPtr_->correct();
237 pointDisplacement_.boundaryFieldRef().updateCoeffs();
248 *diffusivityPtr_->operator()(),
250 "laplacian(diffusivity,cellDisplacement)"
257 TEqn.solveSegregatedOrCoupled();
271 diffusivityPtr_.reset(
nullptr);
275 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.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
@ 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.
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Virtual base class for displacement motion solver.
word cmptName_
The component name to solve for.
scalarField points0_
Reference point field for this component.
pointScalarField pointDisplacement_
Point motion field.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
direction cmpt_
The component to solve for.
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.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
Mesh motion solver for an fvMesh. Based on solving the cell-centre Laplacian for the given component ...
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
~displacementComponentLaplacianFvMotionSolver()
Destructor.
virtual void updateMesh(const mapPolyMesh &)
Update topology.
virtual void solve()
Solve for motion.
const Time & time() const
Return the top-level database.
Base class for fvMesh based motionSolvers.
const fvMesh & fvMesh_
The fvMesh to be moved.
wordList cellMotionBoundaryTypes(const typename GeometricField< Type, pointPatchField, pointMesh >::Boundary &pmUbf) const
Create the corresponding patch types for cellMotion from those.
fvMotionSolver(const polyMesh &)
Construct from polyMesh.
const fvMesh & mesh() const
Return reference to the fvMesh to be moved.
Finite-volume options, which is an IOdictionary of values and a fv::optionList.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present otherwise lookup and return.
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.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
virtual void twoDCorrectPoints(pointField &) const
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
Mesh consisting of general polyhedral cells.
Lookup type of boundary radiation properties.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the matrix for the laplacian of the field.
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T) - fvm::laplacian(alphaEff, T)==radiation->ST(rhoCpRef, T)+fvOptions(T))
Namespace for handling debugging switches.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimViscosity
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.
fvMatrix< scalar > fvScalarMatrix
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
conserve primitiveFieldRef()+