forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstokes_2d_exact.html
284 lines (252 loc) · 7.83 KB
/
stokes_2d_exact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<html>
<head>
<title>
STOKES_2D_EXACT - Exact solutions to the 2D Incompressible Steady Stokes Equations
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
STOKES_2D_EXACT<br>
Exact solutions to the <br>
2D Incompressible Steady Stokes Equations
</h1>
<hr>
<p>
<b>STOKES_2D_EXACT</b>,
a C++ library which
evaluates exact solutions to the incompressible steady
Stokes equations in 2D.
</p>
<p>
The incompressible steady 2D Stokes equations seek functions u(x,y),
v(x,y), (the velocity vector) and p(x,y) (the pressure) such that
<pre>
- uxx - uyy + dpdx = f
- vxx - vyy + dpdy = g
ux + vy = h
</pre>
while satisfying boundary conditions for u and v, and a normalization
condition for p, such as specifying its value at one point, or requiring
that the integral of p over the region be 0.
</p>
<p>
Three exact solution fields are provided here.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>STOKES_2D_EXACT</b> is available in
<a href = "../../c_src/stokes_2d_exact/stokes_2d_exact.html">a C version</a> and
<a href = "../../cpp_src/stokes_2d_exact/stokes_2d_exact.html">a C++ version</a> and
<a href = "../../f77_src/stokes_2d_exact/stokes_2d_exact.html">a FORTRAN77 version</a> and
<a href = "../../f_src/stokes_2d_exact/stokes_2d_exact.html">a FORTRAN90 version</a> and
<a href = "../../m_src/stokes_2d_exact/stokes_2d_exact.html">a MATLAB version</a> and
<a href = "../../py_src/stokes_2d_exact/stokes_2d_exact.html">a Python version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/navier_stokes_2d_exact/navier_stokes_2d_exact.html">
NAVIER_STOKES_2D_EXACT</a>,
a C++ library which
evaluates an exact solution to the incompressible time-dependent
Navier-Stokes equations over an arbitrary domain in 2D.
</p>
<p>
<a href = "../../m_src/navier_stokes_mesh2d/navier_stokes_mesh2d.html">
NAVIER_STOKES_MESH2D</a>,
MATLAB data files which
define triangular meshes for several
2D test problems involving the Navier Stokes equations
for fluid flow, provided by Leo Rebholz.
</p>
<p>
<a href = "../../cpp_src/spiral_data/spiral_data.html">
SPIRAL_DATA</a>,
a C++ library which
computes a velocity vector field that satisfies the continuity
equation, writing the data to a file that can be plotted
by gnuplot.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Junping Wang, Yanqiu Wang, Xiu Ye,<br>
A robust numerical method for Stokes equations based on divergence-free
H(div) finite element methods,<br>
SIAM Journal on Scientific Computing,<br>
Volume 31, Number 4, 2009, pages 2784-2802.
</li>
<li>
Howard Elman, Alison Ramage, David Silvester,<br>
Finite Elements and Fast Iterative Solvers with
Applications in Incompressible Fluid Dynamics,<br>
Oxford, 2005,<br>
ISBN: 978-0198528678,<br>
LC: QA911.E39.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "s2de.cpp">s2de.cpp</a>, the source code.
</li>
<li>
<a href = "s2de.hpp">s2de.hpp</a>, the include file.
</li>
<li>
<a href = "s2de.sh">s2de.sh</a>,
BASH commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "s2de_prb.cpp">s2de_prb.cpp</a>,
a sample calling program.
</li>
<li>
<a href = "s2de_prb.sh">s2de_prb.sh</a>,
BASH commands to compile and run the sample program.
</li>
<li>
<a href = "s2de_prb_output.txt">s2de_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<p>
Graphics files:
<ul>
<li>
<a href = "stokes1_commands.txt">stokes1_commands.txt</a>,
commands to draw the velocity field.
</li>
<li>
<a href = "stokes1_data.txt">stokes1_data.txt</a>,
velocity field data.
</li>
<li>
<a href = "stokes1.png">stokes1.png</a>,
a PNG plot of the velocity field.
</li>
<li>
<a href = "stokes2_commands.txt">stokes2_commands.txt</a>,
commands to draw the velocity field.
</li>
<li>
<a href = "stokes2_data.txt">stokes2_data.txt</a>,
velocity field data.
</li>
<li>
<a href = "stokes2.png">stokes2.png</a>,
a PNG plot of the velocity field.
</li>
<li>
<a href = "stokes3_commands.txt">stokes3_commands.txt</a>,
commands to draw the velocity field.
</li>
<li>
<a href = "stokes3_data.txt">stokes3_data.txt</a>,
velocity field data.
</li>
<li>
<a href = "stokes3.png">stokes3.png</a>,
a PNG plot of the velocity field.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>GRID_2D</b> returns a regular 2D grid.
</li>
<li>
<b>R8VEC_AMAX</b> returns the maximum absolute value in an R8VEC.
</li>
<li>
<b>R8VEC_AMIN</b> returns the minimum absolute value in an R8VEC.
</li>
<li>
<b>R8VEC_MAX</b> returns the value of the maximum element in a R8VEC.
</li>
<li>
<b>R8VEC_MIN</b> returns the value of the minimum element in a R8VEC.
</li>
<li>
<b>R8VEC_NORM_L2</b> returns the L2 norm of an R8VEC.
</li>
<li>
<b>R8VEC_UNIFORM_AB_NEW</b> returns a scaled pseudorandom R8VEC.
</li>
<li>
<b>RESID_STOKES1</b> returns residuals of the exact Stokes solution #1.
</li>
<li>
<b>RESID_STOKES2</b> returns residuals of the exact Stokes solution #2.
</li>
<li>
<b>RESID_STOKES3</b> returns residuals of the exact Stokes solution #3.
</li>
<li>
<b>RHS_STOKES1</b> returns the right hand sides of the exact Stokes solution #1.
</li>
<li>
<b>RHS_STOKES2</b> returns the right hand sides of the exact Stokes solution #2.
</li>
<li>
<b>RHS_STOKES3</b> returns the right hand sides of the exact Stokes solution #3.
</li>
<li>
<b>STOKES_GNUPLOT</b> writes the Stokes velocity field to files for GNUPLOT.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>UVP_STOKES1</b> evaluates the exact Stokes solution #1.
</li>
<li>
<b>UVP_STOKES2</b> evaluates the exact Stokes solution #2.
</li>
<li>
<b>UVP_STOKES3</b> evaluates the exact Stokes solution #3.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 11 February 2015.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>