0% found this document useful (0 votes)
83 views2 pages

Examples3 PDF

This document provides exercises on finite difference schemes for numerical thermofluid dynamics. Exercise 3.1 involves discretizing a convection equation using the leapfrog method and analyzing its accuracy and stability. Exercise 3.2 shows the Lax-Friedrichs method is equivalent to adding artificial diffusion. Exercise 3.3 implements the Lax-Friedrichs method in MATLAB and compares the numerical solution to an exact solution. Exercise 3.4 involves discretizing a convection-diffusion equation and verifying the stability boundaries.

Uploaded by

Manuel Oos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views2 pages

Examples3 PDF

This document provides exercises on finite difference schemes for numerical thermofluid dynamics. Exercise 3.1 involves discretizing a convection equation using the leapfrog method and analyzing its accuracy and stability. Exercise 3.2 shows the Lax-Friedrichs method is equivalent to adding artificial diffusion. Exercise 3.3 implements the Lax-Friedrichs method in MATLAB and compares the numerical solution to an exact solution. Exercise 3.4 involves discretizing a convection-diffusion equation and verifying the stability boundaries.

Uploaded by

Manuel Oos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Fundamentals of Numerical Thermo-Fluid Dynamics 322.

061
Examples for home preparation

Exercise 3: Stability of Finite Difference schemes

To be presented on May 20, 2020

3.1) Let us consider a convection equation of passive scalar

∂T ∂T
+u =0 (1)
∂t ∂x
which we discretize with Leapfrog method:

Tjn+1 − Tjn−1 n
Tj+1 n
− Tj−1
= −u (2)
2∆t 2∆x
(a) Determine the order of accuracy of the scheme in time and space
(b) Investigate the stability of this scheme using von Neumann analysis. Provide
the conditions of stability if relevant.

3.2) Discretization of (1) with Lax-Friedrichs method reads

Tjn+1 − 12 (Tj+1
n n
+ Tj−1 ) n
Tj+1 n
− Tj−1
= −u (3)
∆t 2∆x
Show that (3) is equivalent to stabilizing forward-time central-space (FCTS) method
by adding an artificial diffusion to the original equation:

∂T ∂T (∆x)2 ∂ 2 u
+u = (4)
∂t ∂x 2∆t ∂x2
Hint: Compute the error of the approximation unj ≈ 21 (unj+1 + unj−1 )

3.3) Implement the discretization (3) in MatLab in the form

~ = Au~n
un+1 (5)

Take x ∈ [0; 1], ∆x = 0.05, ∆t = 0.02, c = 1. Apply the boundary condition

1
Exercise 3 322.061: Fundamentals of Numerical Thermo-Fluid Dynamics

T1n+1 = T1n at x1 = 0

and the one-sided difference


 
c∆t n c∆t
TNn+1 = T + 1− TNn at xN = 1
∆x N −1 ∆x

Assuming an initial condition

(x−0.5)2
T (x, t0 = 0) = e− 0.08 , (6)

compute the solution at t = 0.2. Then show that one can solve equation (1) with the
method of characteristics to obtain the exact solution

(x−ct−0.5)2
T (x, t) = e− 0.08 (7)

and compare your numerical result with this analytical solution. Explain your ob-
servations.

3.4) Discretize a time-dependent convection-diffusion equation

∂t T + ∂x T = ∂xx T on Ω = [0; 1] (8)

with any scheme from the table 6.18 of the lecture Skriptum.

(a) How many initial and boundary conditions do we need such that the problem
has a unique solution?
(b) Implement the discretization in MatLab, using initial and boundary conditions
of your choice
(c) Vary ∆x and ∆t to verify the stability boundaries of the scheme.

You might also like