Skip to content

Commit

Permalink
Correct false friend "Aggregate" --> "unit"
Browse files Browse the repository at this point in the history
  • Loading branch information
dietmarw committed Oct 30, 2024
1 parent b21a61f commit e6ba5e3
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 44 deletions.
6 changes: 3 additions & 3 deletions OpenHPL/ElectroMech/BaseClasses/Power2Torque.mo
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ partial model Power2Torque "Converts a power signal to a torque in the rotationa
rotation=180,
origin={-50,0})));
Modelica.Blocks.Interfaces.RealOutput f(unit="Hz")
if enable_f "Frequency output of the aggregate"
if enable_f "Frequency output of the unit"
annotation (Placement(transformation(extent={{100,-50},{120,-30}}),
iconTransformation(extent={{100,-50},{120,-30}})));
Modelica.Blocks.Interfaces.RealOutput w(unit="rad/s")
if enable_w "Angular velocity output of the aggregate"
if enable_w "Angular velocity output of the unit"
annotation (Placement(transformation(extent={{100,30},{120,50}}),
iconTransformation(extent={{100,30},{120,50}})));

Expand All @@ -80,7 +80,7 @@ partial model Power2Torque "Converts a power signal to a torque in the rotationa
Modelica.Mechanics.Rotational.Components.IdealGear toSysSpeed(ratio=2/p) "Converts to system speed based on p = 2" annotation (Placement(transformation(extent={{24,-6},{36,6}})));
Modelica.Blocks.Sources.RealExpression nominalSpeed(y=w_0*p/2) if enable_nomSpeed annotation (Placement(transformation(extent={{-12,-70},{8,-50}})));
Modelica.Blocks.Interfaces.RealInput w_in if enable_w_in and not enable_nomSpeed
"Angular velocity input of the aggregate [pu]" annotation (Placement(transformation(
"Angular velocity input of the unit [pu]" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=90,
origin={-80,-120})));
Expand Down
2 changes: 1 addition & 1 deletion OpenHPL/ElectroMech/Generators/SimpleGen.mo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ model SimpleGen "Model of a simple generator with mechanical connectors"
<h4>Simple model of an ideal generator with friction.</h4>
<p>This model based on the angular momentum balance, which depends on the turbine shaft power,
the friction loss in the aggregate rotation and the power taken up by the generator.</p>
the friction loss in the unit rotation and the power taken up by the generator.</p>
<p>
The generator can be loaded either:</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion OpenHPL/Resources/Documents/UsersGuide_src/UsersGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ \subsection{Pelton}
\subsection{Simple Generator}
Here, a simple model of an ideal generator with friction is considered. This model has inputs as electric power available on the grid and the turbine shaft power. This model is based on the angular momentum balance which depends on the turbine shaft power, the friction loss in the aggregate rotation, and the power taken up by the generator. The rotor angular velocity mainly depends on its inertia, internal friction and available power. The kinetic energy stored in the rotating generator is $ K_a=\frac{1}{2}J_a\omega_a^2$, where $\omega_a$ is the angular velocity of the rotor and $J_a$ is its moment of inertia. The kinetic energy $K_a$ is changed by the power terms operating on the generator axis, e.g., the turbine shaft power $\dot{W}_s$ produced by the turbine, friction power $\dot{W}_{f,a}$, and the power taken up by the generator, $\dot{W}_g$, \cite{LieL:18}, and from energy the balance can be expressed as follows:
Here, a simple model of an ideal generator with friction is considered. This model has inputs as electric power available on the grid and the turbine shaft power. This model is based on the angular momentum balance which depends on the turbine shaft power, the friction loss in the unit rotation, and the power taken up by the generator. The rotor angular velocity mainly depends on its inertia, internal friction and available power. The kinetic energy stored in the rotating generator is $ K_a=\frac{1}{2}J_a\omega_a^2$, where $\omega_a$ is the angular velocity of the rotor and $J_a$ is its moment of inertia. The kinetic energy $K_a$ is changed by the power terms operating on the generator axis, e.g., the turbine shaft power $\dot{W}_s$ produced by the turbine, friction power $\dot{W}_{f,a}$, and the power taken up by the generator, $\dot{W}_g$, \cite{LieL:18}, and from energy the balance can be expressed as follows:
\begin{equation}
\frac{dK_a}{dt}=\dot{W}_s-\dot{W}_{f,a}-\dot{W}_g
\end{equation}
Expand Down
2 changes: 1 addition & 1 deletion OpenHPL/Resources/Images/simplegen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPElasticKPPenstock.mo
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ model HPElasticKPPenstock "Model of HP system with elastic penctock (KP), but si
p_p0=997*data.g*(penstockKP.h_s0 + penstockKP.H/penstockKP.N/2):997*data.g*penstockKP.H/penstockKP.N:997*data.g*(penstockKP.h_s0 + penstockKP.H/penstockKP.N*(penstockKP.N - 1/2))) annotation (Placement(transformation(extent={{-20,44},{0,64}})));
Modelica.Blocks.Sources.Ramp load(duration = 1, height = -5e6, offset = 80e6, startTime = 600) annotation (
Placement(transformation(extent = {{-22, 0}, {-2, 20}})));
ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{8,0},{28,20}})));
ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{8,0},{28,20}})));
equation
//19.077 * ones(10)
//, H = 428.5, h_s0 = 69.9, N = 10, p_p0 = 997 * 9.81 * (69.9 + 428.5 / 10 / 2):997 * 9.81 * 428.5 / 10:9.81 * 997 * (69.9 + 428.5 / 10 * (10 - 1 / 2))
//997 * data.g
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{18, 32}, {18, 32}, {18, 22}, {18, 22}, {18, 20}}, color = {0, 0, 127}));
connect(control.y, turbine.u_t) annotation (
Line(points={{11,84},{10,84},{10,54}}, color = {0, 0, 127}));
Expand All @@ -48,7 +48,7 @@ equation
Line(points = {{-51.9, 63.9}, {-46, 63.9}, {-46, 69.9}, {-41.9, 69.9}}, color = {28, 108, 200}));
connect(reservoir.n, intake.p) annotation (
Line(points = {{-81.9, 65.9}, {-76, 65.9}, {-76, 63.9}, {-71.9, 63.9}}, color = {28, 108, 200}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{-1, 10}, {-1, 10}, {8, 10}}, color = {0, 0, 127}));
annotation (
experiment(StopTime = 2000, StartTime = 0, Tolerance = 0.0001, Interval = 0.4));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPElasticKPPenstockCompres.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ model HPElasticKPPenstockCompres "Model of HP system with elastic penctock (KP),
h_s0=69) annotation (Placement(transformation(extent={{-20,44},{0,64}})));
Modelica.Blocks.Sources.Ramp load(duration = 1, height = -5e6, offset = 80e6, startTime = 600) annotation (
Placement(transformation(extent = {{-22, 0}, {-2, 20}})));
OpenHPL.ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{6,0},{26,20}})));
OpenHPL.ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{6,0},{26,20}})));
equation
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{-1, 10}, {6, 10}}, color = {0, 0, 127}));
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{14, 31}, {14, 25.5}, {12, 25.5}, {12, 20}}, color = {0, 0, 127}));
connect(control.y, turbine.u_t) annotation (
Line(points = {{11, 84}, {18, 84}, {18, 52.8}}, color = {0, 0, 127}));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPElasticKPPenstockHalfSurgeD.mo
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ model HPElasticKPPenstockHalfSurgeD "Similar to previous HP system, but with twi
origin={78,38},
extent={{-10,10},{10,-10}},
rotation=180)));
ElectroMech.Generators.SimpleGen aggregate(w_0=52) annotation (Placement(transformation(extent={{8,2},{28,22}})));
ElectroMech.Generators.SimpleGen unit(w_0=52) annotation (Placement(transformation(extent={{8,2},{28,22}})));
ElectroMech.Turbines.Turbine turbine(C_v=3.7, WaterCompress=true) annotation (Placement(transformation(extent={{8,32},{28,52}})));
Waterway.PenstockKP penstockKP(N=20, Vdot_0=19*ones(20)) annotation (Placement(transformation(extent={{-18,42},{2,62}})));
Waterway.SurgeTank surgeTank(D=1.7) annotation (Placement(transformation(extent={{-44,60},{-24,80}})));
equation
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{18, 32}, {18, 32}, {18, 22}, {18, 22}}, color = {0, 0, 127}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{1, 12}, {8, 12}}, color = {0, 0, 127}));
connect(discharge.p, turbine.n) annotation (
Line(points = {{38.1, 37.9}, {31, 37.9}, {31, 41.9}, {28.1, 41.9}}));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPElasticKPPenstockWithoutSurge.mo
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ model HPElasticKPPenstockWithoutSurge "Model of HP system without surge tank and
extent={{-10,-10},{10,10}})));
Modelica.Blocks.Sources.Ramp load(duration = 1, height = -5e6, offset = 80e6, startTime = 600) annotation (
Placement(transformation(extent = {{-8, -2}, {12, 18}})));
ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{22,-2},{42,18}})));
ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{22,-2},{42,18}})));
equation
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{32, 26}, {32, 26}, {32, 18}, {32, 18}}, color = {0, 0, 127}));
connect(condiut.n, penstockKP1.p) annotation (
Line(points = {{-37.9, 63.9}, {-26, 63.9}, {-26, 49.9}, {-15.9, 49.9}}, color = {28, 108, 200}));
Expand All @@ -48,7 +48,7 @@ equation
Line(points = {{81.9, 41.9}, {80, 41.9}, {80, 33.9}, {76.1, 33.9}}, color = {28, 108, 200}));
connect(turbine.p, penstockKP1.n) annotation (
Line(points = {{22.1, 35.9}, {14, 35.9}, {14, 49.9}, {4.1, 49.9}}, color = {28, 108, 200}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{13, 8}, {13, 8}, {22, 8}}, color = {0, 0, 127}));
annotation (
experiment(StopTime = 2000, StartTime = 0, Tolerance = 0.0001, Interval = 0.4));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPSimpleElasticPenstock.mo
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ model HPSimpleElasticPenstock "Model of HP system with elastic penctock (Stagard
OpenHPL.ElectroMech.Turbines.Turbine turbine(C_v=3.7, WaterCompress=true) annotation (Placement(transformation(extent={{20,26},{40,46}})));
Modelica.Blocks.Sources.Ramp load(duration = 1, height = -5e6, offset = 80e6, startTime = 600) annotation (
Placement(transformation(extent = {{-10, -4}, {10, 16}})));
OpenHPL.ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{20,-4},{40,16}})));
OpenHPL.ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{20,-4},{40,16}})));
equation
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{11, 6}, {20, 6}}, color = {0, 0, 127}));
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{26, 25}, {26, 16}}, color = {0, 0, 127}));
connect(penstock.n, turbine.p) annotation (
Line(points = {{10.1, 53.9}, {10.1, 43.95}, {20, 43.95}, {20, 36}}, color = {28, 108, 200}));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPSimpleElasticPenstockWithoutSurge.mo
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ model HPSimpleElasticPenstockWithoutSurge "Model of HP system without surge tank
extent={{-10,-10},{10,10}})));
Modelica.Blocks.Sources.Ramp load(duration = 1, height = -5e6, offset = 80e6, startTime = 600) annotation (
Placement(transformation(extent = {{-16, 0}, {4, 20}})));
OpenHPL.ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{14,2},{34,22}})));
OpenHPL.ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{14,2},{34,22}})));
equation
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{5, 10}, {9.5, 10}, {9.5, 12}, {14, 12}}, color = {0, 0, 127}));
connect(turbine1.P_out, aggregate.P_in) annotation (
connect(turbine1.P_out, unit.P_in) annotation (
Line(points = {{20, 25}, {20, 22}}, color = {0, 0, 127}));
connect(turbine1.u_t, control.y) annotation (
Line(points={{16,48},{27,48},{27,48.8},{24,48.8},{24,84},{21,84}}, color = {0, 0, 127}));
Expand Down
8 changes: 4 additions & 4 deletions OpenHPL/Tests/HPSimplePenstockAutoRefGate.mo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ model HPSimplePenstockAutoRefGate
origin={90,42},
extent={{-10,10},{10,-10}},
rotation=180)));
ElectroMech.Generators.SimpleGen aggregate(w_0=52.4) annotation (Placement(transformation(extent={{16,-4},{36,16}})));
ElectroMech.Generators.SimpleGen unit(w_0=52.4) annotation (Placement(transformation(extent={{16,-4},{36,16}})));
Waterway.Pipe penstock(
H=420,
L=600,
Expand All @@ -41,7 +41,7 @@ model HPSimplePenstockAutoRefGate
Modelica.Blocks.Sources.Constant const1(k = 0.0124905) annotation (
Placement(transformation(extent = {{20, -56}, {40, -36}})));
equation
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{26, 26}, {26, 26}, {26, 16}, {26, 16}}, color = {0, 0, 127}));
connect(turbine.n, discharge.p) annotation (
Line(points = {{36.1, 35.9}, {48.1, 35.9}}));
Expand All @@ -59,9 +59,9 @@ equation
Line(points = {{41, -18}, {56, -18}}, color = {0, 0, 127}));
connect(add.u2, const1.y) annotation (
Line(points = {{56, -30}, {48, -30}, {48, -46}, {41, -46}}, color = {0, 0, 127}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{9, 6}, {12.5, 6}, {16, 6}}, color = {0, 0, 127}));
connect(gain.u, aggregate.u) annotation (
connect(gain.u, unit.u) annotation (
Line(points = {{18, -18}, {12, -18}, {12, 6}, {16, 6}}, color = {0, 0, 127}));
connect(add.y, turbine.u_t) annotation (
Line(points = {{79, -24}, {88, -24}, {100, -24}, {100, 56}, {26, 56}, {26, 46.8}}, color = {0, 0, 127}));
Expand Down
8 changes: 4 additions & 4 deletions OpenHPL/Tests/HPSimplePenstockFrancis.mo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ model HPSimplePenstockFrancis "HP system model with Francis turbine"
origin={92,42},
extent={{-10,10},{10,-10}},
rotation=180)));
ElectroMech.Generators.SimpleGen aggregate(SteadyState=false, k_b=0) annotation (Placement(transformation(extent={{18,-4},{38,16}})));
ElectroMech.Generators.SimpleGen unit(SteadyState=false, k_b=0) annotation (Placement(transformation(extent={{18,-4},{38,16}})));
Waterway.Pipe penstock(
H=420,
L=600,
Expand Down Expand Up @@ -54,9 +54,9 @@ model HPSimplePenstockFrancis "HP system model with Francis turbine"
origin={-90,92},
extent={{-10,-10},{10,10}})));
equation
connect(aggregate.w_out, turbine.w_in) annotation (
connect(unit.w_out, turbine.w_in) annotation (
Line(points = {{32, 16}, {32, 16}, {32, 28}, {32, 28}}, color = {0, 0, 127}));
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{24, 28}, {24, 28}, {24, 16}, {24, 16}}, color = {0, 0, 127}));
connect(discharge.n, tail.n) annotation (
Line(points = {{66.1, 35.9}, {76, 35.9}, {76, 41.9}, {81.9, 41.9}}));
Expand All @@ -70,7 +70,7 @@ equation
Line(points = {{-43.9, 61.9}, {-40, 61.9}, {-40, 65.9}, {-31.9, 65.9}}));
connect(surgeTank.n, penstock.p) annotation (
Line(points = {{-11.9, 65.9}, {-2.1, 65.9}, {-2.1, 55.9}}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{7, 6}, {7, 6}, {18, 6}}, color = {0, 0, 127}));
connect(control.y, turbine.u_t) annotation (
Line(points = {{21, 86}, {28, 86}, {28, 48.8}}, color = {0, 0, 127}));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPSimplePenstockFrancisGener.mo
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ model HPSimplePenstockFrancisGener "HP system model with Francis turbine and gen
origin={92,42},
extent={{-10,10},{10,-10}},
rotation=180)));
ElectroMech.Generators.SynchGen aggregate(UseFrequencyOutput=true) annotation (Placement(transformation(extent={{18,-4},{38,16}})));
ElectroMech.Generators.SynchGen unit(UseFrequencyOutput=true) annotation (Placement(transformation(extent={{18,-4},{38,16}})));
Waterway.Pipe penstock(
H=420,
L=600,
Expand Down Expand Up @@ -53,9 +53,9 @@ model HPSimplePenstockFrancisGener "HP system model with Francis turbine and gen
origin={-90,92},
extent={{-10,-10},{10,10}})));
equation
connect(aggregate.w_out, turbine.w_in) annotation (
connect(unit.w_out, turbine.w_in) annotation (
Line(points = {{34, 16}, {32, 16}, {32, 28}, {32, 28}}, color = {0, 0, 127}));
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{24, 28}, {22, 28}, {22, 16}, {22, 16}}, color = {0, 0, 127}));
coef = turbine.Wdot_s / (495 * 997 * 9.81 * turbine.Vdot - (intake.F_f + discharge.F_f + penstock.F_f));
connect(discharge.n, tail.n) annotation (
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPSimplePenstockPelton.mo
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ model HPSimplePenstockPelton "HP system model with Pelton turbine"
enable_P_out=true) annotation (Placement(transformation(
origin={10,34},
extent={{-10,-10},{10,10}})));
OpenHPL.ElectroMech.Generators.SynchGen aggregate(np=5) annotation (Placement(transformation(extent={{0,-4},{20,16}})));
OpenHPL.ElectroMech.Generators.SynchGen unit(np=5) annotation (Placement(transformation(extent={{0,-4},{20,16}})));
equation
connect(aggregate.P_in, turbine.P_out) annotation (
connect(unit.P_in, turbine.P_out) annotation (
Line(points={{10,18},{10,45},{14,45}}, color = {0, 0, 127}));
connect(aggregate.w_out, turbine.w_in) annotation (
connect(unit.w_out, turbine.w_in) annotation (
Line(points={{21,12},{21,20},{-2,20},{-2,26}}, color = {0, 0, 127}));
connect(reservoir.n, intake.p) annotation (
Line(points={{-82,62},{-77.95,62},{-77.95,60},{-72,60}}, color = {28, 108, 200}));
Expand Down
6 changes: 3 additions & 3 deletions OpenHPL/Tests/HPSimplePenstockResKP.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ model HPSimplePenstockResKP "Model of HP system with using reservoir model based
origin={92,42},
extent={{-10,10},{10,-10}},
rotation=180)));
ElectroMech.Generators.SimpleGen aggregate annotation (Placement(transformation(extent={{18,-4},{38,16}})));
ElectroMech.Generators.SimpleGen unit annotation (Placement(transformation(extent={{18,-4},{38,16}})));
Waterway.Pipe penstock(
D_i=3.3,
D_o=3.3,
Expand All @@ -34,15 +34,15 @@ model HPSimplePenstockResKP "Model of HP system with using reservoir model based
W=1000,
SteadyState=true) annotation (Placement(transformation(extent={{-102,52},{-82,72}})));
equation
connect(turbine.P_out, aggregate.P_in) annotation (
connect(turbine.P_out, unit.P_in) annotation (
Line(points = {{28, 26}, {28, 26}, {28, 16}, {28, 16}}, color = {0, 0, 127}));
connect(discharge.n, tail.n) annotation (
Line(points = {{66.1, 35.9}, {76, 35.9}, {76, 41.9}, {81.9, 41.9}}));
connect(turbine.n, discharge.p) annotation (
Line(points = {{38.1, 35.9}, {43.1, 35.9}, {46.1, 35.9}}));
connect(turbine.p, penstock.n) annotation (
Line(points = {{18.1, 35.9}, {-2.1, 35.9}}));
connect(load.y, aggregate.u) annotation (
connect(load.y, unit.u) annotation (
Line(points = {{9, 6}, {9, 6}, {18, 6}}, color = {0, 0, 127}));
connect(intake.n, surgeTank.p) annotation (
Line(points = {{-43.9, 61.9}, {-40, 61.9}, {-40, 65.9}, {-31.9, 65.9}}));
Expand Down
Loading

0 comments on commit e6ba5e3

Please sign in to comment.