libra_toolbox.tritium package#

Submodules#

libra_toolbox.tritium.helpers module#

libra_toolbox.tritium.model module#

class libra_toolbox.tritium.model.Model(radius: Quantity, height: Quantity, TBR: Quantity, neutron_rate: Quantity, k_wall: Quantity, k_top: Quantity, irradiations: list)#

Bases: object

0D model for tritium release from a cylindrical salt blanket

The model is a simple ODE:

\[V \frac{d c_\mathrm{salt}}{dt} = S - Q_\mathrm{wall} - Q_\mathrm{top}\]

where \(V\) is the volume of the salt, \(c_\mathrm{salt}\) is the tritium concentration in the salt, \(S\) is the tritium source term, and \(Q_i\) are the different release rates.

The source term is expressed as:

\[S = \mathrm{TBR} \cdot \Gamma_n\]

where \(\mathrm{TBR}\) is the Tritium Breeding Ratio and \(\Gamma_n\) is the neutron rate.

The release rates are expressed as:

\[Q_i = A_i \ k_i \ (c_\mathrm{salt} - c_\mathrm{external}) \approx A_i \ k_i \ c_\mathrm{salt}\]

where \(A_i\) is the surface area, \(k_i\) is the mass transport coefficient, and \(c_\mathrm{external}\) is the external tritium concentration (assumed negligible compared to \(c_\mathrm{salt}\)).

Parameters:
  • radius (pint.Quantity) – radius of the salt

  • height (pint.Quantity) – height of the salt

  • TBR (pint.Quantity) – Tritium Breeding Ratio

  • neutron_rate (pint.Quantity) – neutron rate

  • k_wall (pint.Quantity) – mass transport coefficient for the walls

  • k_top (pint.Quantity) – mass transport coefficient for the top surface

  • irradiations (list[tuple[pint.Quantity, pint.Quantity]]) – list of tuples with the start and stop times of irradiations

radius#

radius of the salt

Type:

pint.Quantity

height#

height of the salt

Type:

pint.Quantity

L_wall#

thickness of the wall

Type:

pint.Quantity

neutron_rate#

neutron rate

Type:

pint.Quantity

TBR#

Tritium Breeding Ratio

Type:

pint.Quantity

irradiations#

list of tuples with the start and stop times of irradiations

Type:

list[tuple[pint.Quantity, pint.Quantity]]

k_wall#

mass transport coefficient for the walls

Type:

pint.Quantity

k_top#

mass transport coefficient for the top surface

Type:

pint.Quantity

concentrations#

list of concentrations at each time step

Type:

list[pint.Quantity]

times#

list of times at each time step

Type:

list[pint.Quantity]

property A_top#

Calculate the top surface area of a cylinder. This method calculates the area of the top surface of a cylinder using the formula: A = π * r^2

Note

This neglects the presence of a re-entrant heater (perfect cylinder).

Returns:

The top surface area of the cylinder.

Return type:

pint.Quantity

property A_wall#

Calculate the surface area of the wall. This method computes the surface area of the wall based on the perimeter and height of the wall, and adds the bottom area.

Returns:

The total surface area of the wall.

Return type:

pint.Quantity

Q_top(c_salt)#

Calculate the release rate of tritium through the top surface of the salt.

\[Q_\mathrm{top} = A_\mathrm{top} \ k_\mathrm{top} \ c_\mathrm{salt}\]
Parameters:

c_salt (pint.Quantity) – The concentration of tritium in the salt.

Returns:

The release rate of tritium through the top.

Return type:

pint.Quantity

Q_wall(c_salt)#

Calculate the release rate of tritium through the wall.

\[Q_\mathrm{wall} = A_\mathrm{wall} \ k_\mathrm{wall} \ c_\mathrm{salt}\]
Parameters:

c_salt (pint.Quantity) – The concentration of tritium in the salt.

Returns:

The release rate of tritium through the wall.

Return type:

pint.Quantity

integrated_release_top()#

Calculate the cumulative release of tritium through the top surface.

Returns:

array with units same size as the number of time steps, the integrated release of tritium through the top surface.

Return type:

ndarray

integrated_release_wall()#

Calculate the cumulative release of tritium through the walls.

Returns:

array with units same size as the number of time steps, the integrated release of tritium through the walls.

Return type:

ndarray

reset()#

Reset the model by resetting the concentrations and times attributes to empty lists.

rhs(t, c)#

Calculate the right-hand side of the ODE.

Parameters:
  • t (float) – time

  • c (float) – salt concentration

Returns:

the rhs of the ODE

Return type:

pint.Quantity

run(t_final)#

Solves the ODE between 0 and t_final. It first generates the different time intervals based on the irradiations and non-irradiation periods. Then, it solves the ODE for each interval with scipy.optimize.minimize and concatenates the results. The results are stored in the concentrations and times attributes.

Parameters:

t_final (pint.Quantity) – The final time of the simulation.

source(t)#

Calculate the source term at a given time t. This method iterates through the list of irradiations and checks if the given time t falls within any irradiation period. If it does, it returns the product of the Tritium Breeding Ratio (TBR) and the neutron rate. If t does not fall within any irradiation period, it returns zero.

Parameters:

t (pint.Quantity) – The time at which to calculate the source term.

Returns:

The source term at time t. This is the product of TBR and neutron rate if t is within an irradiation period, otherwise zero.

Return type:

pint.Quantity

property volume#

Calculate the volume of the tritium model.

Returns:

The volume calculated as the product of the top area (A_top) and the height.

Return type:

pint.Quantity

libra_toolbox.tritium.model.activity_to_quantity(A)#

Converts an activity of tritium to quantity. By dividing the activity by the specific activity and molar mass of tritium.

Parameters:

A (pint.Quantity) – the activity of tritium

Returns:

the equivalent quantity

Return type:

pint.Quantity

libra_toolbox.tritium.model.quantity_to_activity(Q)#

Converts a quantity of tritium to activity. By multiplying the quantity by the specific activity and molar mass of tritium.

Parameters:

Q (pint.Quantity) – the quantity of tritium

Returns:

the equivalent activity

Return type:

pint.Quantity

libra_toolbox.tritium.plotting module#

Module contents#