cetus.solvertypes.thsolvers.THSolverKharon¶
- class cetus.solvertypes.thsolvers.THSolverKharon(parameters, input_path, options, solver_path=None, link_input=False, name='KHARON', parameters_to_add=None, logger=None)¶
Bases:
THSolver
Kharon as a thermal hydraulics solver
- __init__(parameters, input_path, options, solver_path=None, link_input=False, name='KHARON', parameters_to_add=None, logger=None)¶
Methods
__init__
(parameters, input_path, options[, ...])converge
()Converge Kharon thermal hydraulics.
correct
()Run corrector / correction for this solver
Evaluates boiling margin field.
Returns the current inlet flowrate (per channel).
Communicates current value of coolant temperature and density from TH solver.
Communicates current value of wall temperature from TH solver.
Returns the current outlet pressure.
Is this solver converged or not?
load_input_fields
(path)Loads everything for this solver that is required for a restart.
load_restart_data
(path)Loads everything for this solver that is required for a restart.
With Kharon we reset the underrelaxation before the coupled iteration for the next predictor or corrector is started.
Checks whether the residuals of Kharon indicate that it is converged.
save_input_fields
(path, save_simple, ...)Saves relevant input fields from this solver.
save_output_fields
(path, save_simple, ...)Saves relevant output fields from this solver.
save_restart_data
(path, save_burnup_restart, ...)Saves everything from this solver that is required for a restart.
set_corrector_option
(corrector_included)Lets the solver know and prepare to either running or not running corrector step as part of the simulation.
set_inlet_flowrate
(massflowrate)Set flowrate boundary condition to a specific value.
set_inlet_temperature
(temperature)Set inlet temperature boundary condition to a specific value.
set_or_advance_time
(new_time_in_seconds)Moves this solver to the specified time calling either set or advance method based on whether this is the first call or not.
set_outlet_pressure
(pressure)Set outlet pressure boundary condition to a specific value.
solve
()Calls solve for Kharon solver once, but tries to fix the solution if it diverges.
A SimulationSolver hook for things that need to be done by a specific solver after the variation calculations (reactivity coefficients etc.) have been finished in order to potentially reset things for the upcoming time point.
A SimulationSolver hook for things that need to be done by a specific solver after the coupled solution for a specific point has been conducted, before starting the variation calculations (reactivity coefficients etc.)
Attributes
If one of these is given as a part of command line parameters, Cerberus will give port number to solver as command line parameter
- converge()¶
Converge Kharon thermal hydraulics.
- Return type:
None
- correct()¶
Run corrector / correction for this solver
- Return type:
None
- get_boiling_margin()¶
Evaluates boiling margin field. Gets required fields from Kharon.
- Return type:
None
- get_inlet_flowrate()¶
Returns the current inlet flowrate (per channel).
- Raises:
NotImplementedError – Virtual at this level.
- Returns:
Inlet flowrate (kg/s)
- Return type:
float
- get_new_coolant_fields()¶
Communicates current value of coolant temperature and density from TH solver.
- Return type:
None
- get_new_wall_temperature()¶
Communicates current value of wall temperature from TH solver.
- Return type:
None
- get_outlet_pressure()¶
Returns the current outlet pressure.
- Returns:
Outlet pressure (Pa)
- Return type:
float
- is_converged()¶
Is this solver converged or not?
- Returns:
True for converged, False for non-converged
- Return type:
bool
- load_input_fields(path)¶
Loads everything for this solver that is required for a restart.
- Parameters:
path (Path) – Path instance to a folder to load from.
- Return type:
None
- load_restart_data(path)¶
Loads everything for this solver that is required for a restart.
- Parameters:
path (Path) – Path instance to a folder to load from.
- Return type:
None
- port_parameters = ('-port',)¶
If one of these is given as a part of command line parameters, Cerberus will give port number to solver as command line parameter
- predictor_or_corrector_starting()¶
With Kharon we reset the underrelaxation before the coupled iteration for the next predictor or corrector is started.
- Return type:
None
- residuals_converged()¶
Checks whether the residuals of Kharon indicate that it is converged.
- Returns:
Is converged?
- Return type:
bool
- save_input_fields(path, save_simple, save_foam, save_type)¶
Saves relevant input fields from this solver.
- Parameters:
path (Path) – Path instance to a folder to save to.
save_simple (bool) – Save fields in simple text format?
save_foam (bool) – Save fields in FOAM format?
save_type (SaveType) – Indicates either latest or final data for specific point.
- Return type:
None
- save_output_fields(path, save_simple, save_foam, save_type)¶
Saves relevant output fields from this solver.
- Parameters:
path (Path) – Path instance to a folder to save to.
save_simple (bool) – Save fields in simple text format?
save_foam (bool) – Save fields in FOAM format?
save_type (SaveType) – Indicates either latest or final data for specific point.
- Return type:
None
- save_restart_data(path, save_burnup_restart, save_transient_restart)¶
Saves everything from this solver that is required for a restart.
- Parameters:
path (Path) – Path instance to a folder to save to.
save_burnup_restart (bool) – Save everything required to continue a burnup calculation.
save_transient_restart (bool) – Save everything required for moving to transient calculation.
- Return type:
None
- set_corrector_option(corrector_included)¶
Lets the solver know and prepare to either running or not running corrector step as part of the simulation.
- Parameters:
corrector_included (bool) – Is the corrector step included?
- Return type:
None
- set_inlet_flowrate(massflowrate)¶
Set flowrate boundary condition to a specific value.
- Parameters:
massflowrate (float) – Flowrate for normalization (kg/s)
- Return type:
None
- set_inlet_temperature(temperature)¶
Set inlet temperature boundary condition to a specific value.
- Parameters:
temperature (float) – Temperature (K)
- Return type:
None
- set_or_advance_time(new_time_in_seconds)¶
Moves this solver to the specified time calling either set or advance method based on whether this is the first call or not.
- Parameters:
new_time_in_seconds (float) – New time in seconds.
- Raises:
ValueError – If new time is smaller than the current time.
- Return type:
None
- set_outlet_pressure(pressure)¶
Set outlet pressure boundary condition to a specific value.
- Parameters:
pressure (float) – Pressure (Pa)
- Return type:
None
- solve()¶
Calls solve for Kharon solver once, but tries to fix the solution if it diverges.
- Return type:
None
- variations_finished()¶
A SimulationSolver hook for things that need to be done by a specific solver after the variation calculations (reactivity coefficients etc.) have been finished in order to potentially reset things for the upcoming time point.
- Return type:
None
- variations_starting()¶
A SimulationSolver hook for things that need to be done by a specific solver after the coupled solution for a specific point has been conducted, before starting the variation calculations (reactivity coefficients etc.)
- Return type:
None