modelOpenChannel

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This is an example of using the KP function to solve the hyperbolic PDE (here, model for openchannel 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

TypeNameDefaultDescription
IntegerN100
SI.Lengthw194Channel width
SI.LengthL5000Channel length
SI.Height[2]H{16.7, 0}Channel height, left and right side
SI.Height[N + 1]blinspace(H[1], H[2], N + 1)Riverbed
SI.Height[N]h0vector([ones(5)*0.4; linspace(H[1] - 0.4 - 0.5*(b[6] + b[7]), H[1] - 0.4 - 0.5*(b[N] + b[N + 1]), N - 5)])Initial depth
SI.VolumeFlowRateVdot_0120Initial flow rate
Realf_n0.04Manning's roughness coefficient [s/m^1/3]
Boolean[2,2]boundaryCondition[false, true; false, true]Boundary conditions consideration [z_left, q_left; z_right, q_right]
BooleanSteadyStatefalseIf true - starts from Steady State

Components

TypeNameDefaultDescription
OpenHPL.Datadata
Real[2,2]boundaryValues[h0[1] + b[1], Vdot_0/w; h0[N] + b[N + 1], Vdot_0/w]Values for the boundary conditions [z_left, q_left; z_right, q_right]
SI.LengthdxL/N
SI.VolumeFlowRate[N]Vdot
SI.Height[N]z
SI.Height[N]B
SI.Height[N,4]z_
SI.Height[N,4]h_
SI.Height[N]h
SI.Velocity[N,4]u_
Realq0Vdot_0/w
Real[N]q
Real[N,4]q_
Realq_t
Real[2*N]S_
Realtheta1.3
Real[2*N,4]F_
Real[N,4]lam1
Real[N,4]lam2
Real[N]F_f
Real[2*N]U
Real[8,N]U_
Real[N]U_mp
Real[N]U_pm
Functions.KP07.KPmethodKP