44 pLaplacianMotionSolver,
52 Foam::pLaplacianMotionSolver::pLaplacianMotionSolver
60 useFixedValuePointMotionUBCs_
61 (coeffDict().getOrDefault<bool>(
"useFixedValuePointMotionUBCs", false)),
76 useFixedValuePointMotionUBCs_
77 ? fixedValuePointPatchVectorField::typeName
93 pointMotionU_.boundaryField().types()
97 coeffDict().
found(
"interpolation")
101 nIters_(this->coeffDict().
get<label>(
"iters")),
102 tolerance_(this->coeffDict().
get<scalar>(
"tolerance")),
103 toleranceIntermediate_
106 getOrDefault<scalar>(
"toleranceIntermediate", 100*tolerance_)
108 exponent_(this->coeffDict().
get<label>(
"exponent"))
116 pointMotionU_.boundaryFieldRef().updateCoeffs();
117 auto& cellMotionUbf = cellMotionU_.boundaryFieldRef();
119 forAll(cellMotionU_.boundaryField(), pI)
122 if (isA<fixedValueFvPatchVectorField>(bField))
128 bField[fI] =
patch[fI].average(
points, pointMotionU_);
138 interpolationPtr_->interpolate
147 pointMotionU_.primitiveFieldRef(),
152 tmp<vectorField> tcurPoints
154 fvMesh_.points() + pointMotionU_.internalField()
157 twoDCorrectPoints(tcurPoints.ref());
167 for (label
exp = 2;
exp < exponent_ + 1; ++
exp)
170 (
exp == exponent_ ? tolerance_ : toleranceIntermediate_);
173 for (label iter = 0; iter < nIters_; ++iter)
175 Info<<
"Iteration " << iter <<
endl;
176 cellMotionU_.storePrevIter();
178 gamma.correctBoundaryConditions();
184 scalar residual =
mag(dEqn.
solve().initialResidual());
186 cellMotionU_.relax();
189 fvMesh_.time().printExecutionTime(
Info);
192 if (residual < tolerance)
194 Info<<
"\n***Reached mesh movement convergence limit at" 195 <<
" iteration " << iter <<
"***\n\n";
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
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.
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
Virtual base class for mesh motion solver.
virtual void solve()
Solve for motion.
const dimensionSet dimless
Dimensionless.
Lookup type of boundary radiation properties.
A calculated boundary condition for pointField.
void setBoundaryConditions()
Set boundary conditions of cellMotionU based on pointMotionU.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Mesh representing a set of points created from polyMesh.
#define forAll(list, i)
Loop across all elements in list.
Base class for fvMesh based motionSolvers.
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
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)