Skip to content

Simulation Defaults

Simulation constants are defined in run_anuga/defaults.py. These values are used when a scenario does not specify an explicit override. The file holds ten constants, and they are all listed below.

Constants reference

Structure parameters

Constant Value Description
BUILDING_BURN_HEIGHT_M 5.0 Height (metres) added to the DEM where building footprints are rasterised. Also the fallback raised height when a structure using the Raised method has no height of its own and the scenario sets no default.
BUILDING_MANNINGS_N 10.0 Manning's roughness applied to the footprints of structures using the Mannings method. A very high value that impedes flow without removing the area from the mesh.
DEFAULT_MANNINGS_N 0.04 Default Manning's roughness applied to all areas not covered by explicit friction polygons. Typical of light grass or bare soil.

Rainfall conversion

Constant Value Description
RAINFALL_FACTOR 2.7778e-7 Conversion factor from mm/hr rainfall intensity to m/s, which is what ANUGA works in. Applied as the factor parameter to Polygonal_rate_operator.

The constant is written in the source as 1.0 / (1000.0 * 3600.0) rather than as a literal, and that derivation is the thing to copy: 1 mm/hr is one thousandth of a metre per hour, and an hour is 3600 seconds, giving 2.7778e-7 m/s. If you are reproducing a Hydrata run outside the platform, use the division rather than a rounded decimal.

Domain evolution

Constant Value Description
MINIMUM_STORABLE_HEIGHT_M 0.005 Minimum water depth (metres) stored in SWW output files. Cells with less water than this are treated as dry in the output.
MIN_ALLOWED_HEIGHT_M 1.0 x 10^-5 Minimum water depth (metres) used for velocity extrapolation in post-processing. Prevents division by near-zero depth.
MAX_YIELDSTEPS 100 Maximum number of yield steps during domain evolution.
MIN_YIELDSTEP_S 60 Minimum yield step interval in seconds: output is written at most once a minute.
MAX_YIELDSTEP_S 1800 Maximum yield step interval in seconds: even for a long simulation, output is written at least every 30 minutes.

Post-processing

Constant Value Description
K_NEAREST_NEIGHBOURS 3 Number of nearest neighbours used when interpolating ANUGA mesh results onto regular GeoTIFF grids.

Constants that no longer exist

Earlier versions of this page documented two constants that have since been removed from run_anuga/defaults.py. They are listed here so that a reader working from an older copy of the docs, or from the package README, knows not to look for them:

  • A maximum triangle area for the mesher. No such constant is defined today. The value survives only in run_anuga's own README and in a comment, neither of which the code reads.
  • A default mesher executable path, with an environment-variable override. The adaptive mesher is gone: the string mesher does not appear in any Python file in run_anuga. Meshing is done through ANUGA's own create_mesh_from_regions.

See Mesh Regions for how local refinement works now.