modelSimpleGen
Extends from BaseClasses.Power2Torque (Converts a power signal to a torque in the rotational domain), OpenHPL.Icons.Generator (Generator icon).
Information
Simple Generator Model
Simple model of an ideal generator with friction based on angular momentum balance.
Energy Balance
The kinetic energy stored in the rotating generator is \(K_a = \frac{1}{2}J_a\omega_a^2\), where ωa is angular velocity and Ja is moment of inertia.
From energy balance:
$$ \frac{\mathrm{d}K_a}{\mathrm{d}t} = \dot{W}_s - \dot{W}_{f,a} - \dot{W}_g $$
where:
- Ẇs is turbine shaft power
- Ẇf,a is frictional power loss
- Ẇg is power taken by generator
Friction
Frictional power loss (mainly from bearings):
$$ \dot{W}_{f,a} = \frac{1}{2}k_{f,b}\omega_a^2 $$
where kf,b is the bearing friction factor.
Electric Power
Electric power available on grid:
$$ \dot{W}_e = \eta_e \dot{W}_g $$
where ηe is electrical efficiency.
Loading Options
The generator can be loaded either:
- via the mechanical shaft connector (e.g., using the Grid model).
Set
Ploadinput to 0 in this case. - or via the input connector
Ploadspecifying the connected electrical load.
Connectors
- RealInput: grid power (
Pload) and shaft power - RealOutput: angular velocity and frequency
Parameters
User specifies: moment of inertia, electrical efficiency, bearing friction factor, number of poles, and initial angular velocity.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Frequency | f_nom (from TorqueEquation) | data.f_grid/(p/2) | Nominal mechanical rotational frequency |
| Mechanical | |||
| Boolean | useH (from TorqueEquation) | false | If checked, calculate the inertia from a given H value |
| SI.Power | Pmax (from TorqueEquation) | 100e6 | Maximum rated power (for torque limiting and H calculation) |
| SI.Time | H (from TorqueEquation) | 2.75 | Inertia constant H, typical 2s (high-head hydro) to 6s (gas or low-head hydro) production units |
| SI.MomentOfInertia | J (from TorqueEquation) | 2e5 | Moment of inertia of the unit (GD2/4) |
| Integer | p (from TorqueEquation) | 12 | Number of poles for mechanical speed calculation (Not pole pairs!) |
| SI.Power | Ploss (from TorqueEquation) | 0 | Friction losses of the unit at nominal speed |
| Initialization | |||
| SI.PerUnit | f_0 (from TorqueEquation) | 1 | Initial speed of the unit |
| Boolean | enable_nomSpeed (from TorqueEquation) | false | If checked, unit runs at fixed speed f_0 |
| Boolean | fixed_iniSpeed (from TorqueEquation) | false | If checked, unit initialises with fixed speed. When connecting several units mechanically only one can be fixed. |
| I/O › Inputs | |||
| Boolean | enable_f_in (from TorqueEquation) | false | If checked, get a connector for speed input |
| I/O › Outputs | |||
| Boolean | enable_w (from TorqueEquation) | false | If checked, get a connector for angular velocity output |
| Boolean | enable_f (from TorqueEquation) | false | If checked, get a connector for speed output |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealOutput | f (from TorqueEquation) | Speed output of the unit [pu] | |
| Modelica.Blocks.Interfaces.RealOutput | w (from TorqueEquation) | Mechanical angular velocity output of the unit [rad/s] | |
| Modelica.Mechanics.Rotational.Interfaces.Flange_b | flange (from TorqueEquation) | Flange of right shaft | |
| Modelica.Blocks.Interfaces.RealInput | f_in (from TorqueEquation) | Speed input of the unit [pu] | |
| Modelica.Blocks.Interfaces.RealInput | Pload | Electrical load power demand |