# Miscellaneous Questions

This part of the FAQ is for questions that have no obvious place elsewhere. This is also a good place to start a question that you would like answered.

## How do I get a question answered?

The best way is to start a new question on this page. Just cut-and-paste this question/answer to somewhere below here and leave the answer part blank. Or perhaps you can discuss the question in more detail.

## Why does ANUGA get so slow when meshes are refined

Two reasons:

• With smaller triangles timesteps tend to become smaller due to the CFL condition
• The computation time per timestep grows more than linearly with the number of triangles. Here is why
```Let h be the grid size. The number of cells (triangles) N will normally be proportional to h^{-2}
The size of the timesteps will be proportional to the grid size, and so the number of timesteps is proportional to h^{-1} = N^{1/2}
So the computational cost (solution time) will be proportional to
(number of cells) x (no of timesteps) = N x N^{1/2} = N^{3/2}
log (Time) = 3/2 log( N).
```

So increasing the grid size from 100 cells to 1000 cells grows the computational time by 10{3/2} (about 30).

## Can ANUGA run in parallel on multiple computers

Yes - there is a module using MPI (via pypar) to allow ANUGA to run in Parallel. This is not part of the standard distribution on sourceforge but can be obtained directly from the ANUGA repository ( https://datamining.anu.edu.au/svn/ga/anuga_core/source/anuga_parallel)

Nils Goseberg has kindly put together some instructions which are available at  https://datamining.anu.edu.au/anuga/attachment/wiki/MiscellaneousQuestions/Installation%20of%20ANUGA%20parallel.doc

## How do I run a model from the 'Tsunami Inundation Models' DVD?

This is how a user should run a model from the 'Tsunami Inundation Models' DVDs. We assume that you are using Windows and will give examples for that operating system. The translation to Linux is left as an exercise for the student!

First, it is assumed that you have installed the ANUGA software according to the Installation Guide.

Next, you must copy the entire contents of the DVD to a place in your filesystem. Let's assume that you want to put the data into C:\ANUGA. You would do this in a Command Prompt window:

```C:
cd \
mkdir ANUGA
xcopy /e X:\ ANUGA
```

Of course, you could just drag all files on the DVD (X:\ is the assumed drive letter) to the desired target directory with Explorer.

Now you must create an environment variable ANUGADATA that points to the directory you just created:

```set ANUGADATA=C:\ANUGA
```

Doing the above in a Command Prompt window is temporary - if you open another window you will not have the ANUGADATA environment variable defined. To make the variable permanent you must set it in the Start|Settings|Control Panel|System tool (Advanced tab). See the Installation Guide if you don't know how to do this.

At this point you should run the build_elevation.py script to convert the raw elevation data to a set of 'combined_elevation' files ready to be used by the ANUGA system. It is possible that you have not been given the elevation data on the DVD as it is too large. In that case you cannot run the build_elevation.py script and you should skip to the next step.

```cd C:\ANUGA
cd project
python build_elevation.py
```

When you get to the point of running the model with your own data, you must run build_elevation.py to recreate the combined elevation files every time you change the elevation data.

Next, you prepare and execute the model:

```python setup_model.py
python run_model.py
```

This should all run to completion, though it may take several days, depending on the hardware used.

If you do get an error from setup_model.py or run_model.py look for some explanation in the log files, which you should find somewhere under C:\ANUGA\data. Just keep drilling down from that point until you find a directory called outputs. The latest directory in outputs should contain a file called screen_error.txt with an explanation of the error at the end.

Once the simulation has completed you may view the results using the ANUGA viewer as described in the Installation Guide and User Manual, run the script export_results.py to generate rasters suitable for GIS mapping, or write dedicated python scripts extracting timeseries at selected locations.

The ANUGA User Manual describes hot to use the ANUGA system in general and provides some examples of its use.