Changeset 4022 for anuga_validation
- Timestamp:
- Nov 21, 2006, 3:30:43 PM (18 years ago)
- Location:
- anuga_validation/okushiri_2005
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/okushiri_2005/run_okushiri.py
r3883 r4022 27 27 from anuga.abstract_2d_finite_volumes.util import file_function 28 28 29 from anuga_parallel.parallel_api import myid, numprocs, distribute30 31 29 import project 32 30 … … 49 47 verbose=True, 50 48 use_cache=True) 51 52 53 #-------------------------54 # Distribute domain if run in parallel55 #-------------------------56 if numprocs > 1:57 domain = distribute(domain)58 49 59 50 -
anuga_validation/okushiri_2005/run_okushiri_parallel.py
r3845 r4022 1 1 """Validation of the AnuGA implementation of the shallow water wave equation. 2 2 3 This script sets up LWRU2 benchmark with initial condition stated3 This script sets up Okushiri Island benchmark as published at the 4 4 5 See also 5 THE THIRD INTERNATIONAL WORKSHOP ON LONG-WAVE RUNUP MODELS 6 June 17-18 2004 7 Wrigley Marine Science Center 8 Catalina Island, California 9 http://www.cee.cornell.edu/longwave/ 6 10 11 12 The validation data was downloaded and made available in this directory 13 for convenience but the original data is available at 7 14 http://www.cee.cornell.edu/longwave/index.cfm?page=benchmark&problem=2 15 where a detailed description of the problem is also available. 8 16 9 Depth at western boundary is d = 13.5 cm10 17 11 This a parallel version. 18 Run create_okushiri.py to process the boundary condition and build a the 19 mesh before running this script. 20 12 21 """ 13 22 14 23 # Module imports 15 from Numeric import array, zeros, Float, allclose16 17 24 from anuga.shallow_water import Domain 18 25 from anuga.shallow_water import Reflective_boundary … … 20 27 from anuga.abstract_2d_finite_volumes.util import file_function 21 28 22 from anuga_parallel.parallel_api import myid, numprocs, distribute 29 # from anuga_parallel.parallel_api import myid, numprocs, distribute 23 30 24 31 import project … … 26 33 27 34 #------------------------- 28 # Create Domain 35 # Create Domain from mesh 29 36 #------------------------- 30 37 domain = Domain(project.mesh_filename, use_cache=True, verbose=True) 38 print domain.statistics() 39 31 40 32 41 #------------------------- … … 36 45 domain.set_quantity('stage', 0.0) 37 46 domain.set_quantity('elevation', 38 filename = project.bathymetry_filename[:-4] + '.pts',39 alpha =0.02,40 verbose =True,41 use_cache =True)47 filename=project.bathymetry_filename, 48 alpha=0.02, 49 verbose=True, 50 use_cache=True) 42 51 43 52 44 53 #------------------------- 45 # Distribute domain 54 # Distribute domain if run in parallel 46 55 #------------------------- 47 domain = distribute(domain) 48 49 # Parameters 50 domain.set_name('okushiri_parallel') 51 domain.set_minimum_storable_height(0.001) 52 domain.set_default_order(2) 53 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 54 55 # Set old (pre Sep 2006) defaults for limiters 56 domain.beta_w = 0.9 57 domain.beta_w_dry = 0.9 58 domain.beta_uh = 0.9 59 domain.beta_uh_dry = 0.9 60 domain.beta_vh = 0.9 61 domain.beta_vh_dry = 0.9 56 if numprocs > 1: 57 domain = distribute(domain) 62 58 63 59 64 #------------------------------------------------------------------------------ 65 # Setup boundary conditions 66 # (MUST currently happen after domain has been distributed) 67 #------------------------------------------------------------------------------ 60 #------------------------- 61 # Set simulation parameters 62 #------------------------- 63 domain.set_name(project.output_filename) # Name of output sww file 64 domain.set_default_order(2) # Apply second order scheme 65 domain.set_all_limiters(0.9) # Max second order scheme (old lim) 66 domain.set_minimum_storable_height(0.001) # Don't store w < 0.001m 67 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 68 68 69 Br = Reflective_boundary(domain) # Solid reflective wall70 69 71 function = file_function(project.boundary_filename[:-4] + '.tms', 72 domain, 73 verbose=True) 70 #------------------------- 71 # Boundary Conditions 72 #------------------------- 74 73 74 # Create boundary function from timeseries provided in file 75 function = file_function(project.boundary_filename, 76 domain, verbose=True) 77 78 # Create and assign boundary objects 75 79 Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function) 76 77 domain.set_boundary({'wave': Bts, # Bind this one later 78 'wall': Br}) 80 Br = Reflective_boundary(domain) 81 domain.set_boundary({'wave': Bts, 'wall': Br}) 79 82 80 83 … … 88 91 domain.write_time() 89 92 90 if myid == 0: 91 print 'That took %.2f seconds' %(time.time()-t0) 93 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.