Changeset 3275 for documentation
- Timestamp:
- Jul 4, 2006, 2:34:21 PM (19 years ago)
- Location:
- documentation/user_manual
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r3179 r3275 781 781 782 782 {\small \begin{verbatim} 783 interior_res = 5000% 784 interior_regions = [[project.harbour_polygon_2, interior_res], 785 [project.botanybay_polygon_2, interior_res]] 783 interior_res = 5000 784 interior_regions = [[project.northern_polygon, interior_res], 785 [project.harbour_polygon, interior_res], 786 [project.southern_polygon, interior_res], 787 [project.manly_polygon, interior_res], 788 [project.top_polygon, interior_res]] 786 789 \end{verbatim}} 787 790 788 791 are used to read in the specific polygons \code{project.harbour\_polygon\_2} and 789 792 \code{botanybay\_polygon\_2} from \file{project.py} and assign a 790 common resolution of 5000to each. The statement793 common resolution of to each. The statement 791 794 792 795 {\small \begin{verbatim} 793 create_mesh_from_regions(project.diffpolygonall, 794 boundary_tags= {'bottom': [0], 795 'right1': [1], 796 'right0': [2], 797 'right2': [3], 798 'top': [4], 799 'left1': [5], 800 'left2': [6], 801 'left3': [7]}, 796 create_mesh_from_regions(project.demopoly, 797 boundary_tags= {'oceannorth': [0], 798 'onshorenorth1': [1], 799 'onshorenorthwest1': [2], 800 'onshorenorthwest2': [3], 801 'onshorenorth2': [4], 802 'onshorewest': [5], 803 'onshoresouth': [6], 804 'oceansouth': [7], 805 'oceaneast': [8]}, 802 806 maximum_triangle_area=100000, 803 filename=meshname, 804 interior_regions=interior_regions) 807 filename=meshname, 808 interior_regions=interior_regions) 805 809 \end{verbatim}} 806 810 … … 932 936 933 937 {\small \begin{verbatim} 934 Br = Reflective_boundary(domain) 935 domain.set_boundary( {'bottom': Br, 'right1': Br, 'right0': Br, 936 'right2': Br, 'top': Br, 'left1': Br, 937 'left2': Br, 'left3': Br} ) 938 Bd = Dirichlet_boundary([0.0,0.0,0.0]) 939 domain.set_boundary( {'oceannorth': Bd, 940 'onshorenorth1': Bd, 941 'onshorenorthwest1': Bd, 942 'onshorenorthwest2': Bd, 943 'onshorenorth2': Bd, 944 'onshorewest': Bd, 945 'onshoresouth': Bd, 946 'oceansouth': Bd, 947 'oceaneast': Bd} ) 938 948 \end{verbatim}} 939 949 -
documentation/user_manual/examples/harbour.py
r3248 r3275 34 34 #------------------------------------------------------------------------------ 35 35 36 west = 10000.+harbour_length+shelf_length+bottom_length37 east = 0.36 east = 10000.+harbour_length+shelf_length+bottom_length 37 west = 0. 38 38 south = 0. 39 39 north = 5000. -
documentation/user_manual/examples/project.py
r3190 r3275 5 5 from os import sep, environ 6 6 from os.path import expanduser 7 from utilities.polygon import read_polygon8 7 import sys 9 10 from pmesh.create_mesh import convert_points_from_latlon_to_utm11 8 12 9 # We'll do this for the final thing … … 23 20 scenario_dir_name = 'sydney_tsunami_example_2006' 24 21 # revised 100m data 25 coarsename = 'bathyland100' # get from Neil/Ingo (DEM or topo data)22 coarsename = 'bathyland100' 26 23 # revised 25m data 27 finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan24 finename = 'bathy_dem25' 28 25 29 26 #Derive subdirectories and filenames … … 38 35 combineddemname = datadir + 'sydneytopo' 39 36 40 #Georeferencing41 from coordinate_transforms.redfearn import degminsec2decimal_degrees42 43 37 refzone = 56 44 38 print 'refzone', refzone 45 39 46 dsouth = degminsec2decimal_degrees(-34,05,0) 47 dnorth = degminsec2decimal_degrees(-33,33,0) 48 dnorth1 = degminsec2decimal_degrees(-33,40,0) 49 dnorth2 = degminsec2decimal_degrees(-33,58,30) 50 dnorth3 = degminsec2decimal_degrees(-33,46,0) 51 dwest = degminsec2decimal_degrees(151,2,20) 52 deast1 = degminsec2decimal_degrees(151,20,0) 53 deast2 = degminsec2decimal_degrees(151,48,0) 54 deast3 = degminsec2decimal_degrees(151,10,0) 55 deast4 = degminsec2decimal_degrees(151,9,0) 56 57 dp0 = [dsouth, dwest] 58 dp1 = [dsouth, deast1] 59 dp2 = [dnorth2, deast2] 60 dp3 = [dnorth1, deast2] 61 dp4 = [dnorth, deast1] 62 dp5 = [dnorth, deast4] 63 dp6 = [dnorth3, deast3] 64 dp7 = [dnorth3, dwest] 65 dp8 = [dnorth, dwest] 66 67 diffpolygonall, zone = convert_points_from_latlon_to_utm([dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7]) 68 69 qp0 = [343494.0, 6270650.0] 70 qp1 = [343337.0, 6270303.0] 71 qp2 = [343466.0, 6270228.0] 72 qp3 = [343139.0, 6269901.0] 73 qp4 = [342472.0, 6268573.0] 74 qp5 = [342111.0, 6267115.0] 75 qp6 = [342479.0, 6266121.0] 76 qp7 = [342860.0, 6266386.0] 77 qp8 = [342635.0, 6267438.0] 78 qp9 = [343105.0, 6269070.0] 79 qp10 = [343548.0, 6269567.0] 80 qp11 = [343487.0, 6269928.0] 81 qp12 = [343991.0, 6270269.0] 82 83 # demo poly which isn't rectangular 40 # demo poly 84 41 j0 = [385000, 6280000] 85 42 j1 = [360000, 6272500] … … 94 51 demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7] 95 52 53 from utilities.polygon import read_polygon 96 54 polygonptsfile4 = polygondir + 'poly1' 97 55 polygonptsfile0 = polygondir + 'poly2' … … 105 63 top_polygon = read_polygon(polygonptsfile4 + '.csv') 106 64 107 #Interior regions - the Harbour108 harbour_1x = degminsec2decimal_degrees(-33,51,0)109 harbour_1y = degminsec2decimal_degrees(151,2,30)110 harbour_12x = degminsec2decimal_degrees(-33,51,0)111 harbour_12y = degminsec2decimal_degrees(151,5,0)112 harbour_13x = degminsec2decimal_degrees(-33,52,15)113 harbour_13y = degminsec2decimal_degrees(151,5,0)114 harbour_2x = degminsec2decimal_degrees(-33,53,0)115 harbour_2y = degminsec2decimal_degrees(151,17,20)116 harbour_3x = degminsec2decimal_degrees(-33,47,0)117 harbour_3y = degminsec2decimal_degrees(151,20,30)118 harbour_4x = degminsec2decimal_degrees(-33,47,50)119 harbour_4y = degminsec2decimal_degrees(151,8,10)120 harbour_5x = degminsec2decimal_degrees(-33,48,10)121 harbour_5y = degminsec2decimal_degrees(151,8,0)122 harbour_6x = degminsec2decimal_degrees(-33,49,0)123 harbour_6y = degminsec2decimal_degrees(151,2,30)124 harbour_7x = degminsec2decimal_degrees(-33,34,30)125 harbour_7y = degminsec2decimal_degrees(151,20,20)126 harbour_8x = degminsec2decimal_degrees(-33,33,30)127 harbour_8y = degminsec2decimal_degrees(151,17,0)128 harbour_9x = degminsec2decimal_degrees(-33,45,30)129 harbour_9y = degminsec2decimal_degrees(151,17,0)130 harbour_10x = degminsec2decimal_degrees(-33,45,10)131 harbour_10y = degminsec2decimal_degrees(151,11,40)132 harbour_11x = degminsec2decimal_degrees(-33,45,10)133 harbour_11y = degminsec2decimal_degrees(151,11,40)134 harbour_14x = degminsec2decimal_degrees(-33,49,10)135 harbour_14y = degminsec2decimal_degrees(151,11,40)136 harbour_15x = degminsec2decimal_degrees(-33,48,55)137 harbour_15y = degminsec2decimal_degrees(151,2,30)138 139 k02 = [harbour_1x, harbour_1y]140 k12 = [harbour_2x, harbour_2y]141 k22 = [harbour_3x, harbour_3y]142 k32 = [harbour_4x, harbour_4y]143 k42 = [harbour_5x, harbour_5y]144 k52 = [harbour_6x, harbour_6y]145 k62 = [harbour_7x, harbour_7y]146 k72 = [harbour_8x, harbour_8y]147 k82 = [harbour_9x, harbour_9y]148 k92 = [harbour_10x, harbour_10y]149 k102 = [harbour_11x, harbour_11y]150 k112 = [harbour_12x, harbour_12y]151 k122 = [harbour_13x, harbour_13y]152 k132 = [harbour_14x, harbour_14y]153 k142 = [harbour_15x, harbour_15y]154 155 harbour_polygon_2, zone = convert_points_from_latlon_to_utm([k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52])156 assert zone == refzone157 158 159 #Interior region - Botany Bay160 bb_1x = degminsec2decimal_degrees(-34,3,0)161 bb_1y = degminsec2decimal_degrees(151,2,30)162 bb_10x = degminsec2decimal_degrees(-34,3,0)163 bb_10y = degminsec2decimal_degrees(151,8,0)164 bb_2x = degminsec2decimal_degrees(-34,3,0)165 bb_2y = degminsec2decimal_degrees(151,14,0)166 bb_3x = degminsec2decimal_degrees(-33,53,30)167 bb_3y = degminsec2decimal_degrees(151,17,20)168 bb_4x = degminsec2decimal_degrees(-33,53,0)169 bb_4y = degminsec2decimal_degrees(151,8,0)170 bb_5x = degminsec2decimal_degrees(-33,57,30)171 bb_5y = degminsec2decimal_degrees(151,8,0)172 bb_6x = degminsec2decimal_degrees(-33,57,30)173 bb_6y = degminsec2decimal_degrees(151,2,30)174 bb_7x = degminsec2decimal_degrees(-33,53,30)175 bb_7y = degminsec2decimal_degrees(151,12,30)176 bb_8x = degminsec2decimal_degrees(-33,55,20)177 bb_8y = degminsec2decimal_degrees(151,8,0)178 bb_9x = degminsec2decimal_degrees(-33,55,20)179 bb_9y = degminsec2decimal_degrees(151,12,30)180 181 j02 = [bb_1x, bb_1y]182 j12 = [bb_2x, bb_2y]183 j22 = [bb_3x, bb_3y]184 j32 = [bb_4x, bb_4y]185 j42 = [bb_5x, bb_5y]186 j52 = [bb_6x, bb_6y]187 j62 = [bb_7x, bb_7y]188 j72 = [bb_8x, bb_8y]189 j82 = [bb_9x, bb_9y]190 j92 = [bb_10x, bb_10y]191 192 botanybay_polygon_2, zone = convert_points_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42])193 194 65 slump_origin = [372500.0, 6255000.0] #Absolute UTM -
documentation/user_manual/examples/runup.py
r3257 r3275 37 37 38 38 def topography(x,y): 39 return -x/ 3# linear bed slope39 return -x/2 # linear bed slope 40 40 #return x*(-(2.0-x)*.5) # curved bed slope 41 41
Note: See TracChangeset
for help on using the changeset viewer.