Changeset 3618


Ignore:
Timestamp:
Sep 19, 2006, 11:26:47 AM (18 years ago)
Author:
ole
Message:

Working meeting with Rosh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/examples/runup_convergence.py

    r3617 r3618  
    1616from anuga.pmesh.mesh_interface import create_mesh_from_regions
    1717from abstract_2d_finite_volumes.mesh_factory import rectangular_cross
     18from anuga.config import g
    1819from anuga.shallow_water import Domain
    1920from anuga.shallow_water import Reflective_boundary
     
    4142# Basin dimensions (m)
    4243west = 0          # left boundary
    43 east = 1500        # right boundary
     44east = 1500       # right boundary
    4445south = 0         # lower boundary
    45 north = 100       # upper bourdary
     46north = 100       # upper boundary
    4647
    4748
     
    5152
    5253# Structured mesh
    53 dx = 20           # Resolution: Lenght of subdivisions on x axis (length)
    54 dy = 20           # Resolution: Lenght of subdivisions on y axis (width)
     54dx = 20           # Resolution: Length of subdivisions on x axis (length)
     55dy = 20           # Resolution: Length of subdivisions on y axis (width)
    5556
    5657length = east-west
     
    118119Bd = Dirichlet_boundary([0.,0.,0.])   # Constant boundary values
    119120
     121
    120122def waveform(t):
    121     return sea_level + amplitude/cosh(((t-50)/offshore_depth)*(0.75*9.81*amplitude)**0.5)**2
     123    return sea_level + amplitude/cosh(((t-50)/offshore_depth)*(0.75*g*amplitude)**0.5)**2
    122124
    123125Bw = Time_boundary(domain=domain,     # Time dependent boundary 
     
    140142    domain.write_time()
    141143
     144    # Let's find the maximum runup here working directly with the quantities,
     145    # and stop when it has been detected.
     146
     147    # 1 Find coastline as x where z==0
     148    # 2 Workout travel time to coastline
     149    # 3 Find min x where h>0 over all t.
     150    # 4 Perhaps do this across a number of ys
     151   
    142152
    143153#-----------------------------------------------------------------------------
     
    149159def gauge_line(west,east,north,south):
    150160    from Numeric import arange
    151     x_vector = arange(west,600, 1) # Gauges every 1 meter from west to 600m from western bdry
     161    x_vector = arange(west,600, 10) # Gauges every 1 meter from west to 600m from western bdry
    152162    y = (north+south)/2.
    153163
     
    204214
    205215
     216
     217
     218# Stop here
     219import sys; sys.exit()
    206220
    207221# Take snapshots and plot
Note: See TracChangeset for help on using the changeset viewer.