Skip to content

Commit e050eef

Browse files
committed
FIx the balance issue for gz
1 parent 66c6ad4 commit e050eef

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

OpenHPL/Waterway/Reservoir.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ equation
8484
end if;
8585

8686
o.mdot = -data.rho * Vdot_o "Output flow connector";
87-
o.gz = 0 "Elevation auxiliary variable";
87+
if fixElevation then
88+
o.gz = 0 "Elevation reference: this component is the root of the connected elevation set";
89+
end if;
8890
//o.T = T_0 "TBD: Output temperature connector";
8991
annotation (preferredView="info", Documentation(info="<html>
9092
<h4>Reservoir Model</h4>

OpenHPL/Waterway/ReservoirChannel.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ equation
3838
// boundaries
3939
o.mdot =-q*W*data.rho;
4040
o.p = data.p_a + data.rho * data.g * openChannel.h[N];
41-
o.gz = 0 "Elevation auxiliary variable";
41+
if fixElevation then
42+
o.gz = 0 "Elevation reference: this component is the root of the connected elevation set";
43+
end if;
4244
annotation (
4345
Documentation(preferredView="info", info="<html>
4446
<h4>Reservoir Channel Model</h4>

OpenHPL/Waterway/VolumeFlowSource.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ equation
4444
color={0,0,127},
4545
pattern=LinePattern.Dot));
4646
o.mdot = -data.rho*Vdot;
47-
o.gz = 0 "Elevation auxiliary variable";
47+
if fixElevation then
48+
o.gz = 0 "Elevation reference: this component is the root of the connected elevation set";
49+
end if;
4850
connect(constantVolumeFlow.y, Vdot) annotation (Line(points={{-39,40},{40,40},{40,0},{80,0}}, color={0,0,127}));
4951
connect(firstOrder.u, outFlow) annotation (Line(
5052
points={{-62,-20},{-80,-20},{-80,0},{-120,0}},

0 commit comments

Comments
 (0)