Docsity

Solving a Diffusion-Reaction Problem using Explicit Euler and Central Difference Methods, Exams of Mechanical Engineering

Toggle sidebar
bg1
Final Exam
Take Home Part (10%)
Due May 4
Consider the following diffusion-reaction problem, which models the density of di-
vacancies (u) and vacancies (v) in a metal, if two vacancies unite to form a di-vacancy
with frequency proportional to v2 and a di-vacancy breaks up to form two vacancies with
frequencies proportional to u,
2
2
3 ,
4 4 2 6 .
xx yy
t
xx yy
t
u u u v u
v v v v u
= + + โˆ’
= + โˆ’ +
We assume the following boundary conditions on the unit square:
1 at 0,1and 0, 0 at 1,
u v
u v x y y
y y
โˆ‚ โˆ‚
= = = = = = =
โˆ‚ โˆ‚
and initial conditions
(
)
(
)
u x y v x y
= =
Discretize the problem using explicit Euler time discretization and central difference in
space. For spatial discretization use uniform gird with โˆ†x=โˆ†y=0.02. Solve the problem up
to a time of t = 0.5. Show the results for the following times t=0, 0.05, 0.1, 0.15, 0.25,
0.5. Also show the solution at the midpoint of the region as a function of time.
What is the accuracy of the solution in terms of โˆ†t, โˆ†x, โˆ†y?
Is the scheme consistent?
Is your scheme stable?
What is the maximum time step โˆ†tmax you can take in terms of โˆ†x and โˆ†y?
Hint: When analyzing stability, ignore the terms that do not contain derivatives. Also
note that since it is a system, you should use ฯƒ1 and ฯƒ2 respectively for u and v.
P.S. Bring your solution and discussion of the results to class. Email your code to
[email protected]. The program that you send should be a working program. All
the codes will be checked whether they run or not. If they are erroneous, but run, points
will be taken for the errors. If the code does not run (it has some syntax errors), an
additional 25% will be taken off. The goal of this class is for you to be comfortable
solving engineering problems. Please take your time and learn how to trust the computer.

Partial preview of the text

Download Solving a Diffusion-Reaction Problem using Explicit Euler and Central Difference Methods and more Exams Mechanical Engineering in PDF only on Docsity!

Final Exam

Take Home Part (10%)

Due May 4

Consider the following diffusion-reaction problem, which models the density of di - vacancies ( u ) and vacancies ( v ) in a metal, if two vacancies unite to form a di -vacancy with frequency proportional to v^2 and a di -vacancy breaks up to form two vacancies with frequencies proportional to u , 2 2

t^ xx^ yy t xx^ yy

u u u v u v v v v u

We assume the following boundary conditions on the unit square:

1 at 0,1 and 0, 0 at 1, u v u v x y y y y

and initial conditions

u x y ( , , 0 ) = v x y ( , , 0) =1.

Discretize the problem using explicit Euler time discretization and central difference in space. For spatial discretization use uniform gird with โˆ† x= โˆ† y =0.02. Solve the problem up to a time of t = 0.5. Show the results for the following times t=0, 0.05, 0.1, 0.15, 0.25, 0.5. Also show the solution at the midpoint of the region as a function of time.

What is the accuracy of the solution in terms of โˆ† t, โˆ† x, โˆ† y? Is the scheme consistent? Is your scheme stable? What is the maximum time step โˆ† t max you can take in terms of โˆ† x and โˆ† y?

Hint: When analyzing stability, ignore the terms that do not contain derivatives. Also note that since it is a system, you should use ฯƒ 1 and ฯƒ 2 respectively for u and v.

P.S. Bring your solution and discussion of the results to class. Email your code to [email protected]. The program that you send should be a working program. All the codes will be checked whether they run or not. If they are erroneous, but run, points will be taken for the errors. If the code does not run (it has some syntax errors), an additional 25% will be taken off. The goal of this class is for you to be comfortable solving engineering problems. Please take your time and learn how to trust the computer.