78 cellMotionBoundaryTypes<
vector>(pointDisplacement_.boundaryField())
80 pointLocation_(nullptr),
81 diffusivityType_(
dict.lookup(
"diffusivity")),
89 ? fvMesh_.pointZones().
findIndex(
dict.lookup(
"frozenPointsZone"))
104 Info<<
"displacementLaplacianFvMotionSolver:" <<
nl
105 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl
106 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
122 Info<<
"displacementLaplacianFvMotionSolver :"
123 <<
" Read pointVectorField "
125 <<
" to be used for boundary conditions on points."
127 <<
"Boundary conditions:"
128 << pointLocation_().boundaryField().types() <<
endl;
146 if (!diffusivityPtr_.valid())
148 diffusivityType_.rewind();
155 return diffusivityPtr_();
168 if (pointLocation_.valid())
172 Info<<
"displacementLaplacianFvMotionSolver : applying "
173 <<
" boundary conditions on " << pointLocation_().name()
174 <<
" to new point location."
178 pointLocation_().primitiveFieldRef() =
180 + pointDisplacement_.primitiveField();
182 pointLocation_().correctBoundaryConditions();
185 if (frozenPointsZone_ != -1)
187 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
191 pointLocation_()[pz[i]] = points0()[pz[i]];
203 points0() + pointDisplacement_.primitiveField()
208 if (frozenPointsZone_ != -1)
210 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
214 curPoints[pz[i]] = points0()[pz[i]];
218 twoDCorrectPoints(curPoints);
229 movePoints(fvMesh_.points());
231 diffusivity().correct();
232 pointDisplacement_.boundaryFieldRef().updateCoeffs();
238 diffusivity().
operator()(),
240 "laplacian(diffusivity,cellDisplacement)"
252 diffusivityPtr_.clear();
262 diffusivityPtr_.clear();
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static pointMesh & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const word & name() const
Return const reference to name.
Mesh motion solver for an fvMesh. Based on solving the cell-centre Laplacian for the motion displacem...
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
displacementLaplacianFvMotionSolver(const word &name, const polyMesh &, const dictionary &)
Construct from polyMesh and dictionary.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
motionDiffusivity & diffusivity()
Return reference to the diffusivity field.
~displacementLaplacianFvMotionSolver()
Destructor.
virtual void solve()
Solve for motion.
Virtual base class for displacement motion solver.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
const Time & time() const
Return the top-level database.
Base class for fvMesh based motionSolvers.
const fvMesh & fvMesh_
The fvMesh to be moved.
Abstract base class for cell-centre mesh motion diffusivity.
static autoPtr< motionDiffusivity > New(const fvMesh &mesh, Istream &mdData)
Select null constructed.
Virtual base class for mesh motion solver.
Named list of point indices representing a sub-set of the mesh faces.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
tmp< PointField< Type > > interpolate(const VolField< Type > &) const
Interpolate volField using inverse distance weighting.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the matrix for the laplacian of the field.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
conserve primitiveFieldRef()+