Canals or rivers are a central infrastructure in all populated areas. They ensure an adequate supply of water for agriculture and are a key component of electricity production or transportation. An optimal management and the control of such resources can be a critical issue for long term planning or to react to natural hazards. In a recent collaboration with ESISAR (Ecole nationale supérieure des systèmes avancés et réseaux) at Grenoble INP, France, UNIGE has developed multiscale models for management of a network of irrigation canals. The problem to be solved is to define appropriate actions (e.g. opening and closing gates) that need to be taken to always guarantee an adequate water supply throughout the canal system, whatever the external demands or perturbations can be, and respecting constraints such as water height.
Our simulation example is a model of the canal de la Bourne irrigation network (see Fig. 1). This network was built in the late 19th century to irrigate the plains around Valence in France. It is still in use now and its fine modeling and control has become a new challenge. Indeed, the demand on water considerably increased these last few decades as the constraints on the quantity of water which may be withdrawn from the up-stream natural river La Bourne became more and more limiting.
Figure 1: The Bourne irrigation canal.
The overall network comprises a principal canal (45 km), 4 secondary canals (85 km) and 27 tertiary canals (400 km). As an illustration, a sketch of the main part of the principal canal is presented in Fig. 2 including a connection to a secondary canal S3. The main reach (from x = 0 to x = x6) is about 30 km long. It consists of:
- An up-stream reservoir at Ecancière which supplies the canal through two gates and has a constant water level.
- A pumping station at Martinet which pumps water from Isère river to the canal or can produce electricity during the Autumn and Winter seasons.
- A gate at Mondy which consists of two submerged gates and a spillway.
- A gate at Orme with the same structure as the one in Mondy.
- A Secondary canal, termed S3, which takes water from the canal through a submerged gate.
- A spillway, just after S3, which aims at maintaining the water supply for S3.
- Two reservoirs at Lafarge and Freydier which receive the water from the canal through spillways.
Figure 2: Structure of the Bourne irrigation system.
Our objectives are mainly:
- To develop a complete mutiscale model for the entire irrigation canal network "La Bourne".
- To apply several real constrains on the irrigation network in order to elaborate a control and optimization strategy. To do so, first we should identify an history of the main unusual events or perturbations to which La bourne was exposed. Then, the implemented model will be run for several scenarios on which the flow rates of the gates could be modified in order to find the optimal configuration. Finally, the irrigation network will be modeled as a Multi-Agent Systems (MAS) in order to establish a real-time-control and optimize the water exploitation. This final part will be done within the collaboration framework with ESISAR (Ecole nationale Supérieure des Systèmes Avancés et Réseaux).
The global complex model is decomposed in sub-models connected to each other via conduits or mappers. These coupling elements determine the relations between sub-models and the parameters/events exchanged.
A sub-model can be considered like a building block task which eventually describes an entire physical process. It solves an autonomous problem which can be extracted from the global model to represent a given system in a different context. A given sub-model can be run on sequential or parallel machines.
For example, in our application (irrigation canals), four main sub-models have been identified where each sub-model can be instantiated several times inside the global model. The CxA formalism  based on the lattice boltzmann (LB) approach  is used for the implementation of these submodels.
Shallow Water 1D (SW1D)
The one-dimensional shallow water equation can be used to describe long canal sections. In  a model has already been developed based on the D1Q3 lattice Boltzmann (LB) shallow water equation, analyzed in detail and compared with other numerical schemes. Remarkably, it has been shown how such D1Q3 LB models for canal reaches may be easily coupled with various hydraulic interconnection structures to build models of complex irrigation networks.
Figure 3: Shallow Water 1D.
Shallow Water 2D (SW2D)
It describes branching regions or pools in which the water height varies from the left to the right side. 2D LB-SW models have been considered in several papers [4, 5, 6]. The coulping SW1D-SW2D has been considered in .
Figure 4: Shallow Water 2D.
Free surface 3D
A full 3D, free-surface model is required to describe in detail the flow around gates or to describe the transport of sediments that can deposit along the canal. This 3D single scale model requires supercomputing capabilities. Several releveant bi-fluid lattice Boltzmann (LB) models [8, 9, 10] has been developped. Recently, Marcou et al. have adapted these approaches to implemet a (LB) model which describes the flow near a gate, with or without sediment transport and erosion , fully resolving all the components of the velocity flow.
To manage a full system of irrigation canals one needs to couple descriptions at all these three scales and then investigate response scenarios to given perturbations. In [12, 13], animations of open water phenomena have been performed based on the (LB) model and particularly with coupled 2D shallow water and 3D free surface simulations.
All these sub-models can be coupled according to the methodology produced in COAST, in order to provide a flexible and powerful multiscale, multiphysics simulation of a system of irrigation canals. Fast simulations are indispensable to develop control and management strategies. This requires analysis of many scenarios of perturbations and the identification of the appropriate action. The 3D free-surface flow model coupled with sediment transport requires supercomputing resources, whereas the 1D shallow water model can run on a standard computer. The coupling of all these components needs a distributed multiscale computing environment.
Figure 5: Free surface 3D.
Sedimentation strongly influences the water flow, i.e. reduces the efficiency of the irrigation network. Sediment can be defined as a fragmented material from rocks that has been formed by different physical and/or chemical process and may be transported in three ways: bedload, saltation and suspension. In  a complete description of shallow water models including sediment transport is presented. Moreover, sedimentation phenomenon has been widely investigated using the LB approach [15, 16, 17, 18].
Figure 6: Sediment transport.
Unlike conduits which only include one input and one output, mappers contains several inputs and one or several outputs where the incoming data from each input are needed to construct the specifications in output. Basically, mappers include mathematical functions to treat the data flow before distributing it to the connected sub-models. In our application, mappers represent either hydraulic works (submerged gates, pumping stations, spillways, branching junctions… which are not simulated explicitly) or coupling functions which collects at the inputs the required data from several sub-models, transform the information and transmit it via outputs to one or several sub-models.
 Alfons Hoekstra, Jean-Luc Falcone, Alfonso Caiazzo, and Bastien Chopard. Multi-scale modeling with cellular automata: The complex automata approach. In Hiroshi Umeo, Shin Morishita, Katsuhiro Nishinari, Toshihiko Komatsuzaki, and Stefania Bandini, editors, Cellular Automata, volume 5191 of Lecture Notes in Computer Science, pages 192-199. Springer Berlin / Heidelberg, 2008.
 Shiyi Chen and Gary D. Doolen. Lattice boltzmann method for uid ows. Annual Review of Fluid Mechanics, 30(1):329-364, 1998.
 Pham van Thang, Bastien Chopard, Laurent Lefvre, Diemer Anda Ondo, and Eduardo Mendes. Study of the 1d lattice boltzmann shallow water equation and its coupling to build a canal network. Journal of Computational Physics, 229(19):7373-7400, 2010.
 Salmon R. The lattice boltzmann method as a basis for ocean circulation modeling. Journal of Marine Research, 57:503-535(33), 1 May 1999.
 Paul J. Dellar. Nonhydrodynamic modes and a priori construction of shallow water lattice boltzmann equations. Phys. Rev. E, 65(3):036309, Feb 2002.
 J.G. Zhou. Lattice Boltzmann Methods for Shallow Water Flows. Springer, 2004.
 Pham van Thang. Modlisation et commande des systmes non-linaire paramtres distribus par la mthode de boltzmann sur rseau: application aux canaux d'irrigation. Master's thesis, Grenoble INP ESISAR, France,2009.
 Xiaowen Shan and Hudong Chen. Lattice boltzmann model for simulating ows with multiple phases and components. Phys. Rev. E, 47(3):1815-1819, Mar 1993.
 Xiaowen Shan and Hudong Chen. Simulation of nonideal gases and liquid-gas phase transitions by the lattice boltzmann equation. Phys. Rev. E, 49(4):2941-2948, Apr 1994.
 Nicos S. Martys and Hudong Chen. Simulation of multicomponent uids in complex three-dimensional geometries by the lattice Boltzmann method. Phys. Rev. E, 53(1):743-750, Jan 1996.
 Olivier Marcou, Samira El Yacoubi, and Bastien Chopard. A bi-fluid lattice boltzmann model for water ow in an irrigation channel. In Samira El Yacoubi, Bastien Chopard, and Stefania Bandini, editors, Cellular Automata, volume 4173 of Lecture Notes in Computer Science, pages 373-382. Springer Berlin / Heidelberg, 2006.
 Nils Thürey. Physically based Animation of Free Surface Flows with the Lattice Boltzmann Method. PhD thesis, University of Erlangen- Nuremberg, Germany, 2007.
 Nils Thürey, Ulrich Ruede, and Marc Stamminger. Animation of open water phenomena with coupled shallow water and free surface simulations. In Proceedings of the 2006 ACM SIGGRAPH/Eurographics symposium on Computer animation, SCA '06, pages 157-164, Aire-la-Ville, Switzerland, Switzerland, 2006. Eurographics Association.
 W.H. Graf. Hydraulique uviale. Presses polytechniques et universitaire romandes, 1993.
 Bastien Chopard, Alexandre Masselot, and Alexandre Dupuis. A lattice gas model for erosion and particles transport in a uid. Computer Physics Communications, 129(1-3):167-176, 2000.
 A. Dupuis. From a Lattice Boltzmann model to a parallel and reusable implementation of a virtual river. PhD thesis, University of Geneva, Switzerland, 2002.
 Alexandre Dupuis and Bastien Chopard. Lattice gas modeling of scour formation under submarine pipelines. J. Comput. Phys., 178:161-174, May 2002.
 A. Masselot and B. Chopard. A lattice boltzmann model for particle transport and deposition. EPL (Europhysics Letters), 42(3):259, 1998.