APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

First Order ODE solution with ODE interface and ODEsolver

Return to the OSP Programming forum
Login to post to this thread

Simulation of nucleus decay by ODEsolver
Martin Jola
7 Posts

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?

Current Replies - View all
Re: Simulation of nucleus...   (Wolfgang - )
Re: Re: Simulation of nuc...   (Martin Jola - )
OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book