pyrk.driver module

This is an example driver for the simulation. It should soon be refactored to result in an input file, an input parser, a solver interface, and output scripts.

pyrk.driver.f_n(t, y, si)[source]

Returns the neutronics block solution at time t

Parameters:
  • t (float.) – the time [s] at which the update is occuring.
  • y (np.ndarray) – solution vector
pyrk.driver.f_th(t, y_th, si)[source]

Returns the thermal hydraulics solution at time t

Parameters:
  • t (float.) – the time [s] at which the update is occuring.
  • y (np.ndarray) – the solution vector
  • si (SimInfo) – the simulation info object
pyrk.driver.load_infile(infile_path)[source]

Loads the input file as a python package import based on the path

Parameters:infile_path (string) – path to the infile
pyrk.driver.log_results(si)[source]
pyrk.driver.main(args, curr_dir)[source]
pyrk.driver.solve(si, y, infile)[source]

Conducts the solution step, based on the dopri5 integrator in scipy

Parameters:
  • si (SimInfo) – the simulation info object
  • y (np.ndarray) – the solution vector
  • infile (imported module) – the imported infile module
pyrk.driver.update_n(t, y_n, si)[source]

This function updates the neutronics block.

Parameters:
  • t (float.) – the time [s] at which the update is occuring.
  • y_n (np.ndarray.) – The array that solves the neutronics block at time t
pyrk.driver.update_th(t, y_n, y_th, si)[source]

This function updates the thermal hydraulics block.

Parameters:
  • t (float.) – the time [s] at which the update is occuring.
  • y_th (np.ndarray.) – The array that solves thermal hydraulics block at time t
pyrk.driver.y0(si)[source]

The initial conditions for y

Parameters:si (SimInfo) – the simulation info object
pyrk.driver.y0_n(si)[source]

Initial conditions for y_n, the neutronics sub-block of y

Parameters:si (SimInfo) – the simulation info object
pyrk.driver.y0_th(si)[source]

Initial conditions for y_th, the thermal hydraulics sub-block of y

Parameters:si (SimInfo) – the simulation info object