pathsim.blocks.tritium module

class pathsim.blocks.tritium.splitter.Splitter(fractions=None)[source]

Bases: Function

Splitter block that splits the input signal into multiple outputs weighted with the specified fractions.

Note

The output fractions must sum to one.

Parameters:

fractions (np.ndarray | list) – fractions to split the input signal into, must sum up to one

class pathsim.blocks.tritium.residencetime.ResidenceTime(tau=1, betas=None, gammas=None, initial_value=0, source_term=0)[source]

Bases: DynamicalSystem

Chemical process block with residence time model.

This block implements an internal 1st order linear ode with multiple inputs, outputs, an internal constant source term and no direct passthrough.

The internal ODE with inputs \(u_i\) :

\[\dot{x} = - x / \tau + \mathrm{src} + \sum_i \beta_i u_i\]

And the output equation for every output i :

\[y_i = \gamma_i x\]
Parameters:
  • tau (float) – residence time, inverse natural frequency (eigenvalue)

  • betas (None | list[float] | np.ndarray[float]) – weights of inputs that are accumulated in state, optional

  • gammas (None | list[float] | np.ndarray[float]) – weights of states (fractions) for output, optional

  • initial_value (float) – initial value of state / initial quantity of process

  • source_term (float) – constant source term / generation term of the process

class pathsim.blocks.tritium.residencetime.Process(tau=1, initial_value=0, source_term=0)[source]

Bases: ResidenceTime

Simplified version of the ResidenceTime model block with all inputs being summed equally and only the state and the flux being returned to the output

This block implements an internal 1st order linear ode with multiple inputs, outputs and no direct passthrough.

The internal ODE with inputs \(u_i\) :

\[\dot{x} = - x / \tau + \mathrm{src} + \sum_i u_i\]

And the output equations for output i=0 and i=1:

\[y_0 = x\]
\[y_1 = x / \tau\]
Parameters:
  • tau (float) – residence time, inverse natural frequency (eigenvalue)

  • initial_value (float) – initial value of state / initial quantity of process

  • source_term (float) – constant source term / generation term of the process

class pathsim.blocks.tritium.bubbler.Bubbler4(conversion_efficiency=0.9, vial_efficiency=0.9, replacement_times=None)[source]

Bases: DynamicalSystem

Tritium bubbling system with sequential vial collection stages.

This block models a tritium collection system used in fusion reactor blanket purge gas processing. The system bubbles tritium-containing gas through a series of liquid-filled vials to capture and concentrate tritium for measurement and inventory tracking.

Physical Description

The bubbler consists of two parallel processing chains:

Soluble Chain (Vials 1-2): Tritium already in soluble forms (HTO, HT) flows sequentially through vials 1 and 2. Each vial has a collection efficiency \(\eta_{vial}\), representing the fraction of tritium that dissolves into the liquid phase and is retained.

Insoluble Chain (Vials 3-4): Tritium in insoluble forms (T₂, organically bound) first undergoes catalytic conversion to soluble forms with efficiency \(\alpha_{conv}\). The converted tritium, along with uncaptured soluble tritium from the first chain, then flows through vials 3 and 4 with the same collection efficiency.

Mathematical Formulation

The system is governed by the following differential equations for the vial inventories \(x_i\):

\[ \begin{align}\begin{aligned}\frac{dx_1}{dt} &= \eta_{vial} \cdot u_{sol}\\\frac{dx_2}{dt} &= \eta_{vial} \cdot (1-\eta_{vial}) \cdot u_{sol}\\\frac{dx_3}{dt} &= \eta_{vial} \cdot [\alpha_{conv} \cdot u_{insol} + (1-\eta_{vial})^2 \cdot u_{sol}]\\\frac{dx_4}{dt} &= \eta_{vial} \cdot (1-\eta_{vial}) \cdot [\alpha_{conv} \cdot u_{insol} + (1-\eta_{vial})^2 \cdot u_{sol}]\end{aligned}\end{align} \]

The sample output represents uncaptured tritium exiting the system:

\[y_{sample} = (1-\alpha_{conv}) \cdot u_{insol} + (1-\eta_{vial})^2 \cdot [\alpha_{conv} \cdot u_{insol} + (1-\eta_{vial})^2 \cdot u_{sol}]\]
Where:
  • \(u_{sol}\) = soluble tritium input flow rate

  • \(u_{insol}\) = insoluble tritium input flow rate

  • \(\eta_{vial}\) = vial collection efficiency

  • \(\alpha_{conv}\) = conversion efficiency from insoluble to soluble

  • \(x_i\) = tritium inventory in vial i

param conversion_efficiency:

Conversion efficiency from insoluble to soluble forms (\(\alpha_{conv}\)), between 0 and 1.

type conversion_efficiency:

float

param vial_efficiency:

Collection efficiency of each vial (\(\eta_{vial}\)), between 0 and 1.

type vial_efficiency:

float

param replacement_times:

Times at which each vial is replaced with a fresh one. If None, no replacement events are created. If a single value is provided, it is used for all vials. If a single list of floats is provided, it will be used for all vials. If a list of lists is provided, each sublist corresponds to the replacement times for each vial.

type replacement_times:

float | list[float] | list[list[float]]

Notes

Vial replacement is modeled as instantaneous reset events that set the corresponding vial inventory to zero, simulating the physical replacement of a full vial with an empty one.