Skip to content

Commit 47526b8

Browse files
committed
White space clean up.
1 parent 18a16ed commit 47526b8

13 files changed

Lines changed: 128 additions & 128 deletions

File tree

OpenHPL/Controllers/Governor.mo

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ equation
129129
annotation (Documentation(info="<html>
130130
<h4>Governor</h4>
131131
<p>
132-
Here, a simple model of the governor that controls the guide vane opening in the turbine based on the reference power
132+
Here, a simple model of the governor that controls the guide vane opening in the turbine based on the reference power
133133
production is described. The block diagram of this governor model is shown in the figure.
134134
</p>
135135
@@ -140,19 +140,19 @@ production is described. The block diagram of this governor model is shown in th
140140
141141
<h5>Implementation</h5>
142142
<p>
143-
Using the model in the figure and the standard Modelica blocks, the governor model is encoded in our library as the
144-
<em>Governor</em> unit. This unit has inputs as the reference power production and generator frequency that are implemented
145-
with the standard Modelica <em>RealInput</em> connector. This <em>Governor</em> unit also uses the standard Modelica
143+
Using the model in the figure and the standard Modelica blocks, the governor model is encoded in our library as the
144+
<em>Governor</em> unit. This unit has inputs as the reference power production and generator frequency that are implemented
145+
with the standard Modelica <em>RealInput</em> connector. This <em>Governor</em> unit also uses the standard Modelica
146146
<em>RealOutput</em> connectors in order to provide output information about the turbine guide vane opening.
147147
</p>
148148
149149
<h5>Parameters</h5>
150150
<p>
151-
In the <em>Governor</em> unit (note: in the text it mentions <em>SynchGen</em> but this appears to be a typo in the
152-
original document - should be <em>Governor</em>), the user can specify the various time constants of this model (see
153-
figure): pilot servomotor time constant T<sub>p</sub>, primary servomotor integration time T<sub>g</sub>, and transient
154-
droop time constant T<sub>r</sub>. The user should also provide the following parameters: droop value σ, transient droop δ,
155-
and nominal values for the frequency and power generation. The information about the maximum, minimum, and initial guide
151+
In the <em>Governor</em> unit (note: in the text it mentions <em>SynchGen</em> but this appears to be a typo in the
152+
original document - should be <em>Governor</em>), the user can specify the various time constants of this model (see
153+
figure): pilot servomotor time constant T<sub>p</sub>, primary servomotor integration time T<sub>g</sub>, and transient
154+
droop time constant T<sub>r</sub>. The user should also provide the following parameters: droop value σ, transient droop δ,
155+
and nominal values for the frequency and power generation. The information about the maximum, minimum, and initial guide
156156
vane opening should also be specified.
157157
</p>
158158

OpenHPL/ElectroMech/Generators/SimpleGen.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ model SimpleGen "Model of a simple generator with mechanical connectors"
1919
<p>Simple model of an ideal generator with friction based on angular momentum balance.</p>
2020
2121
<h5>Energy Balance</h5>
22-
<p>The kinetic energy stored in the rotating generator is \\(K_a = \\frac{1}{2}J_a\\omega_a^2\\),
22+
<p>The kinetic energy stored in the rotating generator is \\(K_a = \\frac{1}{2}J_a\\omega_a^2\\),
2323
where ω<sub>a</sub> is angular velocity and J<sub>a</sub> is moment of inertia.</p>
2424
2525
<p>From energy balance:</p>
@@ -44,7 +44,7 @@ where ω<sub>a</sub> is angular velocity and J<sub>a</sub> is moment of inertia.
4444
<h5>Loading Options</h5>
4545
<p>The generator can be loaded either:</p>
4646
<ul>
47-
<li>via the mechanical shaft connector (e.g., using the <a href=\"modelica://OpenHPL.ElectroMech.PowerSystem.Grid\">Grid</a> model).
47+
<li>via the mechanical shaft connector (e.g., using the <a href=\"modelica://OpenHPL.ElectroMech.PowerSystem.Grid\">Grid</a> model).
4848
Set <code>Pload</code> input to 0 in this case.</li>
4949
<li>or via the input connector <code>Pload</code> specifying the connected electrical load.</li>
5050
</ul>

OpenHPL/ElectroMech/Generators/SynchGen.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ $$</p>
145145
<h5>Excitation System</h5>
146146
<p>Field voltage dynamics:</p>
147147
<p>$$ \\frac{\\mathrm{d}E_f}{\\mathrm{d}t} = \\frac{-E_f + K_E\\left(V_{tr}-V_t-V_{stab}\\right)}{T_E} $$</p>
148-
<p>where \\(K_E\\) is excitation system gain, \\(T_E\\) is excitation time constant, \\(V_{tr}\\) is voltage reference set point,
148+
<p>where \\(K_E\\) is excitation system gain, \\(T_E\\) is excitation time constant, \\(V_{tr}\\) is voltage reference set point,
149149
and \\(V_t = \\sqrt{\\left(E_d'-R_aI_d-x_q'I_q\\right)^2+\\left(E_q'-R_aI_q+x_d'I_d\\right)^2}\\) is terminal voltage.</p>
150150
151151
<h5>Stabilization</h5>
@@ -169,9 +169,9 @@ $$</p>
169169
</ul>
170170
171171
<h5>Parameters</h5>
172-
<p>User specifies: nominal active/reactive powers, phase winding resistance, number of poles, network parameters
173-
(equivalent resistance/reactance, RMS voltage, grid angular velocity), d-/q-axis reactances and time constants,
174-
field voltage limits, excitation/stabilizer gains and time constants, moment of inertia, friction factor, and
172+
<p>User specifies: nominal active/reactive powers, phase winding resistance, number of poles, network parameters
173+
(equivalent resistance/reactance, RMS voltage, grid angular velocity), d-/q-axis reactances and time constants,
174+
field voltage limits, excitation/stabilizer gains and time constants, moment of inertia, friction factor, and
175175
initialization options.</p>
176176
177177
<p><em>Note: For more advanced modeling, consider using generator models from <a href=\"modelica://OpenIPSL\">OpenIPSL</a>.</em></p>

OpenHPL/ElectroMech/Turbines/Pelton.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ equation
8989
<h5>Nozzle Pressure Drop</h5>
9090
<p>Pressure drop across the nozzle (positions \"0\" and \"1\"):</p>
9191
<p>$$ \\Delta p_n=\\frac{1}{2}\\rho\\dot{V}\\left[\\dot{V}\\left(\\frac{1}{A_1^2(Y)}-\\frac{1}{A_0^2}\\right)+k_f\\right] $$</p>
92-
<p>where \\(A_0\\) is cross-sectional area at nozzle beginning, \\(A_1(Y)\\) is area at nozzle end (function of needle position Y),
92+
<p>where \\(A_0\\) is cross-sectional area at nozzle beginning, \\(A_1(Y)\\) is area at nozzle end (function of needle position Y),
9393
and \\(k_f\\) is the nozzle friction loss coefficient.</p>
9494
9595
<h5>Connectors</h5>
@@ -99,7 +99,7 @@ and \\(k_f\\) is the nozzle friction loss coefficient.</p>
9999
</ul>
100100
101101
<h5>Parameters</h5>
102-
<p>User specifies: turbine runner radius, nozzle input diameter, runner bucket angle, friction factors and coefficients,
102+
<p>User specifies: turbine runner radius, nozzle input diameter, runner bucket angle, friction factors and coefficients,
103103
deflector mechanism coefficient.</p>
104104
105105
<p><em>Note: This model has not been tested.</em></p>

OpenHPL/Functions/DarcyFriction/package.mo

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ package DarcyFriction "Functions to define the Darcy friction factor and frictio
66
Documentation(info = "<html>
77
<h4>Friction Term</h4>
88
<p>
9-
First, the functions for defining the friction force in the waterway are described. The friction force
10-
F<sub>f</sub> is directed in the opposite direction of the velocity v (the linear velocity average across
11-
the cross-section of the pipe) of the fluid. A common expression for friction force in the filled pipes
9+
First, the functions for defining the friction force in the waterway are described. The friction force
10+
F<sub>f</sub> is directed in the opposite direction of the velocity v (the linear velocity average across
11+
the cross-section of the pipe) of the fluid. A common expression for friction force in the filled pipes
1212
is the following:
1313
</p>
1414
<p>
1515
$$ F_\\mathrm{f} = -\\frac{1}{8}\\pi\\rho LDf_\\mathrm{D}v|v| $$
1616
</p>
1717
<p>
18-
Here, L and D are related to the pipe length and diameter, respectively. f<sub>D</sub> is a Darcy friction
18+
Here, L and D are related to the pipe length and diameter, respectively. f<sub>D</sub> is a Darcy friction
1919
factor that is a function of Reynolds number N<sub>Re</sub>, with the roughness ratio ε/D as a parameter.
2020
</p>
2121
@@ -26,17 +26,17 @@ factor that is a function of Reynolds number N<sub>Re</sub>, with the roughness
2626
2727
<h5>Flow Regimes</h5>
2828
<p>
29-
The turbulent region (N<sub>Re</sub> &gt; 2.3×10³) is a flow regime where the velocity across the pipe has
30-
a stochastic nature, and where the velocity v is relatively uniform across the pipe when we average the
31-
velocity over some short period of time. The laminar region (N<sub>Re</sub> &lt; 2.1×10³) is a flow regime
32-
with a regular velocity v which varies as a parabola with the radius of the pipe, with zero velocity at the
29+
The turbulent region (N<sub>Re</sub> &gt; 2.3×10³) is a flow regime where the velocity across the pipe has
30+
a stochastic nature, and where the velocity v is relatively uniform across the pipe when we average the
31+
velocity over some short period of time. The laminar region (N<sub>Re</sub> &lt; 2.1×10³) is a flow regime
32+
with a regular velocity v which varies as a parabola with the radius of the pipe, with zero velocity at the
3333
pipe wall and maximal velocity at the centre of the pipe.
3434
</p>
3535
3636
<h5>Laminar Flow</h5>
3737
<p>
38-
Darcy friction factor varies with the roughness of the pipe surface, specified by roughness height ε. For
39-
laminar flow in a cylindrical pipe (N<sub>Re</sub> &lt; 2.1×10³), the Darcy friction factor f<sub>D</sub>
38+
Darcy friction factor varies with the roughness of the pipe surface, specified by roughness height ε. For
39+
laminar flow in a cylindrical pipe (N<sub>Re</sub> &lt; 2.1×10³), the Darcy friction factor f<sub>D</sub>
4040
can be found using the following expression:
4141
</p>
4242
<p>
@@ -56,23 +56,23 @@ $$ f_\\mathrm{D} = \\frac{1}{\\left(2\\log_{10}\\left(\\frac{\\epsilon}{3.7D} +
5656
5757
<h5>Transition Zone</h5>
5858
<p>
59-
In order to define the Darcy friction factor in a region between laminar and turbulent flow regimes, a
60-
cubic polynomial interpolation is used between the laminar value at N<sub>Re</sub>=2100 and the turbulent
59+
In order to define the Darcy friction factor in a region between laminar and turbulent flow regimes, a
60+
cubic polynomial interpolation is used between the laminar value at N<sub>Re</sub>=2100 and the turbulent
6161
value at N<sub>Re</sub>=2300, with matching slopes at both endpoints to achieve global differentiability.
6262
</p>
6363
6464
<h5>Implementation</h5>
6565
<p>
66-
Based on the presented equations for calculation of the friction force in the waterway, two functions are
66+
Based on the presented equations for calculation of the friction force in the waterway, two functions are
6767
encoded in class <code>DarcyFriction</code>:
6868
</p>
6969
<ol>
70-
<li><code>fDarcy</code> &mdash; calculates the Darcy friction factor. This function has the following inputs:
71-
Reynolds number N<sub>Re</sub>, pipe diameter D, and pipe roughness height ε. Returns the friction factor
70+
<li><code>fDarcy</code> &mdash; calculates the Darcy friction factor. This function has the following inputs:
71+
Reynolds number N<sub>Re</sub>, pipe diameter D, and pipe roughness height ε. Returns the friction factor
7272
f<sub>D</sub>.</li>
73-
<li><code>Friction</code> &mdash; calculates the actual friction force based on the response from the
74-
<code>fDarcy</code> function. This function has the following inputs: linear velocity v, pipe length and
75-
diameter L and D, liquid density and viscosity ρ and μ, and pipe roughness height ε. Returns friction force
73+
<li><code>Friction</code> &mdash; calculates the actual friction force based on the response from the
74+
<code>fDarcy</code> function. This function has the following inputs: linear velocity v, pipe length and
75+
diameter L and D, liquid density and viscosity ρ and μ, and pipe roughness height ε. Returns friction force
7676
F<sub>f</sub>.</li>
7777
</ol>
7878

OpenHPL/Functions/Fitting/package.mo

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
within OpenHPL.Functions;
22
package Fitting "Functions for pipe fitting"
33
extends Modelica.Icons.UtilitiesPackage;
4-
4+
55
annotation (Documentation(info="<html>
66
<h4>Fitting</h4>
77
<p>
8-
The functions for defining the pressure drop in various pipe fittings are described here. Due to different
9-
constrictions in the pipes, it is of interest to define losses in these fittings. This can be done based
8+
The functions for defining the pressure drop in various pipe fittings are described here. Due to different
9+
constrictions in the pipes, it is of interest to define losses in these fittings. This can be done based
1010
on friction pressure drop which can be calculated as:
1111
</p>
1212
<p>
1313
$$ \\Delta p_\\mathrm{f} = \\frac{1}{2}\\varphi\\rho v|v| $$
1414
</p>
1515
<p>
16-
Here, the dimensionless factor φ is the generalized friction factor. For a long, straight pipe,
16+
Here, the dimensionless factor φ is the generalized friction factor. For a long, straight pipe,
1717
φ = f<sub>D</sub> L/D.
1818
</p>
1919
@@ -48,7 +48,7 @@ Pressure drop equations are provided for different types of constrictions:
4848
4949
<h5>Implementation</h5>
5050
<p>
51-
Based on the presented equations for the calculation of the dimensionless factor φ in various fittings,
51+
Based on the presented equations for the calculation of the dimensionless factor φ in various fittings,
5252
a set of functions is encoded in the <code>Fitting</code> package, such as:
5353
</p>
5454
<ul>
@@ -62,8 +62,8 @@ a set of functions is encoded in the <code>Fitting</code> package, such as:
6262
</ul>
6363
6464
<p>
65-
All these functions receive the Reynolds number N<sub>Re</sub>, diameters of first and second pipes
66-
D<sub>1</sub> and D<sub>2</sub>, and the pipe roughness height ε. Then, based on the appropriate
65+
All these functions receive the Reynolds number N<sub>Re</sub>, diameters of first and second pipes
66+
D<sub>1</sub> and D<sub>2</sub>, and the pipe roughness height ε. Then, based on the appropriate
6767
equations, these functions provide value for the dimensionless factor φ.
6868
</p>
6969
@@ -90,8 +90,8 @@ end SquareReduction;
9090
</pre>
9191
9292
<p>
93-
Another function, <code>FittingPhi</code>, calls the specific fitting functions based on a
93+
Another function, <code>FittingPhi</code>, calls the specific fitting functions based on a
9494
<code>FittingType</code> parameter to provide the dimensionless factor φ for any fitting type.
9595
</p>
96-
</html>"));
96+
</html>"));
9797
end Fitting;

OpenHPL/Functions/KP07/package.mo

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ package KP07 "Methods for KP07 scheme"
55
annotation (Documentation(info="<html>
66
<h4>KP Scheme</h4>
77
<p>
8-
Functions for solving PDEs in Modelica are described here. The Kurganov-Petrova (KP) scheme is a
9-
wellbalanced second-order scheme, which is a Riemann problem solver free scheme (central scheme) while
10-
at the same time, it takes advantage of the upwind scheme by utilizing the local, one side speed of
8+
Functions for solving PDEs in Modelica are described here. The Kurganov-Petrova (KP) scheme is a
9+
wellbalanced second-order scheme, which is a Riemann problem solver free scheme (central scheme) while
10+
at the same time, it takes advantage of the upwind scheme by utilizing the local, one side speed of
1111
propagation during the calculation of the flux at the cell interfaces.
1212
</p>
1313
@@ -29,24 +29,24 @@ where U(x,t) is the state vector, F(x,t,U) is the vector of fluxes and S(x,t,U)
2929
3030
<h5>Discretization</h5>
3131
<p>
32-
With the finite volume method, we divide the grid into small control volumes/cells and then apply the
32+
With the finite volume method, we divide the grid into small control volumes/cells and then apply the
3333
conservation laws. The semi-discrete (time-dependent ODEs) central-upwind scheme can be written as:
3434
</p>
3535
<p>
3636
$$ \\frac{\\mathrm{d}}{\\mathrm{d}t}\\bar{U}_j(t) = -\\frac{H_{j+\\frac{1}{2}}(t) - H_{j-\\frac{1}{2}}(t)}{\\Delta x} + \\bar{S}_j(t) $$
3737
</p>
3838
<p>
39-
Here, Ū<sub>j</sub> are the cell centre average values, while H<sub>j±1/2</sub>(t) are the central
40-
upwind numerical fluxes at the cell interfaces. The numerical fluxes are calculated using the one-sided
39+
Here, Ū<sub>j</sub> are the cell centre average values, while H<sub>j±1/2</sub>(t) are the central
40+
upwind numerical fluxes at the cell interfaces. The numerical fluxes are calculated using the one-sided
4141
local speeds of propagation and the piecewise linearly reconstructed state values at cell interfaces.
4242
</p>
4343
4444
<h5>Slope Limiter</h5>
4545
<p>
46-
The slope s<sub>j</sub> of the reconstructed function in each cell is computed using a limiter function
47-
to obtain a non-oscillatory nature of the reconstruction. The KP scheme utilizes the generalized
48-
<em>minmod</em> limiter. The parameter θ ∈ [1,2] is used to control or tune the amount of numerical
49-
dissipation present in the resulting scheme. The value of θ = 1.3 is an acceptable starting point
46+
The slope s<sub>j</sub> of the reconstructed function in each cell is computed using a limiter function
47+
to obtain a non-oscillatory nature of the reconstruction. The KP scheme utilizes the generalized
48+
<em>minmod</em> limiter. The parameter θ ∈ [1,2] is used to control or tune the amount of numerical
49+
dissipation present in the resulting scheme. The value of θ = 1.3 is an acceptable starting point
5050
in general.
5151
</p>
5252
@@ -57,8 +57,8 @@ in general.
5757
5858
<h5>Ghost Cells</h5>
5959
<p>
60-
For boundary cells, imaginary cells called ghost cells are used outside the physical boundary. The
61-
average value of the conserved variables at the centre of these ghost cells depends on the nature of
60+
For boundary cells, imaginary cells called ghost cells are used outside the physical boundary. The
61+
average value of the conserved variables at the centre of these ghost cells depends on the nature of
6262
the physical boundary taken into account.
6363
</p>
6464
@@ -76,13 +76,13 @@ Functions for each element of the KP scheme are implemented in the <code>KP07</c
7676
</ul>
7777
7878
<p>
79-
Note: Due to simulation speed considerations, these functions are implemented as <code>model</code> type
79+
Note: Due to simulation speed considerations, these functions are implemented as <code>model</code> type
8080
instead of <code>function</code> type in OpenModelica.
8181
</p>
8282
8383
<p>
84-
Examples of using the KP scheme for solving PDEs are provided in class <code>KP07</code>. More information
85-
about using the <code>KPmethod</code> function is presented in the waterway modelling section for the
84+
Examples of using the KP scheme for solving PDEs are provided in class <code>KP07</code>. More information
85+
about using the <code>KPmethod</code> function is presented in the waterway modelling section for the
8686
<code>PenstockKP</code> and <code>OpenChannel</code> units.
8787
</p>
8888
</html>"));

OpenHPL/Interfaces/package.mo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ package Interfaces "Basic interface components"
44
annotation (Documentation(info="<html>
55
<h4>Interfaces</h4>
66
<p>
7-
In the <strong>OpenHPL</strong>,
8-
two types of connectors are typically used. The first type is the standard Modelica real input/output
9-
connector, the other type is a set of connectors that represent the water flow and are modelled similar
10-
to the connection in an electrical circuit with voltage and current, or similar to the idea of potential
7+
In the <strong>OpenHPL</strong>,
8+
two types of connectors are typically used. The first type is the standard Modelica real input/output
9+
connector, the other type is a set of connectors that represent the water flow and are modelled similar
10+
to the connection in an electrical circuit with voltage and current, or similar to the idea of potential
1111
and flow in Bond Graph models.
1212
</p>
1313
1414
<h5>Contact Connector</h5>
1515
<p>
16-
The water flow connector which is called <code>Contact</code> in the library, contains information about
17-
the pressure in the connector and mass flow rate that flows through the connector. An example of a
16+
The water flow connector which is called <code>Contact</code> in the library, contains information about
17+
the pressure in the connector and mass flow rate that flows through the connector. An example of a
1818
Modelica code for defining the <code>Contact</code> connector looks as follows:
1919
</p>
2020
<pre>
@@ -32,7 +32,7 @@ In addition, some extensions of this water flow connector are developed for bett
3232
3333
<h6>TwoContacts</h6>
3434
<p>
35-
<code>TwoContacts</code> is an extension from the <code>Contact</code> model which provides a model of
35+
<code>TwoContacts</code> is an extension from the <code>Contact</code> model which provides a model of
3636
two connectors of inlet and outlet contacts:
3737
</p>
3838
<pre>
@@ -44,7 +44,7 @@ end TwoContact;
4444
4545
<h6>TurbineContacts</h6>
4646
<p>
47-
<code>TurbineContacts</code> is an extension from <code>TwoContacts</code> model and provides the real
47+
<code>TurbineContacts</code> is an extension from <code>TwoContacts</code> model and provides the real
4848
input and output connectors, additionally. This model is used for turbine modelling:
4949
</p>
5050
<pre>

OpenHPL/Waterway/Gate.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ $$ \\frac{h_2^*}{a} = \\frac{\\psi}{2} \\cdot \\left( \\sqrt{ 1 + \\frac{16}{\\p
156156
So when \\(\\frac{h_2}{a} \\geq \\frac{h_2^*}{a}\\) then we have back-up flow.
157157
</p>
158158
</html>"));
159-
end Gate;
159+
end Gate;

0 commit comments

Comments
 (0)