Question
Write a computer program to solve a set of 3 decay equations (N A N B N C , N C is stable) numerically and
Write a computer program to solve a set of 3 decay equations (NA NB NC, NC is stable) numerically and analytically. Use a forward difference approximation (explicit scheme) for the numerical solution. The main program should call functions/subroutines to do the following:
Read input file with the input data:
decay constants: lA, lB
initial conditions: NA0, NB0, NC0
numerical parameters: Dt, tfinal
Perform the numerical solution of the equations for 0 < t < tfinal.
Perform the analytical solution of the equations for 0 < t < tfinal.
Write results to an output file that can later be used to plot the results. The output file should also contain the parameters read from the input file.
Submit a brief report with your results. See separate instructions on the report format.
Part 1, theory
Show differential equations you are solving (-10%).
Show analytic solution of the differential equations (-10%).
Show complete derivation of numerical solution (-10%).
Show complete derivation for the time of maximum NB (-10%).
Part 2, radioactive decay chain
Half-life: t1/2A = 1.1 h , t1/2B = 9.2 h, t1/2C = stable
Initial conditions: NA0 = 100, NB0 = 0, NC0 = 0
Solution time: tfinal = 50 h
For the numerical solution, start with Dt = 1 h and keep reducing it by the factor of two until you get a reliable solution (solution does not change significantly with deceasing Dt). Show the following results:
Plot numerical NB(t) vs. time for 3 different values of Dt (coarse, medium, fine), all of them on the same graph. Add analytical solution on the same graph (-10%).
Plot numerical NA(t), NB(t), NC(t) and NA(t) + NB(t) + NC(t) as a function of time, all on the same graph, use Dt that gives reliable solution (-10%).
Using numerical solution, plot time of maximum NB vs. 1/Dt for several different Dt. Use analytical solution to determine time of maximum NB, add that value to the graph (-10%).
Note: numerical solution with large Dt might be unstable (oscillations between time-steps). If so, do not report such results. Continue reducing Dt until you get physically realistic (smooth) solution (-10%).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started