• Aucun résultat trouvé

PW #3: transport equation

N/A
N/A
Protected

Academic year: 2022

Partager "PW #3: transport equation"

Copied!
3
0
0

Texte intégral

(1)

EFREI MASTERS DEGREE IN FINANCIAL ENGINEERING

PW #3: transport equation

MARCH19, 2012

The aim of this project is to compare numerical schemes designed to solve the linear transport equa- tion:





tY(t,x)+u(t,x)·xY(t,x)=f(t,x), (1a)

Y(0,x)=Y0(x), (1b)

Y(t, 0)=α, (1c)

in the bounded domain [0, 1]. The velocity fieldu≥0, the source termf, the initial conditionY0and the boundary datumα∈Raregiven.

The domain is discretized by means of the nodesxi=(i−1)∆x, withx=N+11 and 1≤iN for some N∈N. As for the time, we settn=nt for some∆t>0.

Exercise 1 (Upwind method for constant velocity)

We setin this exerciseu(t,x)=u0=2,f(t,x)=0,Y0(x)=cos(2πx)andα=1. We focus on theupwind methodwhich reads:

Yin+1Yin

t +u0YinYi−1n

x =0.

1. Implement this scheme.

2. Given a number of intervalsN, set∆t=∆x/2. How many iterations are necessary to reach the steady state?

3. What happens when setting∆t=∆x?

4. For someN and∆t=∆x/2, compute the error with respect to time. What do you observe?

5. For∆t =∆x/2, compute the error at timet=0.25forN=102,103,104,105. What do you con- clude about this scheme?

Exercise 2 (Upwind method in the periodic case)

We replace the boundary condition(1c)by the periodic assumption:

Y(t, 0)=Y(t, 1). (2)

We then setin this exerciseu(t,x)=u0=2and:

Y0(x)=

















0, ifx∈(0, 0.3)∪(0.7, 1), 1, ifx∈(0.4, 0.6), 10x−3, ifx∈(0.3, 0.4), 7−10x, ifx∈(0.6, 0.7).

We plan to solve this problem with the same scheme as in Ex. 1.

Numerical analysis applied to financial issues (Y. Penel) 1/3

(2)

EFREI MASTERS DEGREE IN FINANCIAL ENGINEERING

1. Case f(t,x)=0.

(a) For∆t=∆x/2, compute the numerical solution. What do you observe as time goes by?

(b) The exact solution at time k2, k∈N, isY(k2,x)=Y0(x). Fork =1, 2, 3, 4, 5, plot the error.

Interpret this result.

(c) Does the numerical solution remain bounded? What are these bounds?

2. Case f(t,x)=cos(10πt).

(a) Does the conclusion of Q. 1(c) still hold?

(b) Plot the error at timet=1for∆xdecreasing.

Exercise 3 (An unstable scheme)

We take data as in Ex. 1. Implement the downwind scheme:

Yin+1−Yin

t +u0

Yin+1Yin1 2∆x =0.

1. Is this scheme consistent with Eq.(1a)?

2. Using numerical simulations, show that this scheme is unconditionally unstable.

We are interested in another numerical method devoted to advection operators as in (1). It is described by the following algorithm:

Algorithm 1Method of characteristics

1: whilen<nmaxdo

2: forifrom 1 toN do

3: Computeξxi−∆t·uni

4: ifξ≤0then

5: Yin+1α

6: else

7: Findjsuch thatξ∈[xj,xj+1)

8: Setθ←(xj+1ξ)/∆x

9: Yin+1θYjn+(1−θ)Yj+1n

10: end if

11: end for

12: nn+1

13: end while

Numerical analysis applied to financial issues (Y. Penel) 2/3

(3)

EFREI MASTERS DEGREE IN FINANCIAL ENGINEERING

Exercise 4 (Two numerical schemes for a non-trivial case) We setu(t,x)=t x(1x),f(t,x)=0,α=0andY0as in Ex. 2.

1. Implement the method of characteristics (MOC).

2. Show that this scheme is unconditionally stable, i.e. that the time step∆t is not necessarily related to the mesh size∆x.

3. Determine at a fixed timetnthe maximal valueUnofx7→u(tn,x).

4. Set∆tn=∆x/Un. Compare at each iteration the corresponding solutions to the upwind scheme and to MOC. Which scheme seems to be the most suitable one?

Numerical analysis applied to financial issues (Y. Penel) 3/3

Références

Documents relatifs

Arbitrary Lagrangian-Eulerian discontinuous Galerkin method, hy- perbolic conservation laws, geometric conservation law, cell entropy inequality, error estimates, maximum

A second scheme is associated with a decentered shock-capturing–type space discretization: the II scheme for the viscous linearized Euler–Poisson (LVEP) system (see section 3.3)..

Thanks to Theorem 1.1, for any Kantorovich potential u and any optimal transport plan g, u is decreasing at maximal slope on any maximal transport ray; this implies, in particular,

Abstract—HPC simulations suffer from failures of numerical reproducibility because of floating-point arithmetic peculiari- ties. Different computing distributions of a parallel

A small Mach number allows the decrease of both acoustic waves and shear layer vortex in the velocity divergence field.. A small Prandtl number allows the damping of acoustic waves

On s’intéresse à l’étude de ces équations le cas où les coefficients ne vérifient pas la condition de Lipschits ; précisément dans le cas où les coefficients sont

For smooth and decaying data, this problem (the so-called soliton resolution conjecture) can be studied via the inverse transform method ((mKdV) is integrable): for generic such

The common point to Kostant’s and Steinberg’s formulae is the function count- ing the number of decompositions of a root lattice element as a linear combination with