Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Derive for whi
h values of M the Prandtl-Glauert equation is hyperboli
, and for
whi
h values it is ellipti
.
1
1
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 1
2
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 1
3. Consider the 2D
hannel given in Figure 1. The lower and upper wall are solid
walls. The
hannel has a thin prole at its lower wall. The
hannel's left boundary
(x = 0) is in
ow boundary and the right boundary (x = 3) out
ow boundary.
y
y= f(x)
0 x
0 1 2 3
Figure 1: Channel
Give boundary
onditions for the Prandtl-Glauert equation, at all four boundaries,
for su
essively supersoni
and subsoni
in
ow in the
hannel.
Note that x = 0 at both the inlet and outlet yields a boundary-value problem
with Neumann
onditions at all boundaries, whi
h is ill-posed. (The solution is
determined up to a
onstant then.) At { at least { the inlet or the outlet, a Diri
hlet
ondition for must be imposed.
1
supersonic channel
0
0 1 2 3
subsonic channel
0
0 1 2 3
3
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 1
4
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 1
2. Derive the modied equation for the leapfrog s
heme, with respe
t to grid point
m; l as given in Figure 14 of the paper \Hyperboli
Problems" from the le
ture notes.
5
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 1
3. Derive with Von Neumann stability analysis the ampli
ation fa
tor of the Lax-
Friedri
hs s
heme and the leapfrog s
heme, and from that, for both s
hemes, the
stability requirement on t.
6
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
t
a
u
x
; (1) a
The spatial domain runs from = 0 to = 1 and is taken periodi
, that is, the boundaries = 0 and = 1
x x x x
are glued together (the orresponding grid points, = 1 and = , oin ide). i i n
( = 0) = 4( 12 )2 u x; t (2) b
x
;
with a parameter determining the width of the Gaussian. Asked in all
ases: the solution at = 1, that
b t
is, after one period. The exa t dis rete solution ( = 1) is identi al to the initial solution. It is given in u x; t
Figure 1.
1.2 1.2 1.2
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 1: Exa t dis rete solutions for b = 0:01 and from left to right: n = 21; 41; 81.
Use the Matlab program linearflow.m. This program is pre-programmed with the forward-in-time,
entral-
in-spa
e nite dieren
e s
heme, as dis
ussed in Se
tion 3.1 of the paper \Hyperboli
Problems" from the
le
ture notes (s
heme number 0 in the Matlab program). Start by running the Matlab program and observe
the instability of this s
heme for any value of
(3)
a t
x
:
On your s
reen the exa
t dis
rete solution is given in blue and the nite-dieren
e solution in red.
You pro
eed by implementing and testing the alternative s
hemes des
ribed in su
essively Se
tions 3.2.1 {
3.2.4 of the le
ture notes: (i) the forward-in-time, upwind-in-spa
e s
heme, (ii) the Lax-Friedri
hs s
heme,
(iii) the leapfrog s
heme, and (iv) the Lax-Wendro two-step s
heme. For
onvenien
e, the fully pre-
programmed Matlab program linearflow-mother.m may also be used.
1.1 Forward-in-time, upwind-in-spa
e s
heme
1. Implement this s
heme and run it for su
essively = 1 1, = 1 0 and = 0 9, for in all three
ases:
:
:
:
= 41, = 1 and = 0 01. Sket
h your numeri
al solutions in the three graphs following next. In
n a b :
1
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
ea
h of the three graphs the exa
t dis
rete solution has been pre-plotted. You may give
omments, in
the box below the graphs, on ea
h of the three numeri
al solutions.
1.2 1.2 1.2
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 2: Forward-in-time, upwind-in-spa e s heme, from left to right: = 1:1, = 1:0 and = 0:9.
2. Redo the same omputations as above, but now with = 1 instead of = 1 (wave travelling to the a a
left instead of to the right). Sket
h your numeri
al solutions in the three graphs given below and give
omments.
1.2 1.2 1.2
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 3: Forward-in-time, upwind-in-spa e s heme, a = 1, from left to right: = 1:1, = 1:0 and = 0:9.
2
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
3. The parameter determines the width of the Gaussian. Take = 21, = 1 and = 0 5, and run
b n a
:
the three graphs given below, in whi
h the exa
t dis
rete solutions have been pre-plotted. What do
you observe in the numeri
al resolution of the maximum in the wave? Do you have an explanation for
this?
1.2 1.2 1.2
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
4. The Matlab program gives the 1-norm of the dieren
e between the exa
t dis
rete solution at = 1
L t
and the numeri al solution. In the program this error is simply named error. Take = 1, = 0 01 a b :
and = 0 9, run the program for su
essively = 21 41 81, ll in the errors in the table given below
: n ; ;
and investigate the order-of-a
ura
y-behavior of the s
heme from these data.
1 -norm error n L
21
41
81
Table 1: Error behavior forward-in-time, upwind-in-spa
e s
heme.
3
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
= 41, = 1 and = 0 01. Sket
h your numeri
al solutions in the three graphs given below and give
n a b :
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 5: Lax-Friedri hs s heme, from left to right: = 1:1, = 1:0 and = 0:9.
2. Take = 1, = 0 01 and = 0 9, run the program for su
essively = 21 41 81, ll in the errors
a b :
: n ; ;
in the table given below and investigate the order-of-a
ura
y-behavior of the Lax-Friedri
hs s
heme
from these data.
1 -norm error n L
21
41
81
Table 2: Error behavior Lax-Friedri
hs s
heme.
4
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
= 41, = 1 and = 0 01. Sket
h your numeri
al solutions in the three graphs given below and give
n a b :
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 6: Leapfrog s heme, from left to right: = 1:1, = 1:0 and = 0:9.
2. Take = 1, = 0 01 and = 0 9, run the program for su
essively = 21 41 81, ll in the errors in
a b :
: n ; ;
the table given below and investigate the order-of-a
ura
y-behavior of the leapfrog s
heme.
1 -norm error n L
21
41
81
Table 3: Error behavior leapfrog s
heme.
5
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
= 41, = 1 and = 0 01. Sket
h your numeri
al solutions in the three graphs given below and
n a b :
give
omments on ea
h of the three numeri
al solutions. Make
omparisons with the leapfrog s
heme's
results and explain.
1.2 1.2 1.2
1 1 1
0 0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 7: Lax-Wendro two-step s heme, from left to right: = 1:1, = 1:0 and = 0:9.
2. Take = 1, = 0 01 and = 0 9, run the program for su
essively = 21 41 81, ll in the errors
a b :
: n ; ;
in the table given below and investigate the order-of-a
ura
y-behavior of the Lax-Wendro two-step
s
heme.
1 -norm error n L
21
41
81
Table 4: Error behavior Lax-Wendro two-step s
heme.
6
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 2
t
+ =0
u
u
x
: (4)
We
onsider the same initial solution as in the previous linear exer
ise. Use the Matlab program Burgers.m.
The program is fully pre-programmed. Run it for both s
hemes, for su
essively max
= 2 1 0 5.
u t
; ; :
For this, you only have to
hange the input parameters: s
heme and
. Write down your observations and
x
on lusions for the omputations with both s hemes, explain where possible.
7
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 3
In this
omputer exer
ise the a
ura
y and monotoni
ity properties of some
ell-
entered
nite-volume methods are investigated, among these a higher-order a
urate, monotone
method introdu
ed in the le
ture-notes paper \A Robust Finite-Volume Method for Con-
ve
tion Problems".
The governing partial dierential equation is again
u u
+ a = 0; with a
onstant. (1)
t x
The spatial domain is again x 2 [0; 1℄, with periodi
boundary
onditions.
The dis
ontinuous initial solution is:
(
0; if 0:3 x 0:7,
u(x; t = 0) = (2)
1; elsewhere.
Time integration is done with an expli
it, third-order a
urate, three-stage Runge-Kutta
s
heme.
Run the program finvol.m for su
essively the parameter values flux=0,...,4. This
orresponds with the following methods for
omputing the
uxes:
flux method
0 rst-order upwind
1 = 13
2 limited = 13 (Koren limiter)
3 minmod limiter
4 superbee limiter
In all runs, the time step is so small that the temporal dis
retization error is negligible
with respe
t to the spatial dis
retization error.
First observe the qualitative dieren
es between the methods 0,1 and 2, by
omparing
the solutions at the pre-assigned nal time (tmax=5). In all graphs that will appear on
your s
reen, the exa
t dis
rete solution is depi
ted in blue and the numeri
al solution in
red.
Next
ompare the solutions for the three methods 2,3 and 4, and observe the qualitative
solution dieren
es for the three limiters.
Rerun the methods 2,3 and 4 for CFL=1.0 instead of CFL=0.5. Observe the monotoni
ity
properties of the
orresponding solutions.
1
JMBC-CFD-1, 2008 Pra
ti
al Barry Koren, Part 3
In this
omputer exer
ise the same study is performed as in the previous exer
ise, but now
with a hyperboli
system of quasi-linear partial dierential equations: the 1D, unsteady
Euler equations for a perfe
t gas.
The initial
onditions are those of Test 1, spe
ied in Table 2.1, p.18 of the le
ture-notes
paper \Building Your Own Sho
k Tube". In literature, this test
ase is known as Sod's
problem. It
on
erns an initial solution with a high-density { high-pressure gas at the
left, and a low-density { low-pressure gas at the right, both at rest.
For the
ux
omputations, use is made of Roe's approximate Riemann solver, as des
ribed
in abovementioned paper. For the left and right
ell fa
es needed for this Riemann solver,
the same ve s
hemes are used as in the foregoing exer
ise.
Run the program Roe MUSCL s
heme.m for su
essively the parameter values limtype=0,...,4,
whi
h
orresponds with:
limtype method
0 rst-order upwind
1 = 31
2 limited = 31 (Koren limiter)
3 minmod limiter
4 superbee limiter
Also here, the time step is su
h that the temporal dis
retization error
an be negle
ted
in
omparison with the spatial dis
retization error. Contrary to the method des
ribed
in the le
ture-notes paper, time integration is not done with the se
ond-order Han
o
k
s
heme, but with a Runge-Kutta s
heme instead.
In ea
h run, ve solution
omponents are plotted: density, velo
ity, pressure, Ma
h num-
ber and entropy. For ea
h of these ve solution
omponents the numeri
al solution and
the exa
t solution are plotted, the latter with a solid line without markers. (Without
markers, be
ause it is the genuine exa
t solution, not the dis
rete exa
t solution.) An ap-
propriate solution
omponent for
omparing the dierent solution methods is the Ma
h
number. Note that the wiggles for the unlimited = 31 s
heme lead to intermediate
omputational results with an imaginary part, a bad property. (Fortunately, Matlab is
suÆ
iently robust to withstand this feature.) Also note that the under- and overshoots
that still appear in the results of the limited s
hemes diminish when rening the grid.
You may play with the program by running the Tests 2; : : : ; 5 as spe
ied in Tables
2.3, 2.5, 2.7 and 2.9 of the le
ture-notes paper \Building Your Own Sho
k Tube". The
orresponding initial data
an be assigned in the le problem spe
ifi
ation.m. In that
le, you
an also nd the pre-assigned values of some more test
ases.