Page 54 - DCAP601_SIMULATION_AND_MODELING
P. 54
Simulation and Modelling
Notes (2) Add the input volume VIN to the volume left over in the reservoir at the end of the last
month, VOL (m – 1). This gives us the gross volume, GROSSV = VIN + VOL(m – 1).
(3) On the basis of the last month's volume VOL (m – 1) calculate this month's seepage and
evaporation losses and add them as total loss TLOSS = SEEP + EVAP.
(4) From the demand curve (stored as a table in the computer memory) determine the demand
of water for the current month DEM.
(5) If the TLOSS GROSSY, then the reservoir runs dry without supplying any water and
therefore shortage, SHORT = DEM. The volume of water left at the end of the current
month VOL (m) = 0. Spillage SPILL = 0 and go co Step 8; else if TLOSS < GROSSY then the
net water volume available to satisfy the demand is YNET = GROSSV – TLOSS.
(6) If DEM VNET the reservoir runs dry and the shortage is given by SHORT = DEM – VNET,
and SPILL = 0. Go to Step 8; else if DEM < VNET, then the difference DIFF = VNET – DEM
is the water left over.
(7) If this leftover water exceeds the capacity CAP of the reservoir there will be a spill over,
i.e., if DIFF > CAP then SPILL = DIFF – CAP and VOL (m) = CAP; else if DIFF CAP then
SPILL = 0 and VOL (m) = DIFF.
(8) Print out SPILL and SHORT for this month, and move to the next month. If the period
exceeds the intended simulation length stop, else go to Step I.
The following format-free FORTRAN program implements these steps:
READ, N, VOL, CAP
1Y = 1
M = l
DO 30 IY = 1, N
DO 30 M =1, 12
SPILL = 0
SHORT = 0.
CALL RIVFLO (IY,M,RFLOW)
CALL RA1NF (IY,M,RAIN)
VIN = RFLOW + RAIN
GROSSY = VOL + VIN
CALL SEPEJ (VOL,SEEP)
CALL EVPRSN (M,YOL, EVAP)
TLOSS = SEEP + EVAP
CALL DEMAND (IY,M,DEM)
VNET = GROSSV – TLOSS
IF (VNET .LE. O.) VNET = 0.
DlFF = VNET - DEM
IF (DIFF .GE. O.) GO TO 10
SHORT = –DIFF
VOL = 0.
GO TO 20
10 VOL = DIFF
IF (CAP .GT. DlFF) GO TO 20
SPILL – DIFF – CAP
VOL = CAP
48 LOVELY PROFESSIONAL UNIVERSITY