Newmark.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) 2015 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::sixDoFSolvers::Newmark
28 
29 Group
30  grpSixDoFRigidBodySolvers
31 
32 Description
33  Newmark 2nd-order time-integrator for 6DoF solid-body motion.
34 
35  Reference:
36  \verbatim
37  Newmark, N. M. (1959).
38  A method of computation for structural dynamics.
39  Journal of the Engineering Mechanics Division, 85(3), 67-94.
40  \endverbatim
41 
42  Example specification in dynamicMeshDict:
43  \verbatim
44  solver
45  {
46  type Newmark;
47  gamma 0.5; // Velocity integration coefficient
48  beta 0.25; // Position integration coefficient
49  }
50  \endverbatim
51 
52 SourceFiles
53  Newmark.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef Newmark_H
58 #define Newmark_H
59 
60 #include "sixDoFSolver.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace sixDoFSolvers
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class Newmark Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class Newmark
74 :
75  public sixDoFSolver
76 {
77  // Private data
78 
79  //- Coefficient for velocity integration (default: 0.5)
80  const scalar gamma_;
81 
82  //- Coefficient for position and orientation integration (default: 0.25)
83  const scalar beta_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("Newmark");
90 
91 
92  // Constructors
93 
94  //- Construct from a dictionary and the body
95  Newmark
96  (
97  const dictionary& dict,
99  );
100 
101  //- Construct and return a clone
102  virtual autoPtr<sixDoFSolver> clone() const
103  {
105  }
106 
107 
108  //- Destructor
109  virtual ~Newmark();
110 
111 
112  // Member Functions
113 
114  //- Drag coefficient
115  virtual void solve
116  (
117  bool firstIter,
118  const vector& fGlobal,
119  const vector& tauGlobal,
120  scalar deltaT,
121  scalar deltaT0
122  );
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace sixDoFSolvers
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::sixDoFSolver
Definition: sixDoFSolver.H:54
Foam::sixDoFSolvers::Newmark::~Newmark
virtual ~Newmark()
Destructor.
Definition: Newmark.C:67
Foam::sixDoFSolvers::Newmark::TypeName
TypeName("Newmark")
Runtime type information.
Foam::sixDoFSolver::dict_
dictionary dict_
Model dictionary.
Definition: sixDoFSolver.H:64
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
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::sixDoFSolvers::Newmark::Newmark
Newmark(const dictionary &dict, sixDoFRigidBodyMotion &body)
Construct from a dictionary and the body.
Definition: Newmark.C:47
Foam::sixDoFRigidBodyMotion
Six degree of freedom motion for a rigid body.
Definition: sixDoFRigidBodyMotion.H:69
Foam::Vector< scalar >
Foam::sixDoFSolvers::Newmark::solve
virtual void solve(bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
Drag coefficient.
Definition: Newmark.C:74
sixDoFSolver.H
Foam::sixDoFSolver::body_
sixDoFRigidBodyMotion & body_
The rigid body.
Definition: sixDoFSolver.H:61
Foam::sixDoFSolvers::Newmark::clone
virtual autoPtr< sixDoFSolver > clone() const
Construct and return a clone.
Definition: Newmark.H:101
Foam::sixDoFSolvers::Newmark
Newmark 2nd-order time-integrator for 6DoF solid-body motion.
Definition: Newmark.H:72