Changeset 4350


Ignore:
Timestamp:
Apr 3, 2007, 3:51:30 PM (17 years ago)
Author:
sexton
Message:

update of Rosh' example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/solitary_waves/solitary_wave_runup.py

    r4145 r4350  
    2222from anuga.shallow_water import Transmissive_Momentum_Set_Stage_boundary
    2323from abstract_2d_finite_volumes.util import file_function
    24 from pylab import plot, xlabel, ylabel, title, ion, close, savefig,\
    25      figure, axis, legend, grid, hold
     24#from pylab import plot, xlabel, ylabel, title, ion, close, savefig,\
     25#     figure, axis, legend, grid, hold
    2626
    2727
     
    3939amplitude = 0.5     # Solitary wave height H
    4040normalized_amplitude = amplitude/offshore_depth
    41 simulation_name = 'runup_convergence' 
     41
    4242coastline_x = -highest_point/slope
    4343
     
    5454
    5555# Structured mesh
    56 dx = 5           # Resolution: Length of subdivisions on x axis (length)
    57 dy = 5           # Resolution: Length of subdivisions on y axis (width)
     56dx = 40.           # Resolution: Length of subdivisions on x axis (length)
     57dy = 40.          # Resolution: Length of subdivisions on y axis (width)
    5858
    5959length = east-west
    6060width = north-south
    61 points, vertices, boundary = rectangular_cross(length/dx, width/dy,
    62                                                len1=length, len2=width,
    63                                                origin = (west, south))
    64 
    65 domain = Domain(points, vertices, boundary) # Create domain
     61##points, vertices, boundary = rectangular_cross(length/dx, width/dy,
     62##                                               len1=length, len2=width,
     63##                                               origin = (west, south))
     64##
     65##domain = Domain(points, vertices, boundary) # Create domain
    6666
    6767
     
    7070interior_polygon = [[400,north-10],[west+10,north-10],
    7171                    [west+10,south+10],[400,south+10]]
     72res = 0.065
     73simulation_name = 'runup_convergence' + str(res)
    7274meshname = simulation_name + '.msh'
    7375create_mesh_from_regions(polygon,
    7476                         boundary_tags={'top': [0], 'left': [1],
    7577                                        'bottom': [2], 'right': [3]},
    76                          maximum_triangle_area=dx*dy/4,
     78                         maximum_triangle_area=10.,#dx*dy/4.,
    7779                         filename=meshname,
    78                          interior_regions=[[interior_polygon,dx*dy/32]])
     80                         #interior_regions=[[interior_polygon,dx*dy/32.]])
     81                         interior_regions=[[interior_polygon,res]])
    7982
    8083
     
    174177print '**********************************************'
    175178
    176 
     179import sys; sys.exit()
    177180#-----------------------------------------------------------------------------
    178181# Interrogate further
Note: See TracChangeset for help on using the changeset viewer.