首页 >
> 详细

Final Projects 1

Instructions: Choose two of the problems and write a jupyter notebook to integrate all

the parts of the problem solution; this includes any analytic calculations and theory, code,

results and analysis of the results.

1. The cellar. Neglecting the curvature of the Earth and the diurnal (daily) variation of

temperature, the distribution of temperature T(t, x) at a depth x and a time t is given

by the Heat equation:

∂T

∂t = κ

∂

2T

∂x2

. (1)

Here κ is thermometric diffusivity of soil whose value is approximately κ = 2 ×

10䛈 3

cm2/sec (the fundamental time scale is a year, 3.15 × 107

sec). Assume that the

temperature f(t) at the surface of the Earth (x = 0) has only two values, a “summer”

value for half of the year and a “winter” value for the other half, and that this pattern

is repeated every year (i.e. at x = 0 the temperature is periodic with a period of a

year). The temperature T should decay to zero as x → ∞.

a) Show that the backward (implicit Euler) difference scheme for (1) is consistent

and unconditionally stable. What is the order of the scheme?

b) Implement the backward difference scheme to find a numerical approximation to

(1). Consider the initial condition u0(x) = f(t0)e

䛈 q1x

, where q1 = 0.71mm 1 and t0

is your initial time. For your computational spatial domain take a sufficiently long

interval so that the right-end boundary condition u = 0 can be used. Select ∆t

and ∆x small enough to resolve well the numerical solution. Plot the numerical

solution at several times.

c) From your numerical solution, find the depth x

∗ at which the temperature is

opposite in phase to the surface temperature, i.e, it is summer at x

∗ when is

winter at the surface. Note that the temperature variation at x

∗

is much smaller

than that at the surface. This makes the depth x

∗

ideal for a wine cellar or

vegetable storage.

2. A simple model for air quality control. An air pollutant gets advected by the wind

and at the same time diffuses as it travels. The time evolution of the concentration

u(t, x, y) of the pollutant at position (x, y) and at time t can be modeled by the

advection diffusion equation

ut + Uwux + Vwuy = D(uxx + uyy), (2)

1All course materials (class lectures and discussions, handouts, homework assignments, examinations, web

materials) and the intellectual content of the course itself are protected by United States Federal Copyright

Law, the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all other persons)

from recording lectures or discussions and from distributing or selling lectures notes and all other course

materials without the prior written permission of the instructor.

1

where (Uw, Vw) are the components of the wind velocity and D > 0 is the diffusivity

coefficient (assumed small) of the pollutant in the air.

a) The one-dimensional case of (2) is

ut + Uwux = Duxx. (3)

(If D = 0, this is the simple one-way wave equation (also called advection equation) we have seen in class). Assuming Uw < 0 (and constant) find the stability

condition for the scheme

b) If D = 0, one gets an “upwind” scheme for the one-way way equation. Show that

this scheme satisfies an equation of the form ut + Uwux = σuxx to second order

accuracy, where σ ≥ 0 (obtain the explicit expression of σ in terms of ∆x and

λ). Therefore the numerical approximation using this upwind scheme will have

some numerical diffusion or dissipation. How do you have to take your numerical

parameters to guarantee that your numerical diffusion is much less than the “real”

diffusion when D 6= 0? Explain

c) Write a code to implement (4) with homogeneous boundary conditions (u = 0 at

the boundary) and use it to solve (3) in [[5, 1] with initial condition

u0(x) = (

1 for 0 ≤ x ≤ 1/2

0 otherwise

(5)

Take Uw = =1 and D = 0.1 and select ∆t and ∆x small enough to resolve well

the numerical solution. Plot the solution at t = 1, 2, 3.

3. Acoustic waves. The air pressure p(t, x) in an organ pipe is governed by the wave

equation

∂

2p

∂t2

= a

2

∂

2p

∂x2

0 < x < l, t > 0, (6)

where l is the length of the pipe and a is a constant. If the pipe is open, the boundary

conditions are given by

p(t, 0) = p0 and p(t, l) = p0. (7)

If the pipe is closed at the end x = l the boundary conditions are

p(t, 0) = p0 and ∂p

∂x(t, l) = 0. (8)

Assume that a = 1, l = 1, and the initial conditions are

p(0, x) = p0 cos 2πx, and ∂p

∂t(0, x) = 0 0 ≤ x ≤ 1. (9)

2

a) Write down an explicit finite difference method for (6) and give stability conditions

and the order of the method.

b) Implement your method given in a) for the open pipe with p0 = 0.9, and with

step sizes ∆t = ∆x = 0.05. Plot your numerical solution at t = 0.5 and t = 1.0.

c) Implement your method given in a) for the closed pipe at x = l with p0 = 0.9,

and with step sizes ∆t = ∆x = 0.05. Plot your numerical solution at t = 0.5 and

t = 1.0.

d) Repeat b) for ∆t = ∆x = 0.025. Construct a higher order approximation by

extrapolating your numerical solutions corresponding to ∆t = ∆x = 0.05 and

∆t = ∆x = 0.025. What’s the order of the new approximation?

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp2

- 代写data留学生作业、代做analysis课程作业、代写python，C+ 2020-09-30
- 代写data Analysis作业、代做python，Java程序语言作业、 2020-09-30
- Program课程作业代写、代做python，Java，C++程序语言作业、 2020-09-30
- 代做sit202课程作业、Networks作业代做、Java，C++程序设计 2020-09-30
- 代写data留学生作业、代做c++课程设计作业、C++程序语言作业调试代写留 2020-09-30
- 159100留学生作业代做、代写programming作业、C++编程语言作 2020-09-29
- Engineering作业代做、代写html/Css语言作业、代写web程序 2020-09-29
- 代写kit206/506作业、代做system课程作业、代写sql程序设计作 2020-09-29
- Lab 2 Jsf作业代做、Java编程语言作业调试、Java实验作业代写、 2020-09-29
- 代写mis275留学生作业、代做analytics作业、代做python，J 2020-09-28
- Html留学生作业代做、代写css/Java编程语言作业、代做java实验作 2020-09-28
- Comp3278作业代写、Database作业代做、代写sql实验作业、Sq 2020-09-28
- Macm 204课程作业代做、C/C++，Java，Python程序设计作业 2020-09-28
- Cis 484作业代做、代写sql编程语言作业、代做sql课程设计作业、代写 2020-09-27
- 代写kit206课程作业、代做software留学生作业、代写c++程序语言 2020-09-27
- Comp2100作业代做、代写programming作业、C/C++编程设计 2020-09-27
- Msbd5015作业代写、Python编程语言作业调试、代写python课程 2020-09-27
- Programming作业代写、Java程序设计作业调试、代做algorit 2020-09-27
- Cisc 360作业代做、代写java程序设计作业、Python，C++语言 2020-09-27
- Cs 570留学生作业代做、Java程序语言作业调试、代写java课程设计作 2020-09-27