1.3. Solver settings
The following options change how the solver behaves. These should be added to a data file and loaded to the simulation cases through pyramses.case.addData
. For instance:
import pyramses
case = pyramses.cfg()
case.addData('settings.rdat')
- $LATENCY aver_time_window latency_early_stop ;
Parameters for latency [AFC14].
- Parameters
aver_time_window (float (seconds)) – The averaging window that we compute latency on.
latency_early_stop (binary (0/1 for no/yes)) – When all the units get latent, should the simulation stop.
- $GP_REFRESH_RATE interval ;
Modifies the interval at which the runtime observables are shown.
- Parameters
interval (float (seconds)) – Interval value. Default is 1.
- $OBS_BUFFER_SIZE size ;
The internal memory reserved for the observables. Change this to be less than half of your available RAM.
- Parameters
size (float (GB)) – Memory value. Default is 8 GB.
- $OMEGA_REF reference ;
Defines the reference frame for the system.
- Parameters
reference (str) – ‘COI’ for centre of inertia or ‘SYN’ for synchronous reference frame. Default is ‘COI’.
- $NEWTON_TOLER nettol blocktol1 blocktol2 ;
Defines the Newton method convergence tolerance.
- $S_BASE size ;
Defines the system base power.
- Parameters
size (float (MVA)) – Nominal base power. Default is 100 MVA.
- $NB_THREADS num ;
Defines number of threads for parallelisation.
- Parameters
num (int) – Number of threads. Should be less than the physical cores of your system. Default is 1.
- $FIN_DIFFER C1 C2 ;
Defines numerical differentiation step used for the Jacobian calculations.
- $SPARSE_SOLVER name ;
Defines the solver used for the sparse system solution.
- Parameters
name (str) – ‘ma41’ or ‘KLU’. Default is ‘KLU’.
- $SKIP_CONV bool ;
Defines if the converged blocks are skipped to accelerate the simulation.
- Parameters
bool (boolean) – T of F. Default is F.
- $FULL_UPDATE bool ;
Defines if the Jacobian matrices will be updated at every iteration.
- Parameters
bool (boolean) – T of F. Default is F.
- $DISP_PROF bool ;
Displays the profiling of the execution to identify the computationally intensive parts.
- Parameters
bool (boolean) – T of F. Default is F.