Tree of classes:
Reactor
├─ Control
├─ Solid
│ ├─ Structure[]
│ └─ FuelRod[]
│ ├─ Fuel[]
│ │ └─ FuelGrain[]
│ ├─ InnerGas
│ └─ Clad[]
├─ Fluid
└─ Core
├─ Isotope[]
└─ Mix[]
At the very top of the code the r
object is created as follows: r = Reactor()
and
virtually everything happens in the constructor of the Reactor
class.
First, four objects are created from classes Control
, Solid
, Fluid
and Core
.
Then the list of unknowns is initialized and the system of Ordinary Differenial Equations (ODEs) is solved using
the Livermore Solver for Ordinary Differential Equations with Sparse Jacobian (LSODES) which is the engine of the ROOSTER code.
LSODES (available in the SciPy package) solves a stiff system of ODEs of the form dy/dt = f(t,y)
.
The vector of the right-hand sides of this system is constructed in the construct_rhs(t, y)
function
defined in the Reactor
class by calling four calculate_rhs(self, reactor, t)
functions
defined in classes Control
, Solid
, Fluid
and Core
and calculating the right-hand sides of the corresponding parts of the whole system of ODEs.