Simulation of nucleus decay by ODEsolver
- Aug 29, 2012 at 12:04PM
To learn more about ODE interface and ODEsolver I tired to solve the ODE of nuclear decay: dN/dt=-lambda*N. Analyitical solution is easy, but to learn ODE/ODEsolver I would like to solve it numerically. I followed the example of FallingParticle in the CMS book, but failed. It's not a proble to compile the code, no error messages and the control panle opens with the correct vaiables. However when I press calculate I get a lot of error messages, the first one like NullPointerException followed by many other. I guess it has to do with the state and rate. Can somebody give me an example of how to use ODE interface and ODEsolver for a first order ODE like the nucleus decay?