Closed lmcc-lab closed 1 year ago
Time agnostic functions now ready, including the derivative and integral of cumulative neutrino profile. Therefore, we can calculate what we've written above.
In general, we can construct functions with constants using
class Equation:
def __init__(self, *args):
self.args = args
def calculate(self, t):
return {expression as a function of t}
equation = Equation(*args)
equation.calculate(t)
I have figures out that if the thermal power has been assumed to be constantly on for a time $t$, then you can calculate the cumulative neutrinos at $t=0$ by simply taking the integral of the cumulative neutrino emissions for a single uranium fission between 0 and $t$ and multiplying it by the time (in seconds) that the reactor was on for. The full derivation is as follows:
The cumulative neutrinos for a reactor after some time $G(t)$ is calculated as the convolution of the cumulative neutrino emissions from a single uranium fission $G_U(t)$ and the Uranium burn rate $\zeta(t)$.
$$ G(t)=\int_0^t G_U(t-\tau)\zeta(\tau)d\tau $$
Letting $\mu=t-\tau$, $\tau=t-\mu$, then when $\tau=0$, $\mu=t$ and when $\tau=t$, $mu=0$. Finally, $d\tau = -d\mu$. Substituting this into the convolution equation
$$ G(t)=-\int_t^0 G_U(\mu)\zeta(t-\mu)d\mu=c\int_0^t G_U(\mu)d\mu $$
where we have used the fact that $\zeta(t)=c$ for all $t$ in this domain.
This leads us to re-writing the code to be time agnostic. This has been done somewhat in the latest commit by creating a
Bateman
class, which holds the bateman arguements. It is initialised with n and lambdai. When creating the concentrations profiles for a decay chain, we instead save the value asBateman(n, lambdai).bateman_equation
. This means when we call a decay chain elements concentration profile, we simply add an agument for time and get out the result after the fact.This new way of handling it breaks neupy, so we will work on fixing that next.