RHMS (version 1.1)

reservoirRouting: reservoir routing

Description

base function for routing reservoir flood using classical Muskingum technique

Usage

reservoirRouting(inflow, ratingCurve, dischargeCurve,
                 initialStorage, capacity, 
                 simulation = c(interval = 3600 * 1, period = NA))

Arguments

inflow

a vector : a time series of direct inflow to be routed (cms)

ratingCurve

a data frame: a data frame at which its first collumn includes height (masl) and second collums presents volume corresponding to the height at first collumn (MCM)

dischargeCurve

a data frame: a data frame at which its first collumn includes height (masl) and second collums presents discharge rate corresponding to the height at first collumn (cms)

initialStorage

the initial storage of reservoir at the first time step of simulation (MCM)

capacity

the maximum volume of reservoir capacity (MCM)

simulation

a vectors: number of simulation time steps and the simulation period (seconds)

Value

a data.frame: including inflow time series and routing resaults

References

Chow, V. T., Maidment, D. R., & Mays, L. W. (1988). Applied hydrology.

Examples

Run this code
# NOT RUN {
inflow1<-sin(seq(0,pi,length.out=50))*1000
ratingCurve1<-data.frame(s=0:49*2,h=100:149)
dischargeCurve1<-data.frame(q=0:9*250,h=140:149)
reservoir_sim<-reservoirRouting(inflow=inflow1, ratingCurve=ratingCurve1,
                                dischargeCurve=dischargeCurve1, 
                                initialStorage=80, capacity=80, 
                                simulation = c(interval = 3600 * 1, period = 60))
plot(reservoir_sim[,2],typ="o",
     ylab="Discharge rate (cms)",
     xlab="Time step")
lines(reservoir_sim[,4])
# }

Run the code above in your browser using DataCamp Workspace