Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenHPL/ElectroMech/Turbines/Turbine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ model Turbine "Simple turbine model with mechanical connectors"
annotation (Dialog(tab = "Advanced"), choices(checkBox = true));

extends BaseClasses.Power2Torque(power(y=Wdot_s));
extends OpenHPL.Interfaces.TurbineContacts2;
extends OpenHPL.Interfaces.TurbineContacts;

SI.Pressure dp "Turbine pressure drop";
SI.EnergyFlowRate Kdot_i_tr "Kinetic energy flow";
Expand Down
9 changes: 6 additions & 3 deletions OpenHPL/Examples/SimpleGenFrancis.mo
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ model SimpleGenFrancis "Model of a hydropower system with Francis turbine model"
u_end_=2.4,
u_start_=2.28,
w_1_=0.2,
w_v_=0.2) annotation (Placement(transformation(
w_v_=0.2,
enable_P_out=true)
annotation (Placement(transformation(
origin={30,0},
extent={{-10,-10},{10,10}})));
inner OpenHPL.Data data(Vdot_0=4.54) annotation (Placement(transformation(
Expand All @@ -66,7 +68,8 @@ equation
connect(generator.w_out, turbine.w_in) annotation (
Line(points={{19,-24},{12,-24},{12,-8},{18,-8}}, color = {0, 0, 127}));
connect(turbine.P_out, generator.P_in) annotation (
Line(points={{30,-11},{30,-18}}, color = {0, 0, 127}));
Line(points={{34,11},{34,18},{30,18},{30,-18}},
color = {0, 0, 127}));
connect(reservoir.o, intake.i) annotation (
Line(points={{-80,50},{-70,50}}, color = {28, 108, 200}));
connect(surgeTank.i, intake.o) annotation (
Expand All @@ -76,7 +79,7 @@ equation
connect(turbine.o, discharge.i) annotation (
Line(points={{40,0},{50,0}}, color = {28, 108, 200}));
connect(control.y, turbine.u_t) annotation (
Line(points={{39,30},{30,30},{30,12}}, color = {0, 0, 127}));
Line(points={{39,30},{22,30},{22,12}}, color = {0, 0, 127}));
connect(turbine.i, fitting.o) annotation (
Line(points={{20,0},{8,0}}, color = {28, 108, 200}));
connect(tail.o, discharge.o) annotation (
Expand Down
18 changes: 14 additions & 4 deletions OpenHPL/Interfaces/TurbineContacts.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
within OpenHPL.Interfaces;
partial model TurbineContacts "Model of turbine connectors"
extends Interfaces.ContactPort;
input Modelica.Blocks.Interfaces.RealInput u_t "[Guide vane|nozzle] opening of the turbine" annotation (
Placement(transformation(extent = {{-20, -20}, {20, 20}}, rotation = -90, origin={0,120})));
Modelica.Blocks.Interfaces.RealOutput P_out(unit="W") "Mechanical Output power" annotation (
Placement(transformation(origin={0,-110}, extent={{-10,-10},{10,10}}, rotation = 270)));
parameter Boolean enable_P_out = false "If checked, get a connector for the output power"
annotation (choices(checkBox = true), Dialog(group="Outputs",tab="I/O"));
input Modelica.Blocks.Interfaces.RealInput u_t "[Guide vane|nozzle] opening of the turbine" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-80,120}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-80,120})));
Modelica.Blocks.Interfaces.RealOutput P_out(unit="W") if enable_P_out "Mechanical Output power" annotation (
Placement(transformation(origin={40,110}, extent={{-10,-10},{10,10}}, rotation=90), iconTransformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={40,110})));
end TurbineContacts;
18 changes: 0 additions & 18 deletions OpenHPL/Interfaces/TurbineContacts2.mo

This file was deleted.

1 change: 0 additions & 1 deletion OpenHPL/Interfaces/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ TwoContact
ContactPort
ContactNode
TurbineContacts
TurbineContacts2
9 changes: 5 additions & 4 deletions OpenHPL/Tests/HPSimplePenstockPelton.mo
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ model HPSimplePenstockPelton "HP system model with Pelton turbine"
inner OpenHPL.Data data annotation (Placement(transformation(
origin={-90,92},
extent={{-10,-10},{10,10}})));
ElectroMech.Turbines.Pelton turbine(R=1.74/2, D_0=1) annotation (Placement(transformation(
ElectroMech.Turbines.Pelton turbine(R=1.74/2, D_0=1,
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}})));
equation
connect(aggregate.P_in, turbine.P_out) annotation (
Line(points={{4,16},{4,19},{10,19},{10,23}}, color = {0, 0, 127}));
Line(points={{10,18},{10,45},{14,45}}, color = {0, 0, 127}));
connect(aggregate.w_out, turbine.w_in) annotation (
Line(points={{16,16},{16,20},{14,20},{14,23.8}}, color = {0, 0, 127}));
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}));
connect(intake.n, surgeTank.p) annotation (
Expand All @@ -51,7 +52,7 @@ equation
connect(turbine.n, discharge.p) annotation (
Line(points={{20,34},{20,34},{30,34}}, color = {28, 108, 200}));
connect(control.y, turbine.u_t) annotation (
Line(points={{1,84},{10,84},{10,46}}, color = {0, 0, 127}));
Line(points={{1,84},{2,84},{2,46}}, color = {0, 0, 127}));
annotation (
experiment(StopTime = 2000, StartTime = 0, Tolerance = 0.0001, Interval = 0.4));
end HPSimplePenstockPelton;