Changeset 3617
- Timestamp:
- Sep 18, 2006, 5:47:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/examples/runup_convergence.py
r3563 r3617 29 29 # Model constants 30 30 31 slope = -0.0 5 # 1:20 Slope31 slope = -0.02 # 1:50 Slope, reaches h=20m 1000m from western bndry, and h=0 (coast) at 300m 32 32 highest_point = 6 # Highest elevation (m) 33 33 sea_level = 0 # Mean sea level 34 34 min_elevation = -20 # Lowest elevation (elevation of offshore flat part) 35 35 offshore_depth=sea_level-min_elevation # offshore water depth 36 amplitude = 2# Solitary wave height H36 amplitude = 0.5 # Solitary wave height H 37 37 normalized_amplitude = amplitude/offshore_depth 38 38 simulation_name = 'runup_convergence' … … 41 41 # Basin dimensions (m) 42 42 west = 0 # left boundary 43 east = 500 # right boundary43 east = 1500 # right boundary 44 44 south = 0 # lower boundary 45 45 north = 100 # upper bourdary … … 51 51 52 52 # Structured mesh 53 dx = 10 # Resolution: Lenght of subdivisions on x axis (length)54 dy = 10 # Resolution: Lenght of subdivisions on y axis (width)53 dx = 20 # Resolution: Lenght of subdivisions on x axis (length) 54 dy = 20 # Resolution: Lenght of subdivisions on y axis (width) 55 55 56 56 length = east-west … … 65 65 # Unstructured mesh 66 66 polygon = [[east,north],[west,north],[west,south],[east,south]] 67 interior_polygon = [[ 200,north-10],[west+10,north-10],[west+10,south+10],[200,south+10]]67 interior_polygon = [[400,north-10],[west+10,north-10],[west+10,south+10],[400,south+10]] 68 68 meshname = simulation_name + '.msh' 69 69 create_mesh_from_regions(polygon, … … 119 119 120 120 def waveform(t): 121 return sea_level + normalized_amplitude/cosh(t-25)**2121 return sea_level + amplitude/cosh(((t-50)/offshore_depth)*(0.75*9.81*amplitude)**0.5)**2 122 122 123 123 Bw = Time_boundary(domain=domain, # Time dependent boundary … … 137 137 138 138 stagestep = [] 139 for t in domain.evolve(yieldstep = 1, finaltime = 100):139 for t in domain.evolve(yieldstep = 1, finaltime = 300): 140 140 domain.write_time() 141 141 … … 149 149 def gauge_line(west,east,north,south): 150 150 from Numeric import arange 151 x_vector = arange(west, (east-west)/2, 10) # Gauges every 10 meter from west to midpt151 x_vector = arange(west,600, 1) # Gauges every 1 meter from west to 600m from western bdry 152 152 y = (north+south)/2. 153 153
Note: See TracChangeset
for help on using the changeset viewer.