PACKAGE NAME: Irrigation Flow
PLATFORM: MATLAB
AUTHOR: Andrew Bell
VERSION HISTORY: 1.0
A set of objects and routines to describe an irrigation system as a set of nodes, links, and farms; and solve water flow and withdrawal through the system. Water flow is solved by specifying water demand at nodes and withdrawing it, with residual water allocated proportionally to all other outflow links based on their specified design flow. Thus, this simple model does not rely on physical solution (i.e., the St. Venant equations) to calculate flow rate or depth.
- An irrigation system, described in terms of channel links and nodes
- A volume of water appropriate to the time period
Water receipt at each node for the time period
- runModel.m: An outer script to set up the model space and call the main time loop
- setUpIrrigationSystem.m: A sample specification of an irrigation system (two watercourses off of a larger distributary) for testing purposes
- main.m: The main time loop within which solveWater.m is called
- visualizeSystem.m: A routine for visualizing the system state
- ChannelNode.m: An object class for the nodes in the system
- ChannelLink.m: An object class for the links between nodes in the system
- Farm.m: An object class for the farms withdrawing water from nodes in the system
- nodeDistance.m: A utility to calculate distance between points
- plotCircle.m: A utility called by visualizeSystem.m to plot circles
To test this package, copy all files to a folder and run runModel.m
Vary the level of input water supply, as well as the water demand of the farms, and observe that when supply is much greater than demand, all farms receive adequate water (appear as blue in the visualization) but as water supply decreases many downstream farms are water deficient (appear as black in the visualization).