Go to the documentation of this file.
38 externalDisplacementMeshMover,
39 displacementMotionSolverMeshMover,
50 const label nAllowableErrors,
56 meshMover_.setDisplacementPatchFields();
58 Info<< typeName <<
" : Moving mesh ..." <<
endl;
60 scalar oldErrorReduction = -1;
64 for (
label iter = 0; iter < 2*nRelaxIter; ++ iter)
66 Info<< typeName <<
" : Iteration " << iter <<
endl;
68 if (iter == nRelaxIter)
71 <<
" : Displacement scaling for error reduction set to 0."
73 oldErrorReduction = meshMover_.setErrorReduction(0.0);
82 meshMover_.paramDict(),
89 Info<< typeName <<
" : Successfully moved mesh" <<
endl;
95 if (oldErrorReduction >= 0)
97 meshMover_.setErrorReduction(oldErrorReduction);
100 Info<< typeName <<
" : Finished moving mesh ..." <<
endl;
121 dict.lookup(
"solver"),
122 pointDisplacement.mesh()(),
128 pointDisplacement.mesh().time().constant(),
129 pointDisplacement.db(),
142 pointDisplacement.mesh().time().constant(),
143 pointDisplacement.db(),
148 pointDisplacement.mesh()().points()
153 adaptPatchIDs_(getFixedValueBCs(pointDisplacement)),
154 adaptPatchPtr_(getPatch(
mesh(), adaptPatchIDs_)),
161 pointDisplacement.time().timeName(),
162 pointDisplacement.db(),
184 fieldSmoother_(
mesh())
199 const label nAllowableErrors,
210 moveDict.
lookup(
"nSmoothThickness")
213 const word minThicknessName =
word(moveDict.
lookup(
"minThicknessName"));
217 if (minThicknessName ==
"none")
224 (minThicknessName ==
"none")
234 adaptPatchPtr_().meshPoints()
243 adaptPatchPtr_().meshEdges
256 adaptPatchPtr_().meshPoints()
259 fieldSmoother_.minSmoothField
261 nSmoothPatchThickness,
272 forAll(displacement, patchPointI)
274 const label pointI(adaptPatchPtr_().meshPoints()[patchPointI]);
276 resid +=
mag(pointDisplacement()[pointI]-displacement[patchPointI]);
278 pointDisplacement()[pointI] = displacement[patchPointI];
282 meshMover_.setDisplacementPatchFields();
287 solverPtr_->pointDisplacement() == pointDisplacement();
290 (void)solverPtr_->newPoints();
291 pointDisplacement() == solverPtr_->pointDisplacement();
294 return moveMesh(moveDict, nAllowableErrors, checkFaces);
303 solverPtr_->movePoints(
p);
306 meshMover_.movePoints();
309 meshMover_.correct();
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual ~displacementMotionSolverMeshMover()
Destructor.
A class for handling words, derived from string.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
displacementMotionSolverMeshMover(const dictionary &dict, const List< labelPair > &baffles, pointVectorField &pointDisplacemen)
Construct from a polyMesh and an IOdictionary.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual bool move(const dictionary &, const label nAllowableErrors, labelList &checkFaces)
Move mesh using current pointDisplacement boundary values.
Virtual base class for mesh movers with externally provided displacement field giving the boundary co...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
Mesh representing a set of points created from polyMesh.
static PackedBoolList getMasterEdges(const polyMesh &mesh, const labelList &meshEdges)
Determine master edge for subset of edges. If coupled.
conserve internalField()+
static PackedBoolList getMasterPoints(const polyMesh &mesh, const labelList &meshPoints)
Determine master point for subset of points. If coupled.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label readLabel(Istream &is)
bool moveMesh(const dictionary &moveDict, const label nAllowableErrors, labelList &checkFaces)
Apply the mesh mover algorithm.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)