Changeset 3508 for inundation/examples


Ignore:
Timestamp:
Aug 17, 2006, 6:30:41 PM (19 years ago)
Author:
ole
Message:

Demos for Rosh

Location:
inundation/examples
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified inundation/examples/runup_convergence.py

    r3506 r3508  
    3131slope = -0.02     # 1:50 Slope
    3232highest_point = 3 # Highest elevation (m)
    33 sea_level = -2    # Mean sea level
    34 wave_height = 3   # Solitary wave height H
     33sea_level = -1    # Mean sea level
     34amplitude = 2     # Solitary wave height H
    3535simulation_name = 'runup_convergence'   
    3636
     
    9696
    9797def waveform(t):
    98     return wave_height/cosh(t-5)**2
     98    return sea_level + amplitude/cosh(t-5)**2
    9999
    100100Bw = Time_boundary(domain=domain,     # Time dependent boundary 
     
    172172# Print
    173173
    174 print 'wave height [m]:                    ', wave_height
     174print 'wave height [m]:                    ', amplitude
    175175runup_height = topography(runup_point, (north+south)/2.)
    176176print 'run up height [m]:                  ', runup_height
     
    184184
    185185# Store
    186 filename = 'maxrunup'+str(wave_height)+'.csv'
     186filename = 'maxrunup'+str(amplitude)+'.csv'
    187187fid = open(filename,'w')   
    188188s = 'Depth at eastern boundary,Waveheight,Runup distance,Runup height\n'
    189189fid.write(s)
    190190
    191 s = '%.2f,%.2f,%.2f\n' %(wave_height, runup_distance, runup_height)
     191s = '%.2f,%.2f,%.2f\n' %(amplitude, runup_distance, runup_height)
    192192fid.write(s)
    193193
Note: See TracChangeset for help on using the changeset viewer.