Changeset 5604 for anuga_work/development/convergence_okushiri_2008
- Timestamp:
- Aug 5, 2008, 9:50:22 AM (17 years ago)
- Location:
- anuga_work/development/convergence_okushiri_2008
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/convergence_okushiri_2008/project_truescale.py
r5411 r5604 43 43 run_time = time+'_run' 44 44 45 # Set anuga input directory names 46 47 anuga_dir = join(home,'anuga')+sep 48 49 mesh_dir = join(anuga_dir, 'meshes')+sep 50 mesh_name = join(mesh_dir, 'okushiri_truescale') 51 52 polygons_dir = join(anuga_dir, 'polygons')+sep # Created with ArcGIS (csv files) 53 54 #------------------------ 45 55 # Run parameters 56 #------------------------ 57 46 58 finaltime=450 47 setup='original' 48 59 setup='sixteen' 60 polygons = 'contour_polygons' 61 62 if setup =='no polygons': 63 print 'no interior polygons' 64 base_resolution=1 65 yieldstep=1 66 if setup =='octuple': 67 print '8 times original resolution' 68 base_resolution=0.125 69 yieldstep=1 70 if setup =='sixteen': 71 print '16 times original resolution' 72 base_resolution=0.0625 73 yieldstep=1 74 if setup =='quadruple': 75 print '4 times original resolution' 76 base_resolution=0.25 77 yieldstep=1 78 if setup =='double': 79 print 'double original resolution' 80 base_resolution=0.5 81 yieldstep=1 82 if setup =='1.5': 83 print '1.5 times original resolution' 84 base_resolution=0.66 85 yieldstep=1 49 86 if setup =='original': 50 87 print 'original resolution' 51 88 base_resolution=1 52 89 yieldstep=1 53 if setup ==' double':54 print ' doubleoriginal resolution'55 base_resolution= 0.590 if setup =='0.75': 91 print '0.75 times original resolution' 92 base_resolution=1.33 56 93 yieldstep=1 57 94 if setup =='half': … … 59 96 base_resolution=2 60 97 yieldstep=1 61 if setup =='no polygons': 62 print 'half original resolution' 63 base_resolution=2 98 if setup =='quarter': 99 print '1/4 original resolution' 100 base_resolution=4 101 yieldstep=1 102 if setup =='eighth': 103 print '1/8 original resolution' 104 base_resolution=8 105 yieldstep=1 106 if setup =='sixteenth': 107 print '1/16 original resolution' 108 base_resolution=16 109 yieldstep = 1 110 if setup =='1-32': 111 print '1/32 original resolution' 112 base_resolution=32 113 yieldstep=1 114 if setup =='1-64': 115 print '1/64 original resolution' 116 base_resolution=64 64 117 yieldstep=1 65 118 119 120 #------------------------------ 121 # Polygon definitions 122 #------------------------------ 66 123 67 # Set anuga directories 68 anuga_dir = join(home,'anuga')+sep 69 70 dir_comment='_'+setup+'_'+str(user) 71 72 mesh_dir = join(anuga_dir, 'meshes')+sep 73 mesh_name = join(mesh_dir, 'okushiri_truescale') 74 75 polygons_dir = join(anuga_dir, 'polygons')+sep # Created with ArcGIS (csv files) 76 77 # Output locations 124 poly_all = read_polygon(polygons_dir+'bounding_polygon.csv') 125 res_poly_all = 16000*base_resolution 126 127 # Original polygon definitions 128 129 poly_gulleys = read_polygon(polygons_dir+'gulleys_polygon.csv') 130 res_gulleys = 3.2*base_resolution 131 132 poly_island = read_polygon(polygons_dir+'island_polygon.csv') 133 res_island = 32*base_resolution 134 135 poly_rhs = read_polygon(polygons_dir+'rhs_polygon.csv') 136 res_rhs = 80*base_resolution 137 138 139 # Contour-based polygon definitions 140 141 poly_25 = read_polygon(polygons_dir+'polygon_25m.csv') 142 res_poly_25 = 800*base_resolution 143 144 poly_10 = read_polygon(polygons_dir+'polygon_10m.csv') 145 res_poly_10 = 80*base_resolution 146 147 poly_5 = read_polygon(polygons_dir+'polygon_5m.csv') 148 res_poly_5 = 32*base_resolution 149 150 poly_1 = read_polygon(polygons_dir+'polygon_1m.csv') 151 res_poly_1 = 10*base_resolution 152 153 154 if polygons =='original_polygons': 155 print 'original polygon definition' 156 interior_regions = [[poly_gulleys,res_gulleys],[poly_island,res_island], 157 [poly_rhs,res_rhs]] 158 159 if polygons =='contour_polygons': 160 print 'contour-based polygon definition' 161 interior_regions = [[poly_25,res_poly_25],[poly_10,res_poly_10], 162 [poly_5,res_poly_5],[poly_1,res_poly_1] ] 163 164 165 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 166 print 'min number triangles', trigs_min 167 168 this_area = polygon_area(poly_all) 169 print this_area 170 171 172 # Polygon QC 173 #polygon_plot='polygons.png' 174 #plot_polygons([poly_all, poly_25, poly_10, poly_5, poly_1], style=None, figname=polygon_plot) 175 176 177 #-------------------------------- 178 # Set anuga output locations 179 #-------------------------------- 180 181 # Directory comment 182 dir_comment='_'+setup+'_'+polygons+'_'+str(user) 183 78 184 output_dir = join(anuga_dir, 'outputs')+sep 79 185 output_run_time_dir = output_dir+run_time+dir_comment+sep … … 86 192 87 193 # Vertex coordinates 88 vertex_filename = output_run_time_dir+setup+'vertex_coordinates.txt' 89 90 #------------------------------ 91 # Polygon definitions 92 #------------------------------ 93 94 poly_all = read_polygon(polygons_dir+'bounding_polygon.csv') 95 res_poly_all = 16000*base_resolution 96 97 #print 'Area of bounding polygon', polygon_area(poly_all)/1000000.0 98 99 poly_gulleys = read_polygon(polygons_dir+'gulleys_polygon.csv') 100 res_gulleys = 3.2*base_resolution 101 102 poly_island = read_polygon(polygons_dir+'island_polygon.csv') 103 res_island = 32*base_resolution 104 105 poly_rhs = read_polygon(polygons_dir+'rhs_polygon.csv') 106 res_rhs = 80*base_resolution 107 108 interior_regions = [[poly_gulleys,res_gulleys],[poly_island,res_island], 109 [poly_rhs,res_rhs]] 110 111 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 112 113 print 'min number triangles', trigs_min 114 115 116 117 118 119 194 vertex_filename = output_run_time_dir+'vertex_coordinates.txt' 195 196 197 #-------------------------------- 198 # Area definitions for sww2dem 199 #-------------------------------- 200 201 xminDeep = 0 202 xmaxDeep = 1000 203 yminDeep = 0 204 ymaxDeep = 1360.8 205 206 xminMid = 1000 207 xmaxMid = 1700 208 yminMid = 0 209 ymaxMid = 1360.8 210 211 xminShallow = 1700 212 xmaxShallow = 2179.2 213 yminShallow = 0 214 ymaxShallow = 1360.8 215 216 217 218 219
Note: See TracChangeset
for help on using the changeset viewer.