symplectic.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) 2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::RBD::rigidBodySolvers::symplectic
28 
29 Description
30  Symplectic 2nd-order explicit time-integrator for rigid-body motion.
31 
32  Reference:
33  \verbatim
34  Dullweber, A., Leimkuhler, B., & McLachlan, R. (1997).
35  Symplectic splitting methods for rigid body molecular dynamics.
36  The Journal of chemical physics, 107(15), 5840-5851.
37  \endverbatim
38 
39  Can only be used for explicit integration of the motion of the body,
40  i.e. may only be called once per time-step, no outer-correctors may be
41  applied. For implicit integration with outer-correctors choose either
42  CrankNicolson or Newmark schemes.
43 
44  Example specification in dynamicMeshDict:
45  \verbatim
46  solver
47  {
48  type symplectic;
49  }
50  \endverbatim
51 
52 See also
53  Foam::RBD::rigidBodySolvers::CrankNicolson
54  Foam::RBD::rigidBodySolvers::Newmark
55 
56 SourceFiles
57  symplectic.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef symplectic_H
62 #define symplectic_H
63 
64 #include "rigidBodySolver.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace RBD
71 {
72 namespace rigidBodySolvers
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class symplectic Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class symplectic
80 :
81  public rigidBodySolver
82 {
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("symplectic");
88 
89 
90  // Constructors
91 
92  //- Construct for the given body from dictionary
94  (
95  rigidBodyMotion& body,
96  const dictionary& dict
97  );
98 
99 
100  //- Destructor
101  virtual ~symplectic();
102 
103 
104  // Member Functions
105 
106  //- Integrate the rigid-body motion for one time-step
107  virtual void solve
108  (
109  const scalarField& tau,
110  const Field<spatialVector>& fx
111  );
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace rigidBodySolvers
118 } // End namespace RBD
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
rigidBodySolver.H
Foam::RBD::rigidBodyMotion
Six degree of freedom motion for a rigid body.
Definition: rigidBodyMotion.H:75
Foam::RBD::rigidBodySolvers::symplectic::~symplectic
virtual ~symplectic()
Destructor.
Definition: symplectic.C:60
Foam::Field< scalar >
Foam::RBD::rigidBodySolvers::symplectic
Symplectic 2nd-order explicit time-integrator for rigid-body motion.
Definition: symplectic.H:78
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::RBD::rigidBodySolvers::symplectic::TypeName
TypeName("symplectic")
Runtime type information.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::RBD::rigidBodySolver
Definition: rigidBodySolver.H:53
Foam::RBD::rigidBodySolvers::symplectic::solve
virtual void solve(const scalarField &tau, const Field< spatialVector > &fx)
Integrate the rigid-body motion for one time-step.
Definition: symplectic.C:67
Foam::RBD::rigidBodySolvers::symplectic::symplectic
symplectic(rigidBodyMotion &body, const dictionary &dict)
Construct for the given body from dictionary.
Definition: symplectic.C:49