Model library#
Everything dynamic in HERMESS is implemented in a pluggable-strategy manner. A device class implements the physical core of a component and is selected in a system file by its class name in the first column: for a synchronous machine that core is the electromagnetic model, for a converter it is the power path through the output filter. The controllers are separate strategy objects plugged onto that core and chosen by keyword on the same line of the system file:
SynchronousSubtransientSP, idx = "SG1", bus = "1", Sn = 300, avr = "SEXST", governor = "TGOV1", ...
GridForming, idx = "GFM1", bus = "3", Sn = 100, filter = "LCL_static", ...
Machines take an automatic voltage regulator, a governor, a power system
stabilizer and a shaft; converters take an output filter, an angle source, a
voltage controller, an inner controller and a PLL. Every combination composes,
the names accepted at any moment (shipped and user-registered together) are
returned by hermess.registered(), and a model of your own becomes
selectable once registered with hermess.register() (see
Using your own models).
The pages of this section describe what each model represents; the parameters and defaults of every class are listed in the class documentation itself, which is generated from the source, so it always matches the installed version. Each class documents its equations exactly as implemented and a table mapping the code parameter names to the mathematical symbols used in those equations. The availability tables on each page are generated from the same registries the simulator reads, so they always list what the installed version accepts.
Base class#
All devices derive from Element; devices that inject current into the
network in rectangular coordinates derive from DeviceRect.
- class hermess.devices.device.DeviceRect[source]
Dynamic or static device modeled in rectangular coordinates. Used as a parent class for all devices modeled in rectangular coordinates.
- Variables:
properties (dict[str, bool]) – Flags for method calls (e.g., ‘gcall’, ‘fcall’).
xf (dict[str, np.ndarray]) – Final state results for the simulation.
xinit (dict[State, list[float]]) – Initial state values for all devices of the instance.
xmin (list[float]) – Minimum limited state value.
xmax (list[float]) – Maximum limited state value.
_params (dict[str, float]) – Device parameters, such as rated voltage, power, and frequency and internal parameters.
_data (dict[str, str]) – Additional data which will be used in a list, one entry for each device of this object instance.
bus (list[Optional[str]]) – Buses where the device is connected. Each device has an entry in the list.
states (list[States]) – State variables.
units (list[States]) – Units of state variables.
ns (float) – Total number of states in the model.
vre (list[float]) – Order of the real voltage value for each device in the overall DAE model.
vim (list[float]) – Order of the real voltage value for each device in the overall DAE model.
_algebs (list[str]) – Algebraic variables (‘vre’, ‘vim’).
_descr (dict[str, str]) – Descriptions for key parameters.
The method that builds the differential and algebraic equations of a model is:
- hermess.devices.device.DeviceRect.fgcall(self, dae)
A method that executes the differential and algebraic equations of the model and adds them to the appropriate places in the Dae class
- Parameters:
dae (
Dae) – an instance of a class Dae- Returns:
None
- Return type:
None