- Timestamp:
- Apr 3, 2007, 4:22:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/friction_UA_flume_2006/create_mesh.py
r4047 r4351 7 7 8 8 9 def generate(mesh_filename, gate_position,is_coarse = False):9 def generate(mesh_filename, is_coarse = False): 10 10 """ 11 11 Generate mesh for University of Aberbeen dam break flume. … … 16 16 #Basic geometry 17 17 18 xright = gate_position 18 xright = 19.0 # web site says a 20 m long flume 19 #(http://www.eng.abdn.ac.uk/envhrg/facilities/swashrig.hti) 20 # Therefore 19 +1 (for reservoir)= 20 19 21 ybottom = 0 20 22 ytop = 0.45 21 23 xdam = 0.0 22 xleft = gate_position - 13.0 24 xleft = -1.0 25 xslope = 4.0 # note, get in gen meshparrallel run dam as well! 23 26 24 27 #Outline … … 32 35 point_dam_bottom = [xdam, ybottom] 33 36 37 # slope seperation (middle) 38 point_slope_top = [xslope, ytop] 39 point_slope_bottom = [xslope, ybottom] 40 34 41 m = Mesh() 35 42 … … 38 45 point_nw, 39 46 point_dam_top, 47 point_slope_top, 40 48 point_ne, 41 point_se, 49 point_se, 50 point_slope_bottom, 42 51 point_dam_bottom 43 52 ] 44 53 45 54 segments = [[0,1], [1,2], [2,3], 46 [3,4 ],[4,5], [5,0], #The outer border 47 [2,5]] #dam Separator 55 [3,4 ],[4,5], [5,6],[6,7],[7,0], #The outer border 56 [2,7], #dam Separator 57 [3,6]] # slope separator 48 58 49 segment_tags = {'wall':[0,1,2, 4,5],'edge':[3]} # '':[6]59 segment_tags = {'wall':[0,1,2,3,5,6,7],'edge':[4]} # '':[6] 50 60 51 61 m.add_points_and_segments(points, segments, segment_tags) 52 62 53 63 dam = m.add_region(-0.0000001,(ytop - ybottom)/2) 54 # this is the location of the re gion.64 # this is the location of the reservoir region. 55 65 dam.setTag("dam") 66 67 slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2) 68 # this is the location of the slope region. 69 slope.setTag("slope") 56 70 57 71 if is_coarse: … … 65 79 #------------------------------------------------------------- 66 80 if __name__ == "__main__": 67 generate("aa.tsh", 0.75, is_course = True)81 generate("aa.tsh", is_coarse = True)
Note: See TracChangeset
for help on using the changeset viewer.