modelElasticPenstock
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
Here is example of using the KP function to solve hyperbolic PDE (here, model for penstock with compressible water and elastic walls is used).
All calculation of the variables that is used for defining eigenvalues, source term S and vector F are implemented inside this model.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | N | 20 | Number of segments |
| Geometry | |||
| SI.Height | H | 420 | Height over which water fall in the pipe |
| SI.Length | L | 600 | Length of the pipe |
| SI.Diameter | D | 3.3 | Diameter of the pipe |
| Initialization | |||
| SI.VolumeFlowRate | Vdot_0 | 20 | Initial flow rate in the pipe |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Area | A_atm | D^2*pi/4 | Pipe are at atm. p. |
| SI.Area[N] | A | Center pipe A | |
| SI.Area[N,4] | A_ | Bounds pipe A | |
| SI.Pressure[N] | p_p | Center pressure | |
| SI.Pressure | dp | data.rho*data.g*H/N | Initial p. step |
| SI.Pressure | p_1 | 8e5 | Input p. |
| SI.Pressure | p_2 | 48e5 | Output p. |
| SI.Pressure[N,4] | p_ | Bounds p. | |
| SI.Length | dx | L/N | Length step |
| SI.Length[N + 4] | B | zeros(N + 4) | Additional for open channel |
| SI.MassFlowRate[N] | mdot | Center mass flow | |
| SI.MassFlowRate[N,4] | mdot_ | Bounds mass flow | |
| SI.MassFlowRate | mdot_R | Vdot_0*data.rho | Input mdot |
| SI.MassFlowRate | mdot_V | Vdot_0*data.rho | Output mdot |
| Real[N] | F_ap | Centered A*rho | |
| Real[2*N] | S_ | Source term | |
| Real[2*N,4] | F_ | F matrix | |
| Real[N,4] | lam1 | Eigenvalue '+' | |
| Real[N,4] | lam2 | Eigenvalue '-' | |
| Real[N,4] | F_ap_ | Bounds A*rho | |
| SI.Density[N] | rho | Centered density | |
| SI.Density[N,4] | rho_ | Bounds density | |
| SI.Velocity[N,4] | v_ | Bounds velocity | |
| SI.Velocity[N] | v | Centered velocity | |
| SI.VolumeFlowRate[N] | Vdot | Centered volumetric flow | |
| Real | theta | 1.3 | Parameter for slope limiter |
| Real[8,N] | U_ | Bounds states | |
| Real[2*N] | U | Center states | |
| Real[N] | F_d | Friction | |
| Functions.KP07.KPmethod | kP | ||
| Data | data |