Changeset 3618 for anuga_core/source/anuga/examples/runup_convergence.py
 Timestamp:
 Sep 19, 2006, 11:26:47 AM (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

anuga_core/source/anuga/examples/runup_convergence.py
r3617 r3618 16 16 from anuga.pmesh.mesh_interface import create_mesh_from_regions 17 17 from abstract_2d_finite_volumes.mesh_factory import rectangular_cross 18 from anuga.config import g 18 19 from anuga.shallow_water import Domain 19 20 from anuga.shallow_water import Reflective_boundary … … 41 42 # Basin dimensions (m) 42 43 west = 0 # left boundary 43 east = 1500 44 east = 1500 # right boundary 44 45 south = 0 # lower boundary 45 north = 100 # upper bou rdary46 north = 100 # upper boundary 46 47 47 48 … … 51 52 52 53 # Structured mesh 53 dx = 20 # Resolution: Leng htof subdivisions on x axis (length)54 dy = 20 # Resolution: Leng htof subdivisions on y axis (width)54 dx = 20 # Resolution: Length of subdivisions on x axis (length) 55 dy = 20 # Resolution: Length of subdivisions on y axis (width) 55 56 56 57 length = eastwest … … 118 119 Bd = Dirichlet_boundary([0.,0.,0.]) # Constant boundary values 119 120 121 120 122 def waveform(t): 121 return sea_level + amplitude/cosh(((t50)/offshore_depth)*(0.75* 9.81*amplitude)**0.5)**2123 return sea_level + amplitude/cosh(((t50)/offshore_depth)*(0.75*g*amplitude)**0.5)**2 122 124 123 125 Bw = Time_boundary(domain=domain, # Time dependent boundary … … 140 142 domain.write_time() 141 143 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 142 152 143 153 # … … 149 159 def gauge_line(west,east,north,south): 150 160 from Numeric import arange 151 x_vector = arange(west,600, 1 ) # Gauges every 1 meter from west to 600m from western bdry161 x_vector = arange(west,600, 10) # Gauges every 1 meter from west to 600m from western bdry 152 162 y = (north+south)/2. 153 163 … … 204 214 205 215 216 217 218 # Stop here 219 import sys; sys.exit() 206 220 207 221 # Take snapshots and plot
Note: See TracChangeset
for help on using the changeset viewer.