Loading...
Searching...
No Matches
multiDisplacementMotionSolver.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2024 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::multiDisplacementMotionSolver
28
29Group
30 grpMeshMotionSolvers
31
32Description
33 Mesh motion solver for a polyMesh. Applies multiple (displacement) motion
34 solvers in order.
35
36 Not very efficient : all displacementMotionSolvers store a copy
37 of the initial points (points0) and the displacement (pointDisplacement
38 or also cellDisplacement).
39 Used to combine large-scale, implicit displacement smoothing (e.g.
40 displacementLaplacian) with point smoothing.
41
42Usage
43 Example of the dynamicMeshDict specification:
44 \verbatim
45 motionSolver multiDisplacement;
46 solvers
47 {
48 // Solve finite volume laplacian to efficiently smooth displacement
49 // (not point locations)
50 displacementLaplacian
51 {
52 motionSolver displacementLaplacian;
53 diffusivity uniform;
54 }
55
56 // Apply few iterations of smoothing of point locations
57 displacementPointSmoothing
58 {
59 motionSolver displacementPointSmoothing;
60 pointSmoother laplacian;
61 nPointSmootherIter 10;
62 }
63 }
64 \endverbatim
65
66Note
67 When using displacementLaplacian: the default behaviour for the
68 cellDisplacement is to apply fixed value boundary conditions (by averaging
69 point values) only to those pointDisplacement boundary conditions that
70 are fixed value. Quite a few point boundary conditions (e.g. surfaceSlip,
71 edgeSlip) are not so require an explicitly provided cellDisplacement
72 field with 'cellMotion' boundary conditions for those patches.
73
74SourceFiles
75 isplacementMultiMotionSolver.C
76\*----------------------------------------------------------------------------*/
77
78#ifndef Foam_multiDisplacementMotionSolver_H
79#define Foam_multiDisplacementMotionSolver_H
80
82
83// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84
85namespace Foam
86{
88/*---------------------------------------------------------------------------*\
89 Class multiDisplacementMotionSolver Declaration
90\*---------------------------------------------------------------------------*/
91
92class multiDisplacementMotionSolver
93:
95{
96 // Private data
97
98 //- Current points
99 pointField curPoints_;
100
101 //- List of motion solvers
103
104
105 // Private Member Functions
106
107 //- No copy construct
108 multiDisplacementMotionSolver
109 (
110 const multiDisplacementMotionSolver&
111 ) = delete;
112
113 //- No copy assignment
114 void operator=(const multiDisplacementMotionSolver&) = delete;
115
116
117public:
118
119 //- Runtime type information
120 TypeName("multiDisplacement");
121
122
123 // Constructors
124
125 //- Construct from polyMesh and IOdictionary
126 multiDisplacementMotionSolver
127 (
128 const polyMesh&,
129 const IOdictionary&
130 );
131
132 //- Construct from components
133 multiDisplacementMotionSolver
134 (
135 const polyMesh& mesh,
136 const IOdictionary& dict,
138 const pointIOField& points0
139 );
140
141
142 //- Destructor
144
145
146 // Member Functions
147
148 //- Provide current points for motion
149 virtual tmp<pointField> curPoints() const;
150
151 //- Solve for motion
152 virtual void solve();
153
154 //- Update local data for geometry changes
155 virtual void movePoints(const pointField&);
156
157 //- Update local data for topology changes
158 virtual void updateMesh(const mapPolyMesh&);
159};
160
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164} // End namespace Foam
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168#endif
169
170// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
displacementMotionSolver(const displacementMotionSolver &)=delete
No copy construct.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyMesh & mesh() const
Return reference to mesh.
virtual tmp< pointField > curPoints() const
Provide current points for motion.
~multiDisplacementMotionSolver()=default
Destructor.
TypeName("multiDisplacement")
Runtime type information.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorIOField pointIOField
pointIOField is a vectorIOField.
vectorField pointField
pointField is a vectorField.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68