Ignore:
Timestamp:
Apr 3, 2007, 4:22:40 PM (18 years ago)
Author:
duncan
Message:

checking in a scenario

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/friction_UA_flume_2006/create_mesh.py

    r4047 r4351  
    77
    88
    9 def generate(mesh_filename, gate_position, is_coarse = False):
     9def generate(mesh_filename, is_coarse = False):
    1010    """
    1111    Generate mesh for University of Aberbeen dam break flume.
     
    1616    #Basic geometry
    1717   
    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
    1921    ybottom = 0
    2022    ytop    = 0.45
    2123    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!
    2326
    2427    #Outline
     
    3235    point_dam_bottom = [xdam, ybottom]   
    3336
     37    # slope seperation (middle)
     38    point_slope_top = [xslope, ytop]
     39    point_slope_bottom = [xslope, ybottom]   
     40
    3441    m = Mesh()
    3542
     
    3845              point_nw,
    3946              point_dam_top,
     47              point_slope_top,
    4048              point_ne,
    41               point_se,
     49              point_se,
     50              point_slope_bottom,
    4251              point_dam_bottom
    4352              ]
    4453   
    4554    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
    4858   
    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]
    5060       
    5161    m.add_points_and_segments(points, segments, segment_tags)
    5262   
    5363    dam = m.add_region(-0.0000001,(ytop - ybottom)/2)
    54     # this is the location of the region.
     64    # this is the location of the reservoir region.
    5565    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")
    5670   
    5771    if is_coarse:
     
    6579#-------------------------------------------------------------
    6680if __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.