diff --git a/OpenHPL/Data.mo b/OpenHPL/Data.mo index e04ede01..d82dbc15 100644 --- a/OpenHPL/Data.mo +++ b/OpenHPL/Data.mo @@ -38,7 +38,7 @@ record Data "Provides a data set of most common used settings" annotation (Dialog(group = "Waterway properties")); parameter SI.Compressibility beta_total = 1 / (rho*1000^2) "Total compressibility" annotation (Dialog(group = "Waterway properties")); - parameter SI.Frequency f_grid=50 "Grid frequency" annotation (Dialog(group = "System properties")); + parameter SI.Frequency f_grid=50 "Grid frequency" annotation (Dialog(group = "System properties")); parameter Boolean SteadyState=false "If checked, simulation starts in steady state" annotation (choices(checkBox = true), Dialog(group="Initialization")); parameter SI.VolumeFlowRate Vdot_0 = 0 "Initial volume flow rate through the system" diff --git a/OpenHPL/ElectroMech/PowerSystem/Grid.mo b/OpenHPL/ElectroMech/PowerSystem/Grid.mo index 210c57df..7ab5891c 100644 --- a/OpenHPL/ElectroMech/PowerSystem/Grid.mo +++ b/OpenHPL/ElectroMech/PowerSystem/Grid.mo @@ -5,7 +5,7 @@ model Grid "Model of a mechanical grid equivalent" parameter SI.Power Pgrid=1000000000 "Active power capacity of the grid" annotation (Dialog(group="Electrical")); parameter Boolean useLambda=false "If checked, specify Lambda, otherwise the droop Rgrid is used" annotation (choices(checkBox = true), Dialog(group="Electrical")); - parameter Types.Lambda Lambda=Pgrid/(Rgrid*data.f_0) "Network Power-Frequency Characteristic (bias factor)" + parameter Types.Lambda Lambda=Pgrid/(Rgrid*data.f_0*data.f_grid) "Network Power-Frequency Characteristic (bias factor)" annotation (Dialog(group="Electrical",enable=useLambda)); parameter SI.PerUnit Rgrid=0.1 "Equivalent droop setting of the grid" annotation (Dialog(group="Electrical",enable=not useLambda)); diff --git a/OpenHPL/ElectroMech/Turbines/EmpiricalTurbine.mo b/OpenHPL/ElectroMech/Turbines/EmpiricalTurbine.mo index b83905a6..c96d93f2 100644 --- a/OpenHPL/ElectroMech/Turbines/EmpiricalTurbine.mo +++ b/OpenHPL/ElectroMech/Turbines/EmpiricalTurbine.mo @@ -1,14 +1,14 @@ within OpenHPL.ElectroMech.Turbines; model EmpiricalTurbine parameter SI.Height H_n = 100 "Nominal net head" annotation (Dialog(group = "Nominal values")); - parameter SI.Power P_n(displayUnit="MW")=1000000 "Nominal power" annotation (Dialog(group = "Nominal values")); + parameter SI.Power P_n(displayUnit="MW")=1000000 "Nominal power" annotation (Dialog(group = "Nominal values")); extends OpenHPL.ElectroMech.BaseClasses.TorqueEquation; extends OpenHPL.Interfaces.TurbineContacts; extends Interfaces.TwoContacts; extends OpenHPL.Icons.Turbine; SI.VolumeFlowRate Vdot "Turbine flow rate"; - Modelica.Blocks.Sources.RealExpression turbineTorque(y=Tt) "Connection between compute hydraulic torque and driving torque in class TorqueEquation" annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); + Modelica.Blocks.Sources.RealExpression turbineTorque(y=Tt) "Connection between compute hydraulic torque and driving torque in class TorqueEquation" annotation (Placement(transformation(extent={{-70,-10},{-50,10}}))); Modelica.Blocks.Sources.RealExpression turbinePower(y=Tt*speedSensor.w) annotation (Placement(transformation(extent={{-50,20},{-80,40}}))); Modelica.Blocks.Math.Feedback lossCorrection annotation (Placement(transformation(extent={{-50,70},{-30,90}}))); diff --git a/OpenHPL/ElectroMech/Turbines/Turbine.mo b/OpenHPL/ElectroMech/Turbines/Turbine.mo index d7c56911..a3ea3658 100644 --- a/OpenHPL/ElectroMech/Turbines/Turbine.mo +++ b/OpenHPL/ElectroMech/Turbines/Turbine.mo @@ -92,7 +92,7 @@ in the Efficiency data group:
ConstEfficiency = true, default):
The hydraulic efficiency is fixed at the value given by eta_h
- (default 0.9). This is suitable for quick studies where a single
+ (default 0.9). This is suitable for quick studies where a single
representative efficiency value is sufficient.ConstEfficiency = false):
Efficiency varies with guide-vane opening according to a lookup table stored
diff --git a/OpenHPL/Examples/BranchingPipes.mo b/OpenHPL/Examples/BranchingPipes.mo
index e2672e00..dfcf5d5f 100644
--- a/OpenHPL/Examples/BranchingPipes.mo
+++ b/OpenHPL/Examples/BranchingPipes.mo
@@ -1,7 +1,7 @@
within OpenHPL.Examples;
model BranchingPipes "Model of branching pipes"
extends Modelica.Icons.Example;
- Waterway.Reservoir reservoir(fixElevation = true, z_0 = 3) annotation (
+ Waterway.Reservoir reservoir(fixElevation = true, z_0 = 3) annotation (
Placement(transformation(extent = {{-80, -10}, {-60, 10}})));
Waterway.Pipe mainPipe(D_i = 6, H = 1, L = 100) annotation (
Placement(transformation(extent = {{-52, -10}, {-32, 10}})));
@@ -30,4 +30,4 @@ equation
Line(points = {{50, 0}, {60, 0}}, color = {0, 128, 255}));
annotation (
experiment(StopTime = 2000, StartTime = 0, Tolerance = 0.0001, Interval = 0.4));
-end BranchingPipes;
\ No newline at end of file
+end BranchingPipes;
diff --git a/OpenHPL/Examples/DetailedTurbine.mo b/OpenHPL/Examples/DetailedTurbine.mo
index 101dce93..ad1c30bc 100644
--- a/OpenHPL/Examples/DetailedTurbine.mo
+++ b/OpenHPL/Examples/DetailedTurbine.mo
@@ -3,4 +3,4 @@ model DetailedTurbine "Hydropower system using KP scheme based penstock"
extends SimpleTurbine(
redeclare Waterway.PenstockKP penstock);
annotation (experiment(StopTime = 1000, StartTime = 0, Tolerance = 1e-06, Interval = 2));
-end DetailedTurbine;
\ No newline at end of file
+end DetailedTurbine;
diff --git a/OpenHPL/Examples/Gate.mo b/OpenHPL/Examples/Gate.mo
index 0ff45bbd..ead53672 100644
--- a/OpenHPL/Examples/Gate.mo
+++ b/OpenHPL/Examples/Gate.mo
@@ -91,4 +91,4 @@ equation
connect(upstream2.level, up_level.y) annotation (Line(points={{-42,-44},{-52,-44},{-52,0},{-59,0}}, color={0,0,127}));
annotation (
experiment(StopTime=2000, Interval=0.4));
-end Gate;
\ No newline at end of file
+end Gate;
diff --git a/OpenHPL/Examples/OpenChannel.mo b/OpenHPL/Examples/OpenChannel.mo
index aabcd596..3800264a 100644
--- a/OpenHPL/Examples/OpenChannel.mo
+++ b/OpenHPL/Examples/OpenChannel.mo
@@ -1,5 +1,4 @@
within OpenHPL.Examples;
-
model OpenChannel "Model of a hydropower system with open channel model"
extends Modelica.Icons.Example;
Waterway.Reservoir reservoir(h_0 = 5, fixElevation = true, z_0 = 10) annotation(
@@ -8,7 +7,7 @@ model OpenChannel "Model of a hydropower system with open channel model"
Placement(transformation(extent = {{-40, -10}, {-20, 10}})));
Waterway.Reservoir tail(h_0 = 5) annotation(
Placement(transformation(origin = {70, 0}, extent = {{-10, 10}, {10, -10}}, rotation = 180)));
- inner Data data(SteadyState = false, Vdot_0 = 0, f_0(displayUnit = "Hz")) annotation(
+ inner Data data(SteadyState = false, Vdot_0 = 0) annotation(
Placement(transformation(origin = {-90, 90}, extent = {{-10, -10}, {10, 10}})));
Waterway.OpenChannel openChannel(H = 2, useSections = true, N = 10) annotation(
Placement(transformation(extent = {{-10, -10}, {10, 10}})));
@@ -25,4 +24,4 @@ equation
Line(points = {{40, 0}, {60, 0}}, color = {0, 128, 255}));
annotation(
experiment(StopTime = 10000));
-end OpenChannel;
\ No newline at end of file
+end OpenChannel;
diff --git a/OpenHPL/Examples/Pipes.mo b/OpenHPL/Examples/Pipes.mo
index 4d35ef0d..127a7f43 100644
--- a/OpenHPL/Examples/Pipes.mo
+++ b/OpenHPL/Examples/Pipes.mo
@@ -36,4 +36,4 @@ equation
connect(pipeContracting.o, Downstream.o) annotation (Line(points={{10,-20},{30,-20},{30,0},{40,0}}, color={0,128,255}));
annotation (
experiment(StartTime = 0, StopTime = 100, Tolerance = 1e-06, Interval = 0.02));
-end Pipes;
\ No newline at end of file
+end Pipes;
diff --git a/OpenHPL/Examples/SimpleGen.mo b/OpenHPL/Examples/SimpleGen.mo
index 69a33d94..28508086 100644
--- a/OpenHPL/Examples/SimpleGen.mo
+++ b/OpenHPL/Examples/SimpleGen.mo
@@ -11,4 +11,4 @@ equation
points={{30,60},{30,10}},
color={0,0,0}));
annotation (experiment(StopTime = 1000, StartTime = 0, Tolerance = 1e-06, Interval = 2));
-end SimpleGen;
\ No newline at end of file
+end SimpleGen;
diff --git a/OpenHPL/Examples/SimpleGenFrancis.mo b/OpenHPL/Examples/SimpleGenFrancis.mo
index cb702a5c..243913b2 100644
--- a/OpenHPL/Examples/SimpleGenFrancis.mo
+++ b/OpenHPL/Examples/SimpleGenFrancis.mo
@@ -57,7 +57,7 @@ model SimpleGenFrancis "Model of a hydropower system with Francis turbine model"
annotation (Placement(transformation(
origin={30,0},
extent={{-10,-10},{10,10}})));
- inner OpenHPL.Data data(SteadyState = false) annotation (Placement(transformation(
+ inner OpenHPL.Data data(SteadyState = false) annotation (Placement(transformation(
origin={-90,90},
extent={{-10,-10},{10,10}})));
Waterway.Fitting fitting(
@@ -87,4 +87,4 @@ equation
connect(penstock.o, fitting.i) annotation (
Line(points={{-20,0},{-12,0}}, color = {28, 108, 200}));
annotation (experiment(StopTime = 1000, StartTime = 0, Tolerance = 1e-06, Interval = 2));
-end SimpleGenFrancis;
\ No newline at end of file
+end SimpleGenFrancis;
diff --git a/OpenHPL/Examples/SimpleTurbine.mo b/OpenHPL/Examples/SimpleTurbine.mo
index 78e47bb1..3c86528c 100644
--- a/OpenHPL/Examples/SimpleTurbine.mo
+++ b/OpenHPL/Examples/SimpleTurbine.mo
@@ -46,4 +46,4 @@ equation
connect(surgeTank.o, penstock.i) annotation (Line(points={{-20,30},{-10,30}}, color={28,108,200}));
connect(discharge.o, tail.o) annotation (Line(points={{70,0},{80,0}}, color={28,108,200}));
annotation (experiment(StopTime = 1000, StartTime = 0, Tolerance = 1e-06, Interval = 2));
-end SimpleTurbine;
\ No newline at end of file
+end SimpleTurbine;
diff --git a/OpenHPL/Examples/SimpleValve.mo b/OpenHPL/Examples/SimpleValve.mo
index 6dffa1ab..6fdd883e 100644
--- a/OpenHPL/Examples/SimpleValve.mo
+++ b/OpenHPL/Examples/SimpleValve.mo
@@ -52,4 +52,4 @@ Simple model of a water way with only a valve component.
This can be used to investigate the effect of different opening and closing times in the waterway.