CADETProcess.simulator.SimulatorBase#
- class CADETProcess.simulator.SimulatorBase(time_resolution, resolution_cutoff, n_cycles, evaluate_stationarity, n_cycles_min, n_cycles_max, raise_exception_on_max_cycles)[source]#
Base class for Solver APIs.
Holds the configuration of the individual solvers and provides an interface for calling the run method. The class converts the process configuration into the API’s configuration format and converts the results back to the CADETProcess format.
- Attributes:
- time_resolutionfloat
Time interval for user solution times. The default value is 1 second.
- resolution_cutofffloat
Solution times closer to section times than the cutoff value are removed to avoid IDAS errors. The default value is 1e-3 seconds.
- n_cyclesint
Number of cycles to be simulated. The default is 1.
- evaluate_stationaritybool
If True, simulate until stationarity is reached. The default is False
- n_cycles_minint
Minimum number of cycles to be simulated if evaluate_stationarity is True. The default is 5.
- n_cycles_maxint
Maximum number of cycles to be simulated if evaluate_stationarity is True. The default is 100.
- raise_exception_on_max_cyclesbool
Raise an exception when the maximum number of cycles is exceeded. The default is False
Methods
__call__
(process[, previous_results])Simulate the process.
Verify if all required parameters are set.
evaluate
(process[, previous_results])Simulate the process.
get_section_times
(process)Get the section times for a single cycle of a process.
get_section_times_complete
(process)Get the section times for multiple cycles of a process.
get_solution_time
(process[, cycle])Get the time vector for one cycle of a process.
get_solution_time_complete
(process)Get the time vector for multiple cycles of a process.
run
(**kwargs)Abstract method for running a simulation.
set_state_from_results
(process, results)Set the process state from the simulation results.
simulate
(process[, previous_results])Simulate the process.
simulate_n_cycles
(process, n_cyc[, ...])Simulate the process for a given number of cycles.
simulate_to_stationarity
(process[, results])Simulate the process until stationarity is reached.