49 solidBodyDisplacementLaplacianFvMotionSolver,
55 displacementMotionSolver,
56 solidBodyDisplacementLaplacianFvMotionSolver,
64 Foam::solidBodyDisplacementLaplacianFvMotionSolver::
65 solidBodyDisplacementLaplacianFvMotionSolver
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;
151 Foam::solidBodyDisplacementLaplacianFvMotionSolver::
152 solidBodyDisplacementLaplacianFvMotionSolver
154 const polyMesh&
mesh,
155 const IOdictionary&
dict,
160 displacementMotionSolver(
mesh,
dict, pointDisplacement,
points0, typeName),
161 fvMotionSolver(
mesh),
162 SBMFPtr_(solidBodyMotionFunction::
New(coeffDict(),
mesh.time())),
170 IOobject::READ_IF_PRESENT,
175 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
177 pointLocation_(nullptr),
180 coeffDict().
found(
"interpolation")
181 ? motionInterpolation::
New(fvMesh_, coeffDict().lookup(
"interpolation"))
182 : motionInterpolation::
New(fvMesh_)
186 motionDiffusivity::
New(fvMesh_, coeffDict().lookup(
"diffusivity"))
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
274 tmp<pointField> tnewPoints
284 Info<<
"solidBodyDisplacementLaplacianFvMotionSolver : applying " 285 <<
" boundary conditions on " << pointLocation_().name()
286 <<
" to new point location." 290 pointLocation_().primitiveFieldRef() =
292 + pointDisplacement_.internalField();
294 pointLocation_().correctBoundaryConditions();
297 if (frozenPointsZone_ != -1)
299 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
303 pointLocation_()[pz[i]] = newPoints[pz[i]];
309 return tmp<pointField>(pointLocation_().primitiveField());
313 tmp<pointField> tcurPoints
315 newPoints + pointDisplacement_.primitiveField()
320 if (frozenPointsZone_ != -1)
322 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
326 curPoints[pz[i]] = newPoints[pz[i]];
330 twoDCorrectPoints(curPoints);
341 movePoints(fvMesh_.points());
343 diffusivity().correct();
344 pointDisplacement_.boundaryFieldRef().updateCoeffs();
353 *diffusivity().
operator()(),
355 "laplacian(diffusivity,cellDisplacement)" 376 diffusivityPtr_.clear();
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void correct(GeometricField< Type, PatchField, GeoMesh > &field)
Apply correction to field.
Virtual base class for displacement motion solver.
virtual void updateMesh(const mapPolyMesh &)
Update topology.
void transformPoints(vectorField &, const septernion &, const vectorField &)
Transform given vectorField of coordinates with the given septernion.
vectorIOField pointIOField
pointIOField is a vectorIOField.
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
constexpr char nl
The newline '\n' character (0x0a)
const dimensionSet dimViscosity
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
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.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
const fvMesh & fvMesh_
The fvMesh to be moved.
const Time & time() const
Return the top-level database.
Lookup type of boundary radiation properties.
SolverPerformance< Type > solveSegregatedOrCoupled(const dictionary &)
Solve segregated or coupled returning the solution statistics.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
conserve primitiveFieldRef()+
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
~solidBodyDisplacementLaplacianFvMotionSolver()
Destructor.
Base class for fvMesh based motionSolvers.
vectorField pointField
pointField is a vectorField.
Base class for defining solid-body motions.
motionDiffusivity & diffusivity()
Return reference to the diffusivity field.
A class for handling words, derived from Foam::string.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
virtual void solve()
Solve for motion.
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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.
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)
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
IOobject(const IOobject &)=default
Copy construct.
fvMatrix< vector > fvVectorMatrix
Automatically write from objectRegistry::writeObject()
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T) - fvm::laplacian(alphaEff, T)==radiation->ST(rhoCpRef, T)+fvOptions(T))
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
static autoPtr< motionDiffusivity > New(const fvMesh &mesh, Istream &mdData)
Select null constructed.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
Defines the attributes of an object for which implicit objectRegistry management is supported...
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)