- #1
miscellanea
- 10
- 0
I'm looking to simulate a radioactive pile in the context of a simple computer game. The problem is, however, that for various reasons I can't use a straightforward tick-by-tick simulation.
Instead I'm looking for an equation that can be solved based on time and would give me the amount of stuff remaining in the pile. And this is quite easy:
[tex]R\left(t\right)=R_0\left(\frac{1}{2}\right)^{\frac{t}{t_h}}[/tex]
Where [tex]t_h[/tex] is the half-life of the element and [tex]R_0[/tex] is the initial amount at [tex]t=0[/tex]
But there's a complication. Extra material can be added to the pile at any [tex]t[/tex] (For example, 5 units added at [tex]t=15[/tex]) Which is still quite simple. Each added amount could be modeled as a separate pile and the [tex]R\left(t\right)[/tex] of all piles could be added together:
[tex]R_{total}\left(t\right)=\sum_{i=0}^{n}R_{i}\left(t\right)[/tex]
(Without taking piles into account if [tex]t < t_{i_{0}}[/tex])
But there's one more complication and this is the one I'm unable to crack.
Extra material is to be added at a steady rate over several time units. (For example, 5 units added between [tex]t_0=17[/tex] and [tex]t_1=19[/tex]) So there's a function which grows a pile between the pile's [tex]t_0[/tex] and [tex]t_1[/tex] and looks something like:
[tex]R(t)=\left(\frac{m}{a} t - t_0\right)[/tex] if [tex]t\in\left[t_0,t_1\right][/tex] and m = the total amount added to create the pile and [tex]a=t_1 - t_0[/tex] or the time it takes to create the pile.
The problem is that I can't figure out how to start applying the decay function while the pile is still being created. At [tex]t_1[/tex] the amount of stuff in the pile will be equal to m, which shouldn't happen as some of the stuff should have decayed already.
So my question would be: how do I model the lifetime of a decaying pile in such a way that takes into account the fact that it can take several time units to initially create the pile with material being added at a steady rate?
What I'd like to end up with is a graph showing the past, present, and future combined size of all piles and the ability to add events at any point in time that contribute new material to this combined pile.
Instead I'm looking for an equation that can be solved based on time and would give me the amount of stuff remaining in the pile. And this is quite easy:
[tex]R\left(t\right)=R_0\left(\frac{1}{2}\right)^{\frac{t}{t_h}}[/tex]
Where [tex]t_h[/tex] is the half-life of the element and [tex]R_0[/tex] is the initial amount at [tex]t=0[/tex]
But there's a complication. Extra material can be added to the pile at any [tex]t[/tex] (For example, 5 units added at [tex]t=15[/tex]) Which is still quite simple. Each added amount could be modeled as a separate pile and the [tex]R\left(t\right)[/tex] of all piles could be added together:
[tex]R_{total}\left(t\right)=\sum_{i=0}^{n}R_{i}\left(t\right)[/tex]
(Without taking piles into account if [tex]t < t_{i_{0}}[/tex])
But there's one more complication and this is the one I'm unable to crack.
Extra material is to be added at a steady rate over several time units. (For example, 5 units added between [tex]t_0=17[/tex] and [tex]t_1=19[/tex]) So there's a function which grows a pile between the pile's [tex]t_0[/tex] and [tex]t_1[/tex] and looks something like:
[tex]R(t)=\left(\frac{m}{a} t - t_0\right)[/tex] if [tex]t\in\left[t_0,t_1\right][/tex] and m = the total amount added to create the pile and [tex]a=t_1 - t_0[/tex] or the time it takes to create the pile.
The problem is that I can't figure out how to start applying the decay function while the pile is still being created. At [tex]t_1[/tex] the amount of stuff in the pile will be equal to m, which shouldn't happen as some of the stuff should have decayed already.
So my question would be: how do I model the lifetime of a decaying pile in such a way that takes into account the fact that it can take several time units to initially create the pile with material being added at a steady rate?
What I'd like to end up with is a graph showing the past, present, and future combined size of all piles and the ability to add events at any point in time that contribute new material to this combined pile.