source: trunk/anuga_core/documentation/user_manual/demos/cairns/project.py @ 7807

Last change on this file since 7807 was 7807, checked in by hudson, 13 years ago

Cairns demo works with new API.

File size: 3.1 KB
Line 
1""" Common filenames and locations for topographic data, meshes and outputs.
2    This file defines the parameters of the scenario you wish to run.
3"""
4
5from anuga.geometry.polygon import read_polygon, plot_polygons, \
6                                    polygon_area, is_inside_polygon
7
8#------------------------------------------------------------------------------
9# Define scenario as either slide or fixed_wave. Choose one.
10#------------------------------------------------------------------------------
11#scenario = 'fixed_wave' # Huge wave applied at the boundary
12scenario = 'slide'       # Slide wave form applied inside the domain
13
14#------------------------------------------------------------------------------
15# Filenames
16#------------------------------------------------------------------------------
17demname = 'cairns'
18meshname = demname + '.msh'
19
20# Filename for locations where timeseries are to be produced
21gauge_filename = 'gauges.csv'
22
23#------------------------------------------------------------------------------
24# Domain definitions
25#------------------------------------------------------------------------------
26# bounding polygon for study area
27bounding_polygon = read_polygon('extent.csv')
28
29A = polygon_area(bounding_polygon) / 1000000.0
30print 'Area of bounding polygon = %.2f km^2' % A
31
32#------------------------------------------------------------------------------
33# Interior region definitions
34#------------------------------------------------------------------------------
35# Read interior polygons
36poly_cairns = read_polygon('cairns.csv')
37poly_island0 = read_polygon('islands.csv')
38poly_island1 = read_polygon('islands1.csv')
39poly_island2 = read_polygon('islands2.csv')
40poly_island3 = read_polygon('islands3.csv')
41poly_shallow = read_polygon('shallow.csv')
42
43# Optionally plot points making up these polygons
44#plot_polygons([bounding_polygon, poly_cairns, poly_island0, poly_island1,
45#               poly_island2, poly_island3, poly_shallow],
46#               style='boundingpoly', verbose=False)
47
48# Define resolutions (max area per triangle) for each polygon
49# Make these numbers larger to reduce the number of triangles in the model,
50# and hence speed up the simulation
51default_res = 10000000    # Background resolution
52islands_res = 100000
53cairns_res = 100000
54shallow_res = 500000
55
56# Define list of interior regions with associated resolutions
57interior_regions = [[poly_cairns,  cairns_res],
58                    [poly_island0, islands_res],
59                    [poly_island1, islands_res],
60                    [poly_island2, islands_res],
61                    [poly_island3, islands_res],
62                    [poly_shallow, shallow_res]]
63
64#------------------------------------------------------------------------------
65# Data for exporting ascii grid
66#------------------------------------------------------------------------------
67eastingmin = 363000
68eastingmax = 418000
69northingmin = 8026600
70northingmax = 8145700
71
72#------------------------------------------------------------------------------
73# Data for landslide
74#------------------------------------------------------------------------------
75slide_origin = [451871, 8128376]   # Assume to be on continental shelf
76slide_depth = 500.
Note: See TracBrowser for help on using the repository browser.