Changeset 9056 for trunk/anuga_work/development/gareth/tests/wave_runup
- Timestamp:
- Mar 3, 2014, 9:58:02 AM (11 years ago)
- Location:
- trunk/anuga_work/development/gareth/tests/wave_runup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/tests/wave_runup/plotme.py
r8867 r9056 66 66 for i in range(len(model_shore_x)): 67 67 # Compute index of shoreline 68 vtmp = p2.stage[i,:]>p2.elev+shoreline_depth_thresh1 68 #vtmp = p2.stage[i,:]>p2.elev+shoreline_depth_thresh1 69 #model_shore_x[i]=p2.x[vtmp].min() 69 70 70 model_shore_x[i]=p2.x[vtmp].min() 71 vtmp = p2.stage[i,:]<p2.elev+shoreline_depth_thresh1 72 model_shore_x[i]=p2.x[vtmp].max() 73 vtmp2=(p2.x>model_shore_x[i]) 74 model_shore_x[i]=p2.x[vtmp2].min() 71 75 #v_ind=(p2.stage[i,vtmp]-p2.elev[vtmp]).argmin() 72 76 # Store x and xvel … … 76 80 # Extract shoreline velocity. It is tricky, to avoid getting 77 81 # zero velocity points -- might be a better way to do it? 78 vtmp2= (p2.stage[i,:]>p2.elev+shoreline_depth_thresh1)*\ 79 (p2.stage[i,:]<p2.elev+shoreline_depth_thresh2) 80 mloc=abs(p2.xvel[i,vtmp2]).argmax() 82 #vtmp2= (p2.stage[i,:]>p2.elev+shoreline_depth_thresh1)*\ 83 # (p2.stage[i,:]<p2.elev+shoreline_depth_thresh2) 84 #mloc=abs(p2.xvel[i,vtmp2]).argmax() 85 81 86 #print abs(p2.xvel[i,vtmp2]).max(), mloc 82 model_shore_u[i]=p2.xvel[i,vtmp2][mloc]87 #model_shore_u[i]=p2.xvel[i,vtmp2][mloc] 83 88 #vtmp2 = (p2.stage[i,:]>p2.elev+0.01) 84 89 #mloc= (vtmp2*(p2.stage[i,:]-p2.elev)).argmin() 85 90 #model_shore_u[i] = p2.xvel[i,mloc] 91 92 vtmp2=vtmp 93 mloc=model_shore_x[i] 94 model_shore_u[i] = p2.xvel[i,p2.x==model_shore_x[i]].max() 86 95 87 96 pyplot.plot(p2.time, model_shore_x-200.,'-o') -
trunk/anuga_work/development/gareth/tests/wave_runup/runup.py
r9038 r9056 10 10 11 11 from math import sin, pi, exp 12 from bal_and import *13 #from anuga import Domain as Domain12 #from bal_and import * 13 from anuga import Domain as Domain 14 14 15 15 #from anuga_tsunami import * … … 32 32 domain.set_datadir('.') # Use current folder 33 33 #domain.set_quantities_to_be_stored({'stage': 2, 'xmomentum': 2, 'ymomentum': 2, 'elevation': 1}) 34 #domain.set_flow_algorithm('DE1')34 domain.set_flow_algorithm('DE1') 35 35 #------------------ 36 36 # Define topography
Note: See TracChangeset
for help on using the changeset viewer.