64Foam::solidBodyDisplacementLaplacianFvMotionSolver::
65solidBodyDisplacementLaplacianFvMotionSolver
86 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
88 pointLocation_(nullptr),
91 coeffDict().
found(
"interpolation")
101 coeffDict().
found(
"frozenPointsZone")
102 ? fvMesh_.pointZones().findZoneID
104 coeffDict().get<
word>(
"frozenPointsZone")
120 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver:" <<
nl
121 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl
122 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
139 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver :"
140 <<
" Read pointVectorField "
142 <<
" to be used for boundary conditions on points."
144 <<
"Boundary conditions:"
145 << pointLocation_().boundaryField().types() <<
endl;
151Foam::solidBodyDisplacementLaplacianFvMotionSolver::
152solidBodyDisplacementLaplacianFvMotionSolver
175 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
177 pointLocation_(nullptr),
180 coeffDict().
found(
"interpolation")
190 coeffDict().
found(
"frozenPointsZone")
191 ? fvMesh_.pointZones().findZoneID
193 coeffDict().
get<
word>(
"frozenPointsZone")
209 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver:" <<
nl
210 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl
211 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
228 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver :"
229 <<
" Read pointVectorField "
231 <<
" to be used for boundary conditions on points."
233 <<
"Boundary conditions:"
234 << pointLocation_().boundaryField().types() <<
endl;
252 if (!diffusivityPtr_)
257 coeffDict().
lookup(
"diffusivity")
261 return *diffusivityPtr_;
268 interpolationPtr_->interpolate
278 pointDisplacement_.boundaryField().size()
279 != cellDisplacement_.boundaryField().size()
282 pointDisplacement_.correctBoundaryConditions();
295 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver : applying "
296 <<
" boundary conditions on " << pointLocation_().name()
297 <<
" to new point location."
301 pointLocation_().primitiveFieldRef() =
303 + pointDisplacement_.internalField();
305 pointLocation_().correctBoundaryConditions();
308 if (frozenPointsZone_ != -1)
310 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
314 pointLocation_()[pz[i]] = newPoints[pz[i]];
326 newPoints + pointDisplacement_.primitiveField()
331 if (frozenPointsZone_ != -1)
333 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
337 curPoints[pz[i]] = newPoints[pz[i]];
352 movePoints(fvMesh_.points());
354 diffusivity().correct();
355 pointDisplacement_.boundaryFieldRef().updateCoeffs();
364 *diffusivity().
operator()(),
366 "laplacian(diffusivity,cellDisplacement)"
373 TEqn.solveSegregatedOrCoupled();
387 diffusivityPtr_.clear();
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.
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.
Virtual base class for displacement motion solver.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
displacementMotionSolver(const displacementMotionSolver &)=delete
No copy construct.
pointVectorField pointDisplacement_
Point motion field.
static autoPtr< displacementMotionSolver > New(const word &solverTypeName, const polyMesh &, const IOdictionary &, const pointVectorField &pointDisplacement, const pointIOField &points0)
Select constructed from polyMesh, dictionary and components.
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.
virtual tmp< pointField > newPoints()
Provide new points for motion. Solves for motion.
virtual void twoDCorrectPoints(pointField &) const
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
Mesh consisting of general polyhedral cells.
Lookup type of boundary radiation properties.
Applies Laplacian displacement solving on top of a transformation of the initial points using a solid...
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
~solidBodyDisplacementLaplacianFvMotionSolver()
Destructor.
motionDiffusivity & diffusivity()
Return reference to the diffusivity field.
virtual void updateMesh(const mapPolyMesh &)
Update topology.
virtual void solve()
Solve for motion.
Base class for defining solid-body motions.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
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))
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Namespace for handling debugging switches.
int debug
Static debugging option.
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.
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorIOField pointIOField
pointIOField is a vectorIOField.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
fvMatrix< vector > fvVectorMatrix
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void transformPoints(vectorField &, const septernion &, const vectorField &)
Transform given vectorField of coordinates with the given septernion.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))
conserve primitiveFieldRef()+