pub fn radioactive_decay_kernel(
n0: &AmountOfSubstance,
half_life: &HalfLife,
time: &Time,
) -> Result<AmountOfSubstance, PhysicsError>Expand description
Calculates the remaining amount of a radioactive substance: $N(t) = N_0 \cdot 2^{-t / t_{1/2}}$.
This kernel models the exponential decay of a quantity over time based on its half-life. The decay follows the standard determining equation: $$ N(t) = N_0 e^{-\lambda t} $$ where $\lambda = \frac{\ln(2)}{t_{1/2}}$.
§Arguments
n0- Initial amount of substance $N_0$ (moles, particles, or activity).half_life- The time $t_{1/2}$ required for the quantity to reduce to half its initial value.time- The elapsed time interval $t$.
§Returns
Ok(AmountOfSubstance)- The remaining amount of substance $N(t)$.
§Errors
Singularity- Ifhalf_lifeis zero (infinite decay rate).