Changeset 5154


Ignore:
Timestamp:
Mar 11, 2008, 10:13:40 AM (17 years ago)
Author:
duncan
Message:

commiting most recent dir

Location:
anuga_work/development/near_shore_PMD
Files:
2 edited

Legend:

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

    r5095 r5154  
    33
    44from anuga.pmesh.mesh_interface import create_mesh_from_regions
    5 
     5from anuga.coordinate_transforms.geo_reference import Geo_reference
    66
    77xslope = 5.0 # Distance between the boundary ande the start of the slope
     
    1313    # Basic geometry and bounding polygon
    1414    xleft   = -100  # Beach
     15    xleft   = 8000  # looking at the first 2 km of wave travel
    1516    xright  = 10000  # wave generated here
    1617    if thinner:
    17         ytop    = 1000
    18         ybottom = -1000
     18        ytop    = 500
     19        ybottom = -500
    1920    else:
    2021        ytop    = 2000
     
    3637    xright  = 2000
    3738    if thinner:
    38         ytop    = 900
    39         ybottom = -900
     39        ytop    = 450
     40        ybottom = -450
    4041    else:
    4142        ytop    = 1000
     
    5859                                                'wave': [0]},     
    5960                                 maximum_triangle_area=maximum_triangle_area,
    60                                  interior_regions=interior_regions,
     61                                 #interior_regions=interior_regions,
     62                                 mesh_geo_reference=Geo_reference(),
    6163                                 filename=mesh_filename,
    6264                                 verbose=True)
  • anuga_work/development/near_shore_PMD/run_beach.py

    r5095 r5154  
    5151            # swash
    5252            z[i] = -0.05*x[i]
     53            #z[i] = -30
    5354        elif x[i] <= 1000:
    5455            # surf
    5556            z[i] = -0.15*(x[i]**(0.5))
     57            #z[i] = -30
    5658        else:
    5759            # Nominal shoreface
    5860            z[i] = -0.01888*(x[i]**(0.8))
     61            #z[i] = -30
    5962            #>>> -0.15*(1000**0.5)
    6063            #-4.7434164902525691
     
    7174    if is_trial_run is True:
    7275        outputdir_name += '_test'
    73         yieldstep = 10
    74         finaltime = 1200.
     76        yieldstep = 1
     77        finaltime = 100.
    7578        maximum_triangle_area=3000
    7679        thinner=True
    7780    else:
    78         yieldstep = 5.
    79         finaltime = 1200
    80         maximum_triangle_area=50
     81        yieldstep = 1.
     82        finaltime = 1600
     83        finaltime = 100
     84        maximum_triangle_area = 100
    8185        thinner=True
    8286       
     
    9397          pro_instance.outputdir + 'create_mesh.py')
    9498   
     99    #mesh_filename = pro_instance.meshdir + basename + '.tsh'
    95100    mesh_filename = pro_instance.meshdir + basename + '.msh'
    96101
     
    131136    domain.set_name(basename)
    132137    domain.set_datadir(pro_instance.outputdir)
     138    domain.set_default_order(2) # Use second order spatial scheme
    133139    domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
    134140    domain.set_minimum_storable_height(0.001)
     
    152158    Bd = Dirichlet_boundary([10.,0,0])
    153159    Bwp = Transmissive_Momentum_Set_Stage_boundary(domain,
    154                    lambda t: [(1.2*sin(2*t*pi/10)), 0.0, 0.0])
     160                   lambda t: [(1.2*sin(2*t*pi/10)), 0.0 ,0.0])
     161    Bwp_velocity = Time_boundary(domain,
     162                   lambda t: [(1.2*sin(2*t*pi/10)),
     163                              0.24*sin(2*t*pi/10),0.0])
    155164    Bws = Transmissive_Momentum_Set_Stage_boundary(domain,
    156165                   lambda t: [1.2*sin(2*t*pi/10)+1.0*sin(2*t*pi/9.5),
    157166                              0.0, 0.0])
    158     domain.set_boundary( {'wall': Br, 'wave': Bws} )
     167    domain.set_boundary( {'wall': Br, 'wave': Bwp_velocity} )
    159168
    160169    #-------------------------------------------------------------------------
     
    193202#-------------------------------------------------------------
    194203if __name__ == "__main__":
    195     main( is_trial_run = False,
    196          outputdir_name='Primary_wave_thin_50')
     204    main( is_trial_run = False, friction=0.0,
     205         outputdir_name='Velocity_wave_thinner_100_0_friction_ft1600_2nd_order')
Note: See TracChangeset for help on using the changeset viewer.