Question: Computer Project 1: Solution of 3 component decay chain Write a computer program to solve a set of 3 decay equations (N A N B
Computer Project 1: Solution of 3 component decay chain
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: A, B
- initial conditions: NA0, NB0, NC0
- numerical parameters: t, tfinal
- Perform the analytical solution of the equations for 0 < t < tfinal.
- Perform the numerical 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.2 h , t1/2B = 9.1 h, t1/2C = stable
- Initial conditions: NA0 = 100, NB0 = 0, NC0 = 0
- Solution time: tfinal = 50 h
For the numerical solution, start with t = 1 h and keep reducing it by the factor of two until you get a reliable solution (solution does not change significantly with deceasing t). Show the following results:
- Plot numerical NB(t) vs. time for 3 different values of t (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 t that gives reliable solution (-10%).
- Using numerical solution, plot time of maximum NB vs. 1/t for several different t. Use analytical solution to determine time of maximum NB, add that value to the graph (-10%).
Note: numerical solution with large t might be unstable (oscillations between time-steps). If so, do not report such results. Continue reducing t until you get physically realistic (smooth) solution (-10%).
IMPORTANT: USE PYTHON AS THE COMPUTER PROGRAMMING LANGUAGE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
