48 displacementLaplacianFvMotionSolver,
54 displacementMotionSolver,
55 displacementLaplacianFvMotionSolver,
63 Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
83 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
85 pointLocation_(nullptr),
88 coeffDict().
found(
"interpolation")
98 coeffDict().
found(
"frozenPointsZone")
99 ? fvMesh_.pointZones().findZoneID
101 coeffDict().
get<
word>(
"frozenPointsZone")
117 Info<<
"displacementLaplacianFvMotionSolver:" <<
nl 118 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl 119 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
136 Info<<
"displacementLaplacianFvMotionSolver :" 137 <<
" Read pointVectorField " 139 <<
" to be used for boundary conditions on points." 141 <<
"Boundary conditions:" 142 << pointLocation_().boundaryField().types() <<
endl;
148 Foam::displacementLaplacianFvMotionSolver::
149 displacementLaplacianFvMotionSolver
151 const polyMesh&
mesh,
152 const IOdictionary&
dict,
157 displacementMotionSolver(
mesh,
dict, pointDisplacement,
points0, typeName),
158 fvMotionSolver(
mesh),
166 IOobject::READ_IF_PRESENT,
171 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
173 pointLocation_(nullptr),
176 coeffDict().
found(
"interpolation")
177 ? motionInterpolation::
New(fvMesh_, coeffDict().lookup(
"interpolation"))
178 : motionInterpolation::
New(fvMesh_)
182 motionDiffusivity::
New(fvMesh_, coeffDict().lookup(
"diffusivity"))
186 coeffDict().
found(
"frozenPointsZone")
187 ? fvMesh_.pointZones().findZoneID
189 coeffDict().
get<word>(
"frozenPointsZone")
205 Info<<
"displacementLaplacianFvMotionSolver:" <<
nl 206 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl 207 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
224 Info<<
"displacementLaplacianFvMotionSolver :" 225 <<
" Read pointVectorField " 227 <<
" to be used for boundary conditions on points." 229 <<
"Boundary conditions:" 230 << pointLocation_().boundaryField().types() <<
endl;
248 if (!diffusivityPtr_)
253 coeffDict().
lookup(
"diffusivity")
257 return *diffusivityPtr_;
264 interpolationPtr_->interpolate
274 Info<<
"displacementLaplacianFvMotionSolver : applying " 275 <<
" boundary conditions on " << pointLocation_().name()
276 <<
" to new point location." 280 pointLocation_().primitiveFieldRef() =
282 + pointDisplacement_.primitiveField();
284 pointLocation_().correctBoundaryConditions();
287 if (frozenPointsZone_ != -1)
289 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
293 pointLocation_()[pz[i]] =
points0()[pz[i]];
299 return tmp<pointField>(pointLocation_().primitiveField());
303 tmp<pointField> tcurPoints
305 points0() + pointDisplacement_.primitiveField()
310 if (frozenPointsZone_ != -1)
312 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
316 curPoints[pz[i]] =
points0()[pz[i]];
320 twoDCorrectPoints(curPoints);
331 movePoints(fvMesh_.points());
333 diffusivity().correct();
334 pointDisplacement_.boundaryFieldRef().updateCoeffs();
345 *diffusivity().
operator()(),
347 "laplacian(diffusivity,cellDisplacement)" 368 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.
Virtual base class for displacement motion solver.
vectorIOField pointIOField
pointIOField is a vectorIOField.
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject. Registered with typeName.
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
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.
~displacementLaplacianFvMotionSolver()
Destructor.
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.
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
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.
Base class for fvMesh based motionSolvers.
virtual void updateMesh(const mapPolyMesh &)
Update topology.
vectorField pointField
pointField is a vectorField.
A class for handling words, derived from Foam::string.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
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 time name of given scalar time 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)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
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)
IOobject(const IOobject &)=default
Copy construct.
fvMatrix< vector > fvVectorMatrix
Automatically write from objectRegistry::writeObject()
virtual void solve()
Solve for motion.
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...
const dictionary & solverDict() const
Return the solver dictionary taking into account finalIteration.
motionDiffusivity & diffusivity()
Return reference to the diffusivity field.
static constexpr const zero Zero
Global zero (0)