Ignore:
Timestamp:
Jun 23, 2008, 1:01:17 PM (15 years ago)
Author:
Leharne
Message:

Updates to okushiri convergence study

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/convergence_okushiri_2008/create_okushiri_truescale.py

    r5343 r5411  
    66
    77from anuga.pmesh.mesh import *
    8 from anuga.pmesh.mesh_interface import create_mesh_from_regions
    98from anuga.coordinate_transforms.geo_reference import Geo_reference
    109from anuga.geospatial_data import Geospatial_data
     
    112111
    113112
    114     #--------------------------------------------------------------------------
    115     # Create the triangular mesh based on overall clipping polygon with a
    116     # tagged
    117     # boundary and interior regions defined in project_truescale.py along with
    118     # resolutions (maximal area of per triangle) for each polygon
    119     #--------------------------------------------------------------------------
    120 
    121 
    122     base_resolution = 1 # Use this to coarsen or refine entire mesh.
    123 
    124     # Basic geometry and bounding polygon
    125     xleft   = 0
    126     xright  = 2179.2
    127     ybottom = 0
    128     ytop    = 1360.8
    129 
    130     point_sw = [xleft, ybottom]
    131     point_se = [xright, ybottom]
    132     point_nw = [xleft, ytop]   
    133     point_ne = [xright, ytop]
    134 
    135     bounding_polygon = [point_se,
    136                         point_ne,
    137                         point_nw,
    138                         point_sw]
    139          
    140     # Localised refined area for gulleys
    141     xl = 1920
    142     xr = 2120
    143     yb = 640
    144     yt = 920
    145     p0 = [xl, yb]
    146     p1 = [xr, yb]
    147     p2 = [xr, yt]
    148     p3 = [xl, yt]
    149113   
    150     gulleys = [p0, p1, p2, p3]
    151    
    152 
    153     # Island area and drawdown region (original)
    154     #island_0 = [xleft + 2*(xright-xleft)/3+1.2, ytop-0.5]
    155     #island_1 = [xleft + 2*(xright-xleft)/3+0.5, ybottom + 2*(ytop-ybottom)/3]
    156     #island_2 = [xleft + (xright-xleft)/2+0.3, ybottom + 2*(ytop-ybottom)/3-0.3]
    157     #island_3 = [xleft + (xright-xleft)/2+0.3, ybottom + (ytop-ybottom)/3+0.3]
    158     #island_4 = [xleft + 2*(xright-xleft)/3+0.4, ybottom + (ytop-ybottom)/3-0.3]
    159     #island_5 = [xleft + 2*(xright-xleft)/3+1.2, ybottom+0.2]
    160     #island_6 = [xl-.01, yb]  #OK
    161     #island_7 = [xl-.01, yt]  #OK     
    162 
    163 
    164     # Island area and drawdown region
    165     island_0 = [xleft + 2*(xright-xleft)/3+480, ytop-200]
    166     island_1 = [xleft + 2*(xright-xleft)/3+200, ybottom + 2*(ytop-ybottom)/3]
    167     island_2 = [xleft + (xright-xleft)/2+160, ybottom + 2*(ytop-ybottom)/3-120]
    168     island_3 = [xleft + (xright-xleft)/2+160, ybottom + (ytop-ybottom)/3+120]
    169     island_4 = [xleft + 2*(xright-xleft)/3+160, ybottom + (ytop-ybottom)/3-120]
    170     island_5 = [xleft + 2*(xright-xleft)/3+480, ybottom+320]
    171     island_6 = [xl-4, yb]  # Keep right edge just off the gulleys
    172     island_7 = [xl-4, yt]
    173  
    174     island = [island_0, island_1, island_2,
    175               island_3, island_4, island_5,
    176               island_6, island_7]
    177 
    178 
    179     # Region spanning half right hand side of domain just inside boundary (org)
    180     #rhs_nw = [xleft + (xright-xleft)/3+1, ytop-0.02]
    181     #rhs_sw = [xleft + (xright-xleft)/3+1, ybottom+0.02]
    182     #rhs_se = [xright-0.02, ybottom+0.02]
    183     #rhs_ne = [xright-0.02, ytop-0.02]
    184 
    185     # Region spanning half right hand side of domain just inside boundary
    186     rhs_nw = [xleft + (xright-xleft)/3+400, ytop-560]
    187     rhs_sw = [xleft + (xright-xleft)/3+400, ybottom+200]
    188     rhs_se = [xright-4, ybottom+80]
    189     rhs_ne = [xright-4, ytop-80]       
    190 
    191     rhs_region = [rhs_nw, rhs_ne, rhs_se, rhs_sw]
    192 
    193      
    194     # Interior regions and creation of mesh
    195     interior_regions = [[rhs_region, 80],
    196                         [island, 32*base_resolution],
    197                         [gulleys, 3.2*base_resolution]]   
    198 
    199     meshname = project_truescale.mesh_filename + '.msh'
    200     m = create_mesh_from_regions(bounding_polygon,
    201                                  boundary_tags={'wall': [0, 1, 3],
    202                                                 'wave': [2]},     
    203                                  maximum_triangle_area=16000*base_resolution,
    204                                  interior_regions=interior_regions,
    205                                  filename=project_truescale.mesh_filename,
    206                                  verbose=True)
    207 
Note: See TracChangeset for help on using the changeset viewer.