symplectic.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::RBD::rigidBodySolvers::symplectic
26 
27 Description
28  Symplectic 2nd-order explicit time-integrator for rigid-body motion.
29 
30  Reference:
31  \verbatim
32  Dullweber, A., Leimkuhler, B., & McLachlan, R. (1997).
33  Symplectic splitting methods for rigid body molecular dynamics.
34  The Journal of chemical physics, 107(15), 5840-5851.
35  \endverbatim
36 
37  Can only be used for explicit integration of the motion of the body,
38  i.e. may only be called once per time-step, no outer-correctors may be
39  applied. For implicit integration with outer-correctors choose either
40  CrankNicolson or Newmark schemes.
41 
42  Example specification in dynamicMeshDict:
43  \verbatim
44  solver
45  {
46  type symplectic;
47  }
48  \endverbatim
49 
50 See also
51  Foam::RBD::rigidBodySolvers::CrankNicolson
52  Foam::RBD::rigidBodySolvers::Newmark
53 
54 SourceFiles
55  symplectic.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef symplectic_H
60 #define symplectic_H
61 
62 #include "rigidBodySolver.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace RBD
69 {
70 namespace rigidBodySolvers
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class symplectic Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class symplectic
78 :
79  public rigidBodySolver
80 {
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("symplectic");
86 
87 
88  // Constructors
89 
90  //- Construct for the given body from dictionary
92  (
93  rigidBodyMotion& body,
94  const dictionary& dict
95  );
96 
97 
98  //- Destructor
99  virtual ~symplectic();
100 
101 
102  // Member Functions
103 
104  //- Integrate the rigid-body motion for one time-step
105  virtual void solve
106  (
107  const scalarField& tau,
108  const Field<spatialVector>& fx
109  );
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace rigidBodySolvers
116 } // End namespace RBD
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Six degree of freedom motion for a rigid body.
Symplectic 2nd-order explicit time-integrator for rigid-body motion.
Definition: symplectic.H:79
TypeName("symplectic")
Runtime type information.
virtual void solve(const scalarField &tau, const Field< spatialVector > &fx)
Integrate the rigid-body motion for one time-step.
Definition: symplectic.C:65
symplectic(rigidBodyMotion &body, const dictionary &dict)
Construct for the given body from dictionary.
Definition: symplectic.C:47
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Namespace for OpenFOAM.
dictionary dict