OpenFOAM
6
The OpenFOAM Foundation
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
b
c
d
f
g
k
l
m
p
r
s
t
v
w
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
sixDoFRigidBodyMotion
sixDoFSolvers
CrankNicolson
CrankNicolson.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) 2015-2018 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::sixDoFSolvers::CrankNicolson
26
27
Description
28
Crank-Nicolson 2nd-order time-integrator for 6DoF solid-body motion.
29
30
The off-centering coefficients for acceleration (velocity integration) and
31
velocity (position/orientation integration) may be specified but default
32
values of 0.5 for each are used if they are not specified. With the default
33
off-centering this scheme is equivalent to the Newmark scheme with default
34
coefficients.
35
36
Example specification in dynamicMeshDict:
37
\verbatim
38
solver
39
{
40
type CrankNicolson;
41
aoc 0.5; // Acceleration off-centering coefficient
42
voc 0.5; // Velocity off-centering coefficient
43
}
44
\endverbatim
45
46
See also
47
Foam::sixDoFSolvers::Newmark
48
49
SourceFiles
50
CrankNicolson.C
51
52
\*---------------------------------------------------------------------------*/
53
54
#ifndef CrankNicolson_H
55
#define CrankNicolson_H
56
57
#include "
sixDoFSolver.H
"
58
59
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61
namespace
Foam
62
{
63
namespace
sixDoFSolvers
64
{
65
66
/*---------------------------------------------------------------------------*\
67
Class CrankNicolson Declaration
68
\*---------------------------------------------------------------------------*/
69
70
class
CrankNicolson
71
:
72
public
sixDoFSolver
73
{
74
// Private data
75
76
//- Acceleration off-centering coefficient (default: 0.5)
77
const
scalar aoc_;
78
79
//- Velocity off-centering coefficient (default: 0.5)
80
const
scalar voc_;
81
82
83
public
:
84
85
//- Runtime type information
86
TypeName
(
"CrankNicolson"
);
87
88
89
// Constructors
90
91
//- Construct from a dictionary and the body
92
CrankNicolson
93
(
94
const
dictionary
&
dict
,
95
sixDoFRigidBodyMotion
& body
96
);
97
98
99
//- Destructor
100
virtual
~CrankNicolson
();
101
102
103
// Member Functions
104
105
//- Drag coefficient
106
virtual
void
solve
107
(
108
bool
firstIter,
109
const
vector
& fGlobal,
110
const
vector
& tauGlobal,
111
scalar deltaT,
112
scalar deltaT0
113
);
114
};
115
116
117
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119
}
// End namespace sixDoFSolvers
120
}
// End namespace Foam
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
#endif
125
126
// ************************************************************************* //
Foam::sixDoFRigidBodyMotion
Six degree of freedom motion for a rigid body.
Definition:
sixDoFRigidBodyMotion.H:66
Foam::sixDoFSolvers::CrankNicolson::TypeName
TypeName("CrankNicolson")
Runtime type information.
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::sixDoFSolvers::CrankNicolson::CrankNicolson
CrankNicolson(const dictionary &dict, sixDoFRigidBodyMotion &body)
Construct from a dictionary and the body.
Definition:
CrankNicolson.C:44
sixDoFSolver.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition:
dictionary.H:137
Foam::sixDoFSolvers::CrankNicolson::solve
virtual void solve(bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
Drag coefficient.
Definition:
CrankNicolson.C:64
Foam::sixDoFSolvers::CrankNicolson
Crank-Nicolson 2nd-order time-integrator for 6DoF solid-body motion.
Definition:
CrankNicolson.H:69
Foam::Vector< scalar >
Foam::sixDoFSolvers::CrankNicolson::~CrankNicolson
virtual ~CrankNicolson()
Destructor.
Definition:
CrankNicolson.C:57
Foam::sixDoFSolver
Definition:
sixDoFSolver.H:49
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:30
Generated by
1.8.13