# Caddies Framework

As part of the CADDIES Framework, a two-dimensional cellular automata based model, called** Weighted Cellular Automata 2D (WCA2D)**, and its respective application, called **caflood**, has been developed. The aim of this model and application is to achieve fast flood modelling for large-scale problems using modern hardware with parallel capabilties.

The WCA2D model adopts simple transition rules rather than the complex Shallow Water Equations to simulate overland flow. Furthermore, the complexity of these transition rules are further streamlined by a weight-based system that reduces the computating cost of using physically based equations and complex mathematical operations. The WCA2D is a diffusive-like model that ignores the inertia terms and conservation of momentum and it improves the methodology used in the previous CADDIES CA2D model (Ghimire et al., 2013).

The WCA2D model has been designed to work with various general grids, (e.g., rectangular, hexagonal or triangular grid) with different neighbourhood types (e.g., the five cells of the von-Neumann (VN) neighbourhood or the nine cells of the Moore neighbourhood). The major features of this new model are:

- The ratios of water transferred from the central cell to the downstream neighbour cells (intercellular-volume) are calculated using a minimalistic and quick weight-based system.
- The volume of water transferred between the central cell and the neighbour cells is limited by a single equation, which comprises a simplified Manning’s formula and the critical flow condition.
- The model can be implemented easily in parallel computing environments due to features of the cellular automata technique.

### Reference

More information about the WCA2D model and its predecessor, CA2D, is available in the following references:

- Guidolin, M., Chen, A. S., Ghimire, B., Keedwell, E. C., Djordjević, S., & Savić, D. A. (2016). A weighted cellular automata 2D inundation model for rapid flood analysis. Environmental Modelling & Software, 84, 378-394.
- Ghimire, B., Chen, A.S., Guidolin, M., Keedwell, E.C., Djordjević, S., Savić, D.A., (2013). Formulation of a fast 2D urban pluvial flood model using a cellular automata approach. J. Hydroinformatics 15, 676.

##

The CADDIES **caflood** application implements the WCA2D model using the CADDIES Application Programming Interface (API). This application is open-source and uses an MIT license. The WCA2D model has been designed to work on grids with different cells and neighbourhood types. However, in the **caflood** application, the model has been implemented using only a square cell grid with a von-Neumann neighbourhood. Furthermore, thanks to the CADDIES API, the WCA2D model can be executed in a multi-core CPU and on a graphics card GPU using the OpenCL library.

### Features

- Can run on multi-core CPU and on graphics card GPU
- Can be easily controlled by simple CSV set-up files.
- Uses an adaptive time step.
- Can simulate three types of events (rainfall, inflow and water level rise/fall) in all of the domain or in a specific area of the domain.
- Uses a single roughness value for all of the domain.
- Can be compiled to use single precision or double precision floating point values.
- Takes only ASCII/GRID DTM/DEM files with a projected coordinate system as its input.
- Can produce ASCII/GRID raster files of the water depths/levels and velocities at specific time steps and for the maximum values.
- Can produce CSV files with the time plot of the water depths/levels and velocities at specific points in the domain.

### Downloads

The latest version of CADDIES including user manual and a Powerpoint presentation can be downloaded from the CADDIES downloads section.

### Commercial Application

There is an advanced version of the caflood application, called **cafloodpro**, which can be licensed for commercial use and has the following extra features:

- Even faster execution and improved run-times.
- Improved accuracy.
- Can perform simulations directly, using a geographic coordinate system or a projected coordinate system.
- Can simulate spatial varying rainfall events, i.e. each cell has its own hyetograph.
- Can use spatial varying roughness values, i.e. each cell has its own roughness value.
- Can simulate spatial varying infiltration, i.e. each cell has its own infiltration rate.

#### Applications

The binary resources available are:

- CADDIES-bin-caflood-simple-win64-double-120 - The
**caflood**application that does not use any parallel computation, and runs on a Windows 64bit OS and uses double precision floating point values. - CADDIES-bin-caflood-openmp-win64-double-120
**caflood**application that use OpenMP to perform parallel computation on mulit-core CPU's, and runs on Windows 64bit OS and uses double precision floating point values. - CADDIES-bin-caflood-opencl-win64-double-120 - The
**caflood**application that use OpenCL to perform parallel computation on GPUs or multi-core CPUs, and runs on a Windows 64bit OS and uses double precision floating point values.

If required, it is possible to have different versions of the various applications by contacting Prof Albert Chen. The alternative options are: run on Linux OS and/or that runs on graphics card GPU using OpenCL, and/or that uses single precision floating point values.

### Documents and Data

The documents and data resources available are:

- CADDIES-manual-caflood-110 - A user manual providing details about how to install and use the caflood application.
- CADDIES Build instructions.docx- A user guide on how to compile the source code of the CADDIES framework and applications.
- CADDIES-examples-caflood-110 - Examples of various simulations (input data and configurations files) that can be executed using the caflood application.

### Source Code

The source code resources are available from either download below, or from Exeter CADDIES Git respositroy:

Current version is 120, updated July 2020.

- CADDIES base 120 - The base directory structure, common and cmake files.
- caFlood version 120 - The source code of the caflood application.
- CADDIES-CAAPI-impl-S1LVNSG-110 - The source code of the simple implementation of the CAAPI (no parallel capabilties) that uses a single level - von Neumann neighbourhood - square grid.
- CADDIES-CAAPI-impl-OMP1LVNSG-120 - The source code of the parallel CPU (using OpenMP) implementation of the CAAPI that uses a single level - von Neumann neighbourhood - square grid.
- CADDIES-CAAPI-impl-OCL1LVNSG-110 - The source code of the OpenCL implementation of the CAAPI (Multi-core CPUs and GPUs) that uses a single level - von Neumann neighbourhood - square grid.

The source code of the **caflood** application and the **CAAPI** is available under the GNU General Public License.