#+STARTUP: overview hidestars logdone ident oddeven hideblocks align
#+TITLE:    Nomenclature for OpenHPL
#+SUBTITLE: https://openhpl.opensimhub.org
#+AUTHOR:    Dietmar Winkler
#+EMAIL:     dietmar.winkler@usn.no
# #+DATE:      \today
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:nil *:t TeX:t author:t email:t creator:t <:t
# #+INFOJS_OPT: view:info tdepth:2 ftoc:t path:media/org-info.js
# #+HTML_HEAD: <link rel="stylesheet" href="media/stylesheet.css" type="text/css" />
# #+HTML_HEAD: <link rel="icon" href="media/favicon.ico">
#+HTML_MATHJAX: align:"left" mathml:t path:"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
#+LATEX_CLASS_OPTIONS: [8pt,a4paper]

* Nomenclature for OpenHPL

| Component        | Symbol                                |     | Type                                | Name                    | Description                                                                                                                                                                                                                                            |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Pipe             | $D_i$                                 |     | SI.Diameter                         | D_i                     | "Diameter of the inlet side"                                                                                                                                                                                                                           |
| Pipe             | $D_o$                                 |     | SI.Diameter                         | D_o                     | "Diameter of the outlet side"                                                                                                                                                                                                                          |
| Pipe             | $H$                                   |     | SI.Length                           | H                       | "Height difference from the inlet to the outlet"                                                                                                                                                                                                       |
| Pipe             | $L$                                   |     | SI.Length                           | L                       | "Length of the pipe"                                                                                                                                                                                                                                   |
| Pipe             | $p_\epsilon$                          |     | SI.Height                           | p_eps                   | "Pipe roughness height"                                                                                                                                                                                                                                |
| Pipe             | -                                     |     | Boolean                             | SteadyState             | "if true - starts from Steady State"                                                                                                                                                                                                                   |
| Pipe             | $\dot{V}_0$                           |     | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate in the pipe"                                                                                                                                                                                                                        |
| Pipe             | -                                     |     | SI.Area                             | A_                      | "Average cross section area"                                                                                                                                                                                                                           |
| Pipe             | $A_i$                                 |     | SI.Area                             | A_i                     | "Inlet cross section area"                                                                                                                                                                                                                             |
| Pipe             | $A_o$                                 |     | SI.Area                             | A_o                     | "Outlet cross section area"                                                                                                                                                                                                                            |
| Pipe             | $\cos\theta$                          |     | Real                                | cos_theta               | "slope ratio"                                                                                                                                                                                                                                          |
| Pipe             | -                                     |     | SI.Diameter                         | D_                      | "Average diameter"                                                                                                                                                                                                                                     |
| Pipe             | $\Delta p$                            |     | SI.Pressure                         | dp                      | "Pressure difference across the pipe"                                                                                                                                                                                                                  |
| Pipe             | $F_f$                                 |     | SI.Force                            | F_f                     | "Friction force"                                                                                                                                                                                                                                       |
| Pipe             | $m$                                   |     | SI.Mass                             | m                       | "water mass"                                                                                                                                                                                                                                           |
| Pipe             | $M$                                   |     | SI.Momentum                         | M                       | "Water momentum"                                                                                                                                                                                                                                       |
| Pipe             | $p_i$                                 |     | SI.Pressure                         | p_i                     | "Inlet pressure"                                                                                                                                                                                                                                       |
| Pipe             | $p_o$                                 |     | SI.Pressure                         | p_o                     | "Outlet pressure"                                                                                                                                                                                                                                      |
| Pipe             | $\nu$                                 |     | SI.Velocity                         | v                       | "Water velocity"                                                                                                                                                                                                                                       |
| Pipe             | $\dot{V}$                             |     | SI.VolumeFlowRate                   | Vdot                    | "Flow rate"                                                                                                                                                                                                                                            |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ContactPort      | $\dot{m}$                             |     | SI.MassFlowRate                     | mdot                    | "Mass flow rate"                                                                                                                                                                                                                                       |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| BendPipe         | $K_L$                                 | par | Real                                | K_L                     | "Loss coefficient for pipe bends (Guess or from manufacturer's design)"                                                                                                                                                                                |
| BendPipe         | $D_i$                                 | par | SI.Diameter                         | D_i                     | "Diameter of the inlet side (LHS)"                                                                                                                                                                                                                     |
| BendPipe         | $D_o$                                 | par | SI.Diameter                         | D_o                     | "Diameter of the outlet side (RHS)"                                                                                                                                                                                                                    |
| BendPipe         | $\nu$                                 | -   | SI.Velocity                         | v                       | "Water velocity"                                                                                                                                                                                                                                       |
| BendPipe         | $A$                                   | -   | SI.Area                             | A                       | "Cross section area"                                                                                                                                                                                                                                   |
| BendPipe         | $\Delta p$                            | -   | SI.Pressure                         | dp                      | "Pressure drop of fitting"                                                                                                                                                                                                                             |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Data             | $g$                                   | par | SI.Acceleration                     | g                       | "Gravity constant"                                                                                                                                                                                                                                     |
| Data             | $\gamma_\text{air}$                   | par | Real                                | gamma_air               | "Ratio of heat capacities at constant pressure (C_p) to constant volume (C_v) for air at STP"                                                                                                                                                          |
| Data             | $p_a$                                 | par | SI.Pressure                         | p_a                     | "Atmospheric pressure"                                                                                                                                                                                                                                 |
| Data             | $M_a$                                 | par | SI.MolarMass                        | M_a                     | "Molar mass of air at STP"                                                                                                                                                                                                                             |
| Data             | $\rho$                                | par | SI.Density                          | rho                     | "Water density at T_0"                                                                                                                                                                                                                                 |
| Data             | $\mu$                                 | par | SI.DynamicViscosity                 | mu                      | "Dynamic viscosity of water at T_0"                                                                                                                                                                                                                    |
| Data             | $p_\epsilon$                          | par | SI.Height                           | p_eps                   | "Pipe roughness height"                                                                                                                                                                                                                                |
| Data             | $\beta$                               | par | SI.Compressibility                  | beta                    | "Water compressibility"                                                                                                                                                                                                                                |
| Data             | $\beta_\text{total}$                  | par | SI.Compressibility                  | beta_total              | "Total compressibility"                                                                                                                                                                                                                                |
| Data             | -                                     | par | Boolean                             | TempUse                 | "If checked, the water temperature is not constant"                                                                                                                                                                                                    |
| Data             | $T_0$                                 | par | SI.Temperature                      | T_0                     | "Initial water temperature"                                                                                                                                                                                                                            |
| Data             | $c_p$                                 | par | SI.SpecificHeatCapacity             | c_p                     | "Heat capacity of water at T_0"                                                                                                                                                                                                                        |
| Data             | -                                     | par | Boolean                             | Steady                  | "If checked, simulation starts from Steady State"                                                                                                                                                                                                      |
| Data             | $V_0$                                 | par | SI.VolumeFlowRate                   | *V_0*                   | "Initial flow rate through the system"                                                                                                                                                                                                                 |
| Data             | $f_0$                                 | par | SI.Frequency                        | f_0                     | "Initial system frequency"                                                                                                                                                                                                                             |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Reservoir        | $H_r$                                 | par | SI.Height                           | H_r                     | "Initial water level above intake"                                                                                                                                                                                                                     |
| Reservoir        | $L$                                   | par | SI.Length                           | L                       | "Length of the reservoir"                                                                                                                                                                                                                              |
| Reservoir        | $w$                                   | par | SI.Length                           | w                       | "Bed width of the reservoir"                                                                                                                                                                                                                           |
| Reservoir        | $\alpha$                              | par | SI.Conversions.NonSIunits.Angle_deg | alpha                   | "The angle of the reservoir walls (zero angle corresponds to vertical walls)"                                                                                                                                                                          |
| Reservoir        | $f$                                   | par | Real                                | f                       | "Friction factor of the reservoir"                                                                                                                                                                                                                     |
| Reservoir        | -                                     | par | Boolean                             | UseInFlow               | "If checked - the inlet/outlet flow is used"                                                                                                                                                                                                           |
| Reservoir        | -                                     | par | Boolean                             | Input_level             | "If checked - the input Level_in should be connected. Otherwise the constant level H_r is used"                                                                                                                                                        |
| Reservoir        | $A$                                   | -   | SI.Area                             | A                       | "vertiacal cross section"                                                                                                                                                                                                                              |
| Reservoir        | $m$                                   | -   | SI.Mass                             | m                       | "water mass"                                                                                                                                                                                                                                           |
| Reservoir        | $\dot{m}$                             | -   | SI.MassFlowRate                     | mdot                    | "water mass flow rate"                                                                                                                                                                                                                                 |
| Reservoir        | $\dot{V}_o$                           | -   | SI.VolumeFlowRate                   | Vdot_o                  | "outlet flow rate"                                                                                                                                                                                                                                     |
| Reservoir        | $\dot{V}_i$                           | -   | SI.VolumeFlowRate                   | Vdot_i                  | "inlet flow rate"                                                                                                                                                                                                                                      |
| Reservoir        | $\dot{V}$                             | -   | SI.VolumeFlowRate                   | Vdot                    | "vertical flow rate"                                                                                                                                                                                                                                   |
| Reservoir        | $\nu$                                 | -   | SI.Velocity                         | v                       | "water velosity"                                                                                                                                                                                                                                       |
| Reservoir        | $M$                                   | -   | SI.Momentum                         | M                       | "water momentum"                                                                                                                                                                                                                                       |
| Reservoir        | $F_f$                                 | -   | SI.Force                            | F_f                     | "friction force"                                                                                                                                                                                                                                       |
| Reservoir        | $H$                                   | -   | SI.Height                           | H                       | "water height"                                                                                                                                                                                                                                         |
| Reservoir        | $p_o$                                 | -   | SI.Pressure                         | p_o                     | "outlet pressure"                                                                                                                                                                                                                                      |
| Reservoir        | -                                     | -   | RealInput                           | *V_in*                  | "Conditional input inflow of the reservoir"                                                                                                                                                                                                            |
| Reservoir        | -                                     | -   | RealInput                           | Level_in                | "Conditional input water level of the reservoir"                                                                                                                                                                                                       |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SurgeTank        | $H$                                   | par | SI.Height                           | H                       | "Vertical component of the length of the surge shaft"                                                                                                                                                                                                  |
| SurgeTank        | $L$                                   | par | SI.Length                           | L                       | "Length of the surge shaft"                                                                                                                                                                                                                            |
| SurgeTank        | $D$                                   | par | SI.Diameter                         | D                       | "Diameter of the surge shaft"                                                                                                                                                                                                                          |
| SurgeTank        | $p_\epsilon$                          | par | SI.Height                           | p_eps                   | "Pipe roughness height"                                                                                                                                                                                                                                |
| SurgeTank        | $D_{so}$                              | par | SI.Diameter                         | D_so                    | "If Sharp orifice type: Diameter of sharp orifice"                                                                                                                                                                                                     |
| SurgeTank        | $D_t$                                 | par | SI.Diameter                         | D_t                     | "If Throttle value type: Diameter of throat"                                                                                                                                                                                                           |
| SurgeTank        | $L_t$                                 | par | SI.Diameter                         | L_t                     | "If Throttle value type: +Diameter+ *Length* of throat"                                                                                                                                                                                                |
| SurgeTank        | -                                     | par | Boolean                             | SteadyState             | "If true - starts from Steady State"                                                                                                                                                                                                                   |
| SurgeTank        | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate in the surge tank"                                                                                                                                                                                                                  |
| SurgeTank        | $h_0$                                 | par | SI.Height                           | h_0                     | "Initial water height in the surge tank"                                                                                                                                                                                                               |
| SurgeTank        | $p_{ac}$                              | par | SI.Pressure                         | p_ac                    | "Initial pressure of air-cushion inside the surge tank"                                                                                                                                                                                                |
| SurgeTank        | $T_{ac}$                              | par | SI.Temperature                      | T_ac                    | "Initial air-cushion temperature"                                                                                                                                                                                                                      |
| SurgeTank        | $m$                                   | -   | SI.Mass                             | m                       | "Water mass"                                                                                                                                                                                                                                           |
| SurgeTank        | $m_a$                                 | -   | SI.Mass                             | m_a                     | "Air mass inside surge tank"                                                                                                                                                                                                                           |
| SurgeTank        | $M$                                   | -   | SI.Momentum                         | M                       | "Water momuntum"                                                                                                                                                                                                                                       |
| SurgeTank        | $\dot{M}$                             | -   | SI.Force                            | Mdot                    | "Difference in influent and effulent momentum"                                                                                                                                                                                                         |
| SurgeTank        | $F$                                   | -   | SI.Force                            | F                       | "Total force acting in the surge tank"                                                                                                                                                                                                                 |
| SurgeTank        | $A$                                   | -   | SI.Area                             | A                       | "Cross sectional area of the surge tank"                                                                                                                                                                                                               |
| SurgeTank        | $A_t$                                 | -   | SI.Area                             | A_t                     | "Cross sectional area of the throttle valve surge tank"                                                                                                                                                                                                |
| SurgeTank        | $l$                                   | -   | SI.Length                           | l                       | "Length of water in the surge tank"                                                                                                                                                                                                                    |
| SurgeTank        | $\cos\theta$                          | -   | Real                                | cos_theta               | "Slope ratio"                                                                                                                                                                                                                                          |
| SurgeTank        | $\nu$                                 | -   | SI.Velocity                         | v                       | "Water velocity"                                                                                                                                                                                                                                       |
| SurgeTank        | $F_p$                                 | -   | SI.Force                            | F_p                     | "Pressure force"                                                                                                                                                                                                                                       |
| SurgeTank        | $F_f$                                 | -   | SI.Force                            | F_f                     | "Friction force"                                                                                                                                                                                                                                       |
| SurgeTank        | $F_g$                                 | -   | SI.Force                            | F_g                     | "Gravity force"                                                                                                                                                                                                                                        |
| SurgeTank        | $p_t$                                 | -   | SI.Pressure                         | p_t                     | "Pressure at top of the surge tank"                                                                                                                                                                                                                    |
| SurgeTank        | $p_b$                                 | -   | SI.Pressure                         | p_b                     | "Pressure at bottom of the surge tank"                                                                                                                                                                                                                 |
| SurgeTank        | $\phi_{SO}$                           | -   | Real                                | phiSO                   | "Dimensionless factor based on the type of fitting "                                                                                                                                                                                                   |
| SurgeTank        | $h$                                   | -   | SI.Height                           | h                       | "Water height in the surge tank"                                                                                                                                                                                                                       |
| SurgeTank        | $\dot{V}$                             | -   | SI.VolumeFlowRate                   | Vdot                    | "Water flow rate"                                                                                                                                                                                                                                      |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Fitting          | $D_i$                                 | par | SI.Diameter                         | D_i                     | "Pipe diameter of the inlet (LHS)"                                                                                                                                                                                                                     |
| Fitting          | $D_o$                                 | par | SI.Diameter                         | D_o                     | "Pipe diameter of the outlet (RHS)"                                                                                                                                                                                                                    |
| Fitting          | $\vartheta$                           | par | SI.Conversions.NonSIunits.Angle_deg | theta                   | "If Tapered fitting: angle of the tapered reduction/expansion"                                                                                                                                                                                         |
| Fitting          | $L$                                   | par | SI.Length                           | L                       | "If Thick Orifice: length of the thick orifice, condition L/D_2<=5. If this condition is not satisfied (L is longer) then use Square Reduction followed by Square Expansion"                                                                           |
| Fitting          | -                                     | par | Types.Fitting                       | fit_type                | "Type of pipe fitting";                                                                                                                                                                                                                                |
| Fitting          | $\nu$                                 | -   | SI.Velocity                         | v                       | "Water velocity"                                                                                                                                                                                                                                       |
| Fitting          | $A$                                   | -   | SI.Area                             | A                       | "Cross section area"                                                                                                                                                                                                                                   |
| Fitting          | $\Delta p$                            | -   | SI.Pressure                         | dp                      | "Pressure drop of fitting"                                                                                                                                                                                                                             |
| Fitting          | $\phi$                                | -   | Real                                | phi                     | "Dimensionless factor based on the type of fitting "                                                                                                                                                                                                   |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Penstock         | $H$                                   | par | SI.Height                           | H                       | Height over which water fall in the pipe, m"                                                                                                                                                                                                           |
| Penstock         | $L$                                   | par | SI.Length                           | L                       | "length of the pipe, m"                                                                                                                                                                                                                                |
| Penstock         | $D_i$                                 | par | SI.Diameter                         | D_i                     | "Diametr from the input side of the pipe"                                                                                                                                                                                                              |
| Penstock         | $D_o$                                 | par | SI.Diameter                         | D_o                     | "Diametr from the output side of the pipe"                                                                                                                                                                                                             |
| Penstock         | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "initial flow rate in the pipe, m3/s"                                                                                                                                                                                                                  |
| Penstock         | $N$                                   | par | Integer                             | N                       | "Number of segments"                                                                                                                                                                                                                                   |
| Penstock         | $$                                    | -   | SI.Diameter                         | dD                      | 0.5 * (D_i + D_o)                                                                                                                                                                                                                                      |
| Penstock         | $$                                    | -   | SI.Diameter                         | D[N]                    | linspace(D_i + dD / 2, D_o - dD / 2, N)                                                                                                                                                                                                                |
| Penstock         | $$                                    | -   | SI.Diameter                         | D_[N + 1]               | linspace(D_i, D_o, N + 1)                                                                                                                                                                                                                              |
| Penstock         | $$                                    | -   | SI.Area                             | A[N]                    |                                                                                                                                                                                                                                                        |
| Penstock         | $A_{m_{end}}$                         | -   | SI.Area                             | A_m_end                 |                                                                                                                                                                                                                                                        |
| Penstock         | $A_{m_{first}}$                       | -   | SI.Area                             | A_m_first               |                                                                                                                                                                                                                                                        |
| Penstock         | $p_i$                                 | -   | SI.Pressure                         | p_i                     |                                                                                                                                                                                                                                                        |
| Penstock         | $p_o$                                 | -   | SI.Pressure                         | p_o                     |                                                                                                                                                                                                                                                        |
| Penstock         | $p\_[N-1]$                            | -   | SI.Pressure                         | p_[N-1]                 |                                                                                                                                                                                                                                                        |
| Penstock         | $\Delta p$                            | -   | SI.Pressure                         | dp                      |                                                                                                                                                                                                                                                        |
| Penstock         | $p_m[N-2]$                            | -   | SI.Pressure                         | p_m[N-2]                |                                                                                                                                                                                                                                                        |
| Penstock         | $\Delta x$                            | -   | SI.Length                           | dx                      |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | SI.Length                           | Per_m[N-2]              |                                                                                                                                                                                                                                                        |
| Penstock         | $\dot{m}_R$                           | -   | SI.MassFlowRate                     | mdot_R                  |                                                                                                                                                                                                                                                        |
| Penstock         | $\dot{m}_V$                           | -   | SI.MassFlowRate                     | mdot_V                  |                                                                                                                                                                                                                                                        |
| Penstock         | $\dot{m}[N-2]$                        | -   | SI.MassFlowRate                     | mdot[N-2]               |                                                                                                                                                                                                                                                        |
| Penstock         | $\dot{m}_{exp}$                       | -   | SI.MassFlowRate                     | mdot_exp[N]             |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | F_ap[N-1]               |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | F_m[N-2]                |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | F_exp[N]                |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | p_eps_m[N-2]            |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | Ap_m[3,N-2]             |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | F_m_end                 |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | Real                                | F_m_first               |                                                                                                                                                                                                                                                        |
| Penstock         | $F_g[N-2]$                            | -   | SI.Force                            | F_g[N - 2]              |                                                                                                                                                                                                                                                        |
| Penstock         | $F_p[N-2]$]                           | -   | SI.Force                            | F_p[N - 2]              |                                                                                                                                                                                                                                                        |
| Penstock         | $\rho_m$                              | -   | SI.Density                          | rho_m[N - 2]            |                                                                                                                                                                                                                                                        |
| Penstock         | $\rho_{m_{end}}$                      | -   | SI.Density                          | rho_m_end               |                                                                                                                                                                                                                                                        |
| Penstock         | $\rho_{m_{first}}$                    | -   | SI.Density                          | rho_m_first             |                                                                                                                                                                                                                                                        |
| Penstock         | $\nu_{exp}$                           | -   | SI.Velocity                         | v_exp[N]                |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | SI.VolumeFlowRate                   | V_p_out[N - 2]          |                                                                                                                                                                                                                                                        |
| Penstock         |                                       | -   | SI.VolumeFlowRate                   | V_p_out_end             |                                                                                                                                                                                                                                                        |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PenstockKP       | $H$                                   | par | SI.Height                           | H                       | "Height difference from the inlet to the outlet of the pipe"                                                                                                                                                                                           |
| PenstockKP       | $L$                                   | par | SI.Length                           | L                       | "length of the pipe"                                                                                                                                                                                                                                   |
| PenstockKP       | $D_i$                                 | par | SI.Diameter                         | D_i                     | "Diametr from the inlet side of the pipe"                                                                                                                                                                                                              |
| PenstockKP       | $D_o$                                 | par | SI.Diameter                         | D_o                     | "Diametr from the outlet side of the pipe"                                                                                                                                                                                                             |
| PenstockKP       | $p_\epsilon$                          | par | SI.Height                           | p_eps                   | "Pipe roughness height"                                                                                                                                                                                                                                |
| PenstockKP       |                                       | par | Boolean                             | SteadyState             | "if true - starts from Steady State"                                                                                                                                                                                                                   |
| PenstockKP       | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate in the pipe vector, m3/s"                                                                                                                                                                                                           |
| PenstockKP       | $H_{s_0}$                             | par | SI.Height                           | h_s0                    | "Initial water head before the pipe, m"                                                                                                                                                                                                                |
| PenstockKP       | $p_{p_0}$                             | par | SI.Pressure                         | p_p0                    | "Initial presure vector, bar"                                                                                                                                                                                                                          |
| PenstockKP       | $N$                                   | par | Integer                             | N                       | "Number of segments"                                                                                                                                                                                                                                   |
| PenstockKP       |                                       | par | Boolean                             | PipeElasticity          | "if checked - include pipe elasticity to the model"                                                                                                                                                                                                    |
| PenstockKP       |                                       | -   | SI.Diameter                         | dD                      | "step in diameter change"                                                                                                                                                                                                                              |
| PenstockKP       |                                       | -   | SI.Diameter                         | D[N]                    | "centered diameter vector in atm. p."                                                                                                                                                                                                                  |
| PenstockKP       |                                       | -   | SI.Diameter                         | D_[N + 1]               | "boundary diameter vector in atm. p."                                                                                                                                                                                                                  |
| PenstockKP       |                                       | -   | SI.Area                             | A_atm[N]                | "centered cross are vector in atm. p."                                                                                                                                                                                                                 |
| PenstockKP       |                                       | -   | SI.Area                             | A_atm_[N + 1]           | "boundary cross are vector in atm. p."                                                                                                                                                                                                                 |
| PenstockKP       |                                       | -   | SI.Area                             | A[N]                    | "centered cross are vector"                                                                                                                                                                                                                            |
| PenstockKP       |                                       | -   | SI.Area                             | A_[N, 4]                | "boundary cross are vector"                                                                                                                                                                                                                            |
| PenstockKP       |                                       | -   | SI.Area                             | _A_atm[N, 4]            | "boundary cross are matrix in atm. p."                                                                                                                                                                                                                 |
| PenstockKP       | $p_p[N]$                              | -   | SI.Pressure                         | p_p[N]                  | "centered pressure"                                                                                                                                                                                                                                    |
| PenstockKP       | $\Delta p$                            | -   | SI.Pressure                         | dp                      | "initial p. step"                                                                                                                                                                                                                                      |
| PenstockKP       | $p_i$                                 | -   | SI.Pressure                         | p_i                     | "Inlet pressure (LHS)"                                                                                                                                                                                                                                 |
| PenstockKP       | $p_o$                                 | -   | SI.Pressure                         | p_o                     | "Outlet Pressure (RHS)"                                                                                                                                                                                                                                |
| PenstockKP       | $\mathbf{p$}                          | -   | SI.Pressure                         | p_[N, 4]                | "boundary p. matrix";                                                                                                                                                                                                                                  |
| PenstockKP       | $\Delta x$                            | -   | SI.Length                           | dx                      | "length step"                                                                                                                                                                                                                                          |
| PenstockKP       | $\Delta h$                            |     | SI.Length                           | dh                      | "height step"                                                                                                                                                                                                                                          |
| PenstockKP       | $\dot{m}[N]$                          | -   | SI.MassFlowRate                     | mdot[N]                 | "centered mass flow"                                                                                                                                                                                                                                   |
| PenstockKP       | $\dot{m}_R$                           | -   | SI.MassFlowRate                     | mdot_R                  | "left bound mdot"                                                                                                                                                                                                                                      |
| PenstockKP       | $\dot{m}_V$                           | -   | SI.MassFlowRate                     | mdot_V                  | "right bound mdot"                                                                                                                                                                                                                                     |
| PenstockKP       | $\mathbf{\dot{m}}$                    | -   | SI.MassFlowRate                     | mdot_[N, 4]             | "boundary mdot matrix";                                                                                                                                                                                                                                |
| PenstockKP       |                                       | -   | Real                                | U[2 * N]                | "centered states"                                                                                                                                                                                                                                      |
| PenstockKP       |                                       | -   | Real                                | U_[8, N]                | "boundary states"                                                                                                                                                                                                                                      |
| PenstockKP       | $F_{ap}$                              | -   | Real                                | F_ap[N]                 | "centered A*rho"                                                                                                                                                                                                                                       |
| PenstockKP       |                                       | -   | Real                                | S_[2 * N]               | "source term"                                                                                                                                                                                                                                          |
| PenstockKP       |                                       | -   | Real                                | F_[2 * N, 4]            | "F matrix"                                                                                                                                                                                                                                             |
| PenstockKP       | $\lambda_+$                           | -   | Real                                | lam1[N, 4]              | "eigenvalue '+'"                                                                                                                                                                                                                                       |
| PenstockKP       | $\lambda_-$                           | -   | Real                                | lam2[N, 4]              | "eigenvalue '-'"                                                                                                                                                                                                                                       |
| PenstockKP       | $\rho[N]$                             | -   | SI.Density                          | rho[N]                  | "centered density"                                                                                                                                                                                                                                     |
| PenstockKP       | $\rho\_[N,4]$                         | -   | SI.Density                          | rho_[N, 4]              | "boundary density"                                                                                                                                                                                                                                     |
| PenstockKP       | $\nu\_[N,4]$                          | -   | SI.Velocity                         | v_[N, 4]                | "bounds velocity"                                                                                                                                                                                                                                      |
| PenstockKP       | $\nu[N]$                              | -   | SI.Velocity                         | v[N]                    | "centered velocity"                                                                                                                                                                                                                                    |
| PenstockKP       | $\dot{V}[N]$                          | -   | SI.VolumeFlowRate                   | Vdot[N]                 | "centered volumetric flow"                                                                                                                                                                                                                             |
| PenstockKP       | $F_f[N$]                              | -   | SI.Force                            | F_f[N]                  | "centered friction force vector"                                                                                                                                                                                                                       |
| PenstockKP       | $\theta$                              | -   | Real                                | theta                   | "Parameter for slope limiter"                                                                                                                                                                                                                          |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Drafttube        | $H$                                   | par | SI.Length                           | H                       | "Vertical height of conical diffuser"                                                                                                                                                                                                                  |
| Drafttube        | $L$                                   | par | SI.Length                           | L                       | "Slant height of conical diffuser, for conical diffuser"                                                                                                                                                                                               |
| Drafttube        | $D_i$                                 | par | SI.Diameter                         | D_i                     | "Diameter of the inlet side"                                                                                                                                                                                                                           |
| Drafttube        | $D_o$                                 | par | SI.Diameter                         | D_o                     | "Diameter of the outlet side, for conical diffuser"                                                                                                                                                                                                    |
| Drafttube        | $L_m$                                 | par | SI.Length                           | L_m                     | "Length of Main section of Moody spreading pipe"                                                                                                                                                                                                       |
| Drafttube        | $L_b$                                 | par | SI.Length                           | L_b                     | "Length of Branch section of Moody spreading pipe"                                                                                                                                                                                                     |
| Drafttube        | $\theta$                              | par | SI.Conversions.NonSIunits.Angle_deg | theta                   | "Angle at which conical diffuser is inclined"                                                                                                                                                                                                          |
| Drafttube        | $\theta_\text{moody}$                 | par | SI.Conversions.NonSIunits.Angle_deg | theta_moody             | "Angle at which Moody spreading pipes are branched possible value is 15,30,45,60 or 90)"                                                                                                                                                               |
| Drafttube        | $p_\epsilon$                          | par | SI.Height                           | p_eps                   | "Pipe roughness height"                                                                                                                                                                                                                                |
| Drafttube        |                                       | par | Boolean                             | SteadyState             | "if true - starts from Steady State"                                                                                                                                                                                                                   |
| Drafttube        | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate in the pipe"                                                                                                                                                                                                                        |
| Drafttube        | $D_{avg}$                             | -   | SI.Diameter                         | D_                      | "Average diameter"                                                                                                                                                                                                                                     |
| Drafttube        | $A_i$                                 | -   | SI.Area                             | A_i                     | "Inlet cross-section area of draft tube"                                                                                                                                                                                                               |
| Drafttube        | $A_o$                                 | -   | SI.Area                             | A_o                     | "Outlet cross-section area of draft tube"                                                                                                                                                                                                              |
| Drafttube        | $A_{avg}$                             | -   | SI.Area                             | A_                      | "Average cross-section area of conical diffuser"                                                                                                                                                                                                       |
| Drafttube        | $m$                                   | -   | SI.Mass                             | m                       | "Mass of water inside conical diffuser"                                                                                                                                                                                                                |
| Drafttube        | $m_m$                                 | -   | SI.Mass                             | m_m                     | "Mass of water inside Main section Moody spreading pipes"                                                                                                                                                                                              |
| Drafttube        | $m_b$                                 | -   | SI.Mass                             | m_b                     | "Mass of water inside Branch section Moody spreading pipes"                                                                                                                                                                                            |
| Drafttube        | $\dot{m}_m$                           | -   | SI.MassFlowRate                     | mdot_m                  | "Mass flow rate inside Main section of Moody spreading pipes"                                                                                                                                                                                          |
| Drafttube        | $\dot{m}_b$                           | -   | SI.MassFlowRate                     | mdot_b                  | "Mass flow rate inside Branch section of Moody spreading pipes"                                                                                                                                                                                        |
| Drafttube        | $V$                                   | -   | SI.Volume                           | V                       | "Volume of water inside the draft tube"                                                                                                                                                                                                                |
| Drafttube        | $M$                                   | -   | SI.Momentum                         | M                       | "Momentum of water inside the draft tube"                                                                                                                                                                                                              |
| Drafttube        | $\dot{M}$                             | -   | SI.Force                            | Mdot                    | "Rate of change of water momentum"                                                                                                                                                                                                                     |
| Drafttube        | $F$                                   | -   | SI.Force                            | F                       | "Total force acting in the tube"                                                                                                                                                                                                                       |
| Drafttube        | $F_p$                                 | -   | SI.Force                            | F_p                     | "Pressure force"                                                                                                                                                                                                                                       |
| Drafttube        | $F_f$                                 | -   | SI.Force                            | F_f                     | "Fluid frictional force"                                                                                                                                                                                                                               |
| Drafttube        | $F_g$                                 | -   | SI.Force                            | F_g                     | "Weight of water"                                                                                                                                                                                                                                      |
| Drafttube        | $F_{fm}$                              | -   | SI.Force                            | F_fm                    | "Fluid frictional force in the Main section of Moody spreading pipe"                                                                                                                                                                                   |
| Drafttube        | $F_{fb}$                              | -   | SI.Force                            | F_fb                    | "Fluid frictional force in the Branch section of Moody spreading pipe"                                                                                                                                                                                 |
| Drafttube        | $\nu$                                 | -   | SI.Velocity                         | v                       | "Water velocity for conical diffuser"                                                                                                                                                                                                                  |
| Drafttube        | $v_m$                                 | -   | SI.Velocity                         | v_m                     | "Water velocity inside Main section of Moody spreading pipes"                                                                                                                                                                                          |
| Drafttube        | $v_b$                                 | -   | SI.Velocity                         | v_b                     | "Water velocity inside Branch section of Moody spreading pipes"                                                                                                                                                                                        |
| Drafttube        | $p_i$                                 | -   | SI.Pressure                         | p_i                     | "Inlet pressure"                                                                                                                                                                                                                                       |
| Drafttube        | $p_o$                                 | -   | SI.Pressure                         | p_o                     | "Outlet pressure"                                                                                                                                                                                                                                      |
| Drafttube        | $\Delta p$                            | -   | SI.Pressure                         | *dp*                    | "Pressure drop in and out of draft tube"                                                                                                                                                                                                               |
| Drafttube        | $\phi_d$                              | -   | Real                                | phi_d                   | "Generalized friction factor for draft tube"                                                                                                                                                                                                           |
| Drafttube        | $\phi_{d_o}$                          | -   | Real                                | phi_d_o                 | "Initial generalized friction factor for Moody spreading pipes"                                                                                                                                                                                        |
| Drafttube        | $\dot{V}$                             | -   | SI.VolumeFlowRate                   | Vdot                    | "Volumeteric flow rate"                                                                                                                                                                                                                                |
| Drafttube        | $\dot{V}_b$                           | -   | SI.VolumeFlowRate                   | Vdot_b                  | "Volumeteric flow rate for Branch section of Moody spreading pipes"                                                                                                                                                                                    |
| Drafttube        | $\cos(\theta)$                        | -   | Real                                | cos_theta               |                                                                                                                                                                                                                                                        |
| Drafttube        | $\cos(\theta_\text{moody})$           | -   | Real                                | cos_theta_moody         |                                                                                                                                                                                                                                                        |
| Drafttube        | $\frac{\cos(\theta_\text{moody})}{2}$ | -   | Real                                | cos_theta_moody_by_2    |                                                                                                                                                                                                                                                        |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| OpenChannel      | $N$                                   | par | Integer                             | N                       | "Number of discretization units"                                                                                                                                                                                                                       |
| OpenChannel      | $w$                                   | par | SI.Length                           | w                       | "Channel width"                                                                                                                                                                                                                                        |
| OpenChannel      | $L$                                   | par | SI.Length                           | L                       | "Channel length"                                                                                                                                                                                                                                       |
| OpenChannel      | $H[2]$                                | par | SI.Height                           | H[2]                    | "Channel bed geometry, height from the left and right sides"                                                                                                                                                                                           |
| OpenChannel      | $f_n$                                 | par | Real                                | f_n                     | "Manning's roughness coefficient [s/m^1/3]"                                                                                                                                                                                                            |
| OpenChannel      | $$                                    | par | Boolean                             | SteadyState             | "if true - starts from Steady State" annotation                                                                                                                                                                                                        |
| OpenChannel      | $$                                    | par | SI.Height                           | h0[N]                   | "Initial depth" annotation (Dialog(group = "Initialization"));                                                                                                                                                                                         |
| OpenChannel      | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate" annotation (Dialog(group = "Initialization"));                                                                                                                                                                                     |
| OpenChannel      | $$                                    | par | Boolean                             | BoundaryCondition[2,2]  | "Boundary conditions. Choose options for the boundaries in a matrix table, i.e., if the matrix element = true, this element is used as boundary. The element represent the following quantities: [inlet depth, inlet flow; outlet depth, outlet flow]" |
| OpenChannel      | $V_{in}$                              | -   | SI.VolumeFlowRate                   | V_in                    | "inlet flow"                                                                                                                                                                                                                                           |
| OpenChannel      | $V_{out}$                             | -   | SI.VolumeFlowRate                   | V_out                   | "outlet flow"                                                                                                                                                                                                                                          |
| OpenChannel      | $h[N]$                                | -   | SI.Height                           | h[N]                    | "Water depth in each unit of the channel"                                                                                                                                                                                                              |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| KPOpenChannel    | $N$                                   | par | Integer                             | N                       |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $w$                                   | par | SI.Length                           | w                       | "Channel width"                                                                                                                                                                                                                                        |
| KPOpenChannel    | $L$                                   | par | SI.Length                           | L                       | "Channel length"                                                                                                                                                                                                                                       |
| KPOpenChannel    | $H$                                   | par | SI.Height                           | H[2]                    | "Channel height, left and right side"                                                                                                                                                                                                                  |
| KPOpenChannel    | $b$                                   | par | SI.Height                           | b[N + 1]                | "Riverbed"                                                                                                                                                                                                                                             |
| KPOpenChannel    | $h_0$                                 | par | SI.Height                           | h0[N]                   | "Initial depth"                                                                                                                                                                                                                                        |
| KPOpenChannel    | $\dot{V}_0$                           | par | SI.VolumeFlowRate                   | Vdot_0                  | "Initial flow rate";                                                                                                                                                                                                                                   |
| KPOpenChannel    | $f_n$                                 | par | Real                                | f_n                     | "Manning's roughness coefficient [s/m^1/3]";                                                                                                                                                                                                           |
| KPOpenChannel    | $$                                    | par | Boolean                             | boundaryCondition[2, 2] | "Boundary conditions considering [z_left, q_left; z_right, q_right]", SteadyState = false "If true - starts from Steady State";                                                                                                                        |
| KPOpenChannel    | $\Delta x$                            | -   | SI.Length                           | dx                      |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $\dot{V}[N]$                          | -   | SI.VolumeFlowRate                   | Vdot[N];                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Height                           | z[N]                    |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Height                           | B[N]                    |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Height                           | z_[N, 4]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Height                           | h_[N, 4]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Height                           | h[N]                    |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | SI.Velocity                         | u_[N, 4]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $q_0$                                 | -   | Real                                | q0                      |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $q[N]$                                | -   | Real                                | q[N]                    |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $q\_[N,4]$                            | -   | Real                                | q_[N, 4]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $q_t$                                 | -   | Real                                | q_t;                    |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $S\_$                                 | -   | Real                                | S_[2 * N]               |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $\theta$                              | -   | Real                                | theta                   |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $F\_$                                 | -   | Real                                | F_[2 * N, 4]            |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $\lambda_+$                           | -   | Real                                | lam1[N, 4]              |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $\lampda_-$                           | -   | Real                                | lam2[N, 4]              |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $F_f$                                 | -   | Real                                | F_f[N];                 |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | Real                                | U[2 * N]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | Real                                | U_[8, N]                |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | Real                                | U_mp[N]                 |                                                                                                                                                                                                                                                        |
| KPOpenChannel    | $$                                    | -   | Real                                | U_pm[N]                 |                                                                                                                                                                                                                                                        |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ReservoirChannel | $N$                                   | par | Integer                             | N                       | "Number of segments";                                                                                                                                                                                                                                  |
| ReservoirChannel | $w$                                   | par | SI.Length                           | w                       | "Reservoir width";                                                                                                                                                                                                                                     |
| ReservoirChannel | $L$                                   | par | SI.Length                           | L                       | "Reservoir length";                                                                                                                                                                                                                                    |
| ReservoirChannel | $H[2]$                                | par | SI.Height                           | H[2]                    | "Reservoir bed height from left and right side";                                                                                                                                                                                                       |
| ReservoirChannel | $h_0$                                 | par | SI.Height                           | h0                      | "Initial depth of the reservoir";                                                                                                                                                                                                                      |
| ReservoirChannel |                                       | par | Boolean                             | SteadyState             | "if true - starts from Steady State";                                                                                                                                                                                                                  |
| ReservoirChannel | $q$                                   | -   | Real                                | q                       | "flow rate"                                                                                                                                                                                                                                            |
|------------------+---------------------------------------+-----+-------------------------------------+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
