52Foam::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_)
116 pointMotionU_.boundaryFieldRef().updateCoeffs();
117 auto& cellMotionUbf = cellMotionU_.boundaryFieldRef();
119 forAll(cellMotionU_.boundaryField(), pI)
125 const polyPatch& patch = fvMesh_.boundaryMesh()[pI];
128 bField[fI] = patch[fI].average(
points, pointMotionU_);
138 interpolationPtr_->interpolate
147 pointMotionU_.primitiveFieldRef(),
154 fvMesh_.points() + pointMotionU_.internalField()
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";
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
A calculated boundary condition for pointField.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Base class for fvMesh based motionSolvers.
const fvMesh & fvMesh_
The fvMesh to be moved.
fvMotionSolver(const polyMesh &)
Construct from polyMesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Base class for interpolation of cell displacement fields, generated by fvMotionSolvers,...
Virtual base class for mesh motion solver.
const polyMesh & mesh() const
Return reference to mesh.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
motionSolver(const polyMesh &mesh)
Construct from polyMesh.
virtual void twoDCorrectPoints(pointField &) const
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
Similar to velocityLaplacian but with a variable diffusivity, based on the gradient of the displaceme...
volVectorField cellMotionU_
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
scalar tolerance_
Residual threshold.
label nIters_
Number of pLaplacian iterations per solution step.
bool useFixedValuePointMotionUBCs_
void setBoundaryConditions()
Set boundary conditions of cellMotionU based on pointMotionU.
label exponent_
Exponent defining the order or the p-Laplacian.
autoPtr< motionInterpolation > interpolationPtr_
Interpolation used to transfer cell displacement to the points.
scalar toleranceIntermediate_
Residual threshold for intermediate exponents.
pointVectorField pointMotionU_
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update the mesh corresponding to given map.
virtual void solve()
Solve for motion.
Mesh representing a set of points created from polyMesh.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
Lookup type of boundary radiation properties.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the matrix for the laplacian of the field.
Namespace for handling debugging switches.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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.
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fvMatrix< vector > fvVectorMatrix
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
fvPatchField< vector > fvPatchVectorField
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.