Professional Documents
Culture Documents
Homework #1
Team #Y
Authors:
Name of student A (Id: )
Name of student B (Id: )
Name of student C (Id: )
1
1 Introduction
Radioactive atoms decays in time because of their unstable nucleus. It is not valid to talk about
half-life of a single atom, however when they stay together with sufficient amount of mass, there are
characteristic probability of time to decay to half of the mass for different elements. It is called half-
life of atoms.
In this study, we are going to examine the half-life of Cobalt-60. The half-life for this element is
5.2714 years. Below, the formula to calculate the half-life of atoms is given.
𝑡
𝑁𝑡 = 𝑁0 ∗ 𝑒 −𝜏 ... (1)
𝑇1
2
𝜏 = 𝑙𝑛2 … (2)
Applying numerical solutions (Euler’s method, Heun’s method, RK2 method) on this formula, we
calculated the half-life of Cobalt-60. Those solutions were compared to each other and analytical
solution. Step-size effect on the solutions and relative errors were also examined in this study.
2 Method
Describe the numerical methods used. State the necessary equations. Here is how you insert an
equation:
𝜕𝑣
+ 𝑽 ⋅ 𝜵𝑣 = 𝜓 + 𝛱 − 𝛷…(1)
𝜕𝑡
Where 𝑣 is the eddy viscosity, 𝑽 is the velocity vector. The terms on the right hand side of
Equation 1 represent diffusion, production and destruction, respectively.
--- next section must start in a new page ---
2
2 Results and Discussion
Numerical solutions are obtained and plotted for Euler’s method, Heun’s method, RK2 method
and they are compared to analytical solution in same graph for different step-sizes. The plots are
shown below.
3
Figure 3: comparison of each solutions with step-size 1
As it is seen in the gprahs, Euler’s method gives the less accurate result. Because the mass is
decreasing, the effect of slope causes Euler’s method underestimate the result and find less amount
of mass compared to exact solution. Although, the other methods have some errors too, as expected,
they gave more accurate results. Apparently, Heun’s methods give more accurate result than RK2
method with p=0.4 in our case.
Increasing the step size causes Euler’s method to give even less accurate result where the others
are still close to exact solution.
4
Figure 4: relative errors for step-size 0.2
5
Figure 6: relative errors with step-size 1
It is seen that relative errors increasing with bigger step-sizes for all methods. So, for more
accurate results, the step-sizes must be reduced.
To obtain a close relative error between Euler’s method and Heun’s method, we decreased the
step-size of the Euler’s method gradually. It is concluded that when we use step-size 0.022 for
Euler’s method, the relative error is very close, about the same compared to Heun’s method with
step-size 1. The result is shown below in Figure 7.
6
3.1 e.g. Write the method name
Here are some examples of tables (see Table 1), and figures (see Figure 1, Figure 2).
0.045 20.1
0.216 50.4
0.365 64.2
0.831 108.7
Figure 1: Every figure MUST have a caption. This is an example of good plot.
7
Results should be presented in compact graphs with proper, readable legends and captions (see
Figure 1). Keep your figures and plots at a reasonable size, make sure that they have
explanatorylegends. Avoid the common mistakes in preparing graphs (see Figure 2). Again, do not
include numerical data tables!
After each finding (e.g. figure), do not forget to explain what you observe in that specific result
briefly. Save your general conclusions and comparisons to the conclusion section.
4 Conclusion
Finally, conclude your study with comparisons and discussions considering your results.
Conclusion section should be about HALF a page.
figure
8
plot(time_year_02_an,exactmass_02_an,'-k',time_year_02_eu,eu_02,'--
k',time_year_02_heun,heun_02,':k',time_year_02_rk2,rk2_02,'-.k')
figure
plot(time_year_05_an,exactmass_05_an,'-k',time_year_05_eu,eu_05,'--
k',time_year_05_heun,heun_05,':k',time_year_05_rk2,rk2_05,'-.k')
figure
plot(time_year_1_an,exactmass_1_an,'-k',time_year_1_eu,eu_1,'--
k',time_year_1_heun,heun_1,':k',time_year_1_rk2,rk2_1,'-.k')
figure
plot(time_year_02_eu,error_02_eu,'-k',time_year_02_heun,error_02_heun,'--
k',time_year_02_rk2,error_02_rk2,':k')
figure
plot(time_year_05_eu,error_05_eu,'-k',time_year_05_heun,error_05_heun,'--
k',time_year_05_rk2,error_05_rk2,':k')
figure
plot(time_year_1_eu,error_1_eu,'-k',time_year_1_heun,error_1_heun,'--
k',time_year_1_rk2,error_1_rk2,':k')
9
ylabel('Mass(kg)')
legend('euler','heun','rk2')
figure
plot(time_year_eu_0022,error_eu_0022,'-k',time_year_1_heun,error_1_heun,'--k')
figure
plot(time_year_02_an,exactmass_02_an,'-k',time_year_1_heun,heun_1,':k')
figure
plot(time_year_05_an,exactmass_05_an,'-
k',time_year_05_heun,heun_05,':k',time_year_05_rk2,rk2_05,'-.k')
figure
plot(time_year_05_heun,error_05_heun,'--k',time_year_05_rk2,error_05_rk2,':k')
10