- Timestamp:
- Jun 23, 2008, 1:01:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/convergence_okushiri_2008/run_okushiri_truescale.py
r5396 r5411 1 """Validation of the AnuGA implementation of the shallow water wave equation. 1 """Anuga convergence study using a true-scale version of the Okushiri 2 Island tsunami wavetank experiment 2 3 3 This script sets upa modified version of the Okushiri Island benchmark4 This script runs a modified version of the Okushiri Island benchmark 4 5 5 6 as published at … … 12 13 13 14 This version up-scales the original 1:400 scale wave-tank experiment, to 14 "true-scale" .15 "true-scale" with mesh defined using interior polygons. 15 16 16 The original validation data was downloaded and made available in this directory 17 for convenience but the original data is available at 17 The original validation data is available at 18 18 http://www.cee.cornell.edu/longwave/index.cfm?page=benchmark&problem=2 19 19 where a detailed description of the problem is also available. 20 20 21 22 Run create_okushiri_truescale.py to process the boundary condition and build a the 23 mesh before running this script. 21 Run create_okushiri_truescale.py to convert bathymetry and input boundary 22 condition into NetCDF format. 24 23 25 24 """ 25 #---------------------------------------- 26 # Import necessary modules 27 #---------------------------------------- 26 28 27 # Module imports 29 # Standard modules 30 from os import sep,umask 31 from os.path import dirname, basename 32 from os import mkdir, access, F_OK 33 from shutil import copy 34 import time 35 import sys 36 37 # Related major packages 28 38 from anuga.shallow_water import Domain 29 39 from anuga.shallow_water import Reflective_boundary 30 40 from anuga.shallow_water import Transmissive_Momentum_Set_Stage_boundary 31 41 from anuga.abstract_2d_finite_volumes.util import file_function 32 33 import project_truescale 42 from anuga.shallow_water.data_manager import copy_code_files, start_screen_catcher 43 from anuga.pmesh.mesh_interface import create_mesh_from_regions 34 44 35 45 36 #------------------------- 46 import project_truescale # Definition of filenames and interior polygons 47 48 copy_code_files(project_truescale.output_run_time_dir,'run_okushiri_truescale.py', 49 'project_truescale.py' ) 50 myid = 0 51 numprocs = 1 52 start_screen_catcher(project_truescale.output_run_time_dir, myid, numprocs) 53 54 #-------------------------------------------------------------------------- 55 # Create the triangular mesh based on overall bounding polygon with a 56 # tagged boundary and interior regions defined in project_truescale.py 57 # along with resolutions (maximal area of per triangle) for each polygon 58 #-------------------------------------------------------------------------- 59 60 create_mesh_from_regions(project_truescale.poly_all, 61 boundary_tags={'wall': [0, 1, 3],'wave': [2]}, 62 maximum_triangle_area=project_truescale.res_poly_all, 63 #interior_regions=project_truescale.interior_regions, 64 filename=project_truescale.mesh_name+'.msh', 65 verbose=True) 66 67 #------------------------------ 37 68 # Create Domain from mesh 38 #------------------------- 39 domain = Domain(project_truescale.mesh_ filename, use_cache=True, verbose=True)69 #------------------------------ 70 domain = Domain(project_truescale.mesh_name+'.msh', use_cache=True, verbose=True) 40 71 print domain.statistics() 41 72 … … 43 74 44 75 # Write vertex coordinates to file 45 filename= 'okushiri_mesh_vertex_coordinates_truescale.txt'76 filename=project.vertex_filename 46 77 fid=open(filename,'w') 47 78 fid.write('x (m), y (m)\n') … … 68 99 #------------------------- 69 100 domain.set_name(project_truescale.output_filename) # Name of output sww file 70 domain.set_datadir(project_truescale.output_ dir)101 domain.set_datadir(project_truescale.output_run_time_dir) # Name of output directory 71 102 domain.set_default_order(2) # Apply second order scheme 72 103 domain.set_all_limiters(0.9) # Max second order scheme (old lim) 73 domain.set_minimum_storable_height(0. 4) # Don't store h < 0.4m104 domain.set_minimum_storable_height(0.1) # Don't store h < 0.1m 74 105 domain.tight_slope_limiters = 1 75 106 domain.beta_h = 0.0 76 107 77 #Timings on AMD64-242 (beta_h=0)78 # tight_slope_limiters = 0:79 # 3035s - 3110s80 # tight_slope_limiters = 1:81 # 3000s - 3008s82 #83 # beta_h>0: In the order of 3200s84 108 85 109 #------------------------- … … 109 133 t0 = time.time() 110 134 111 for t in domain.evolve(yieldstep = 1, finaltime = 450):135 for t in domain.evolve(yieldstep=project_truescale.yieldstep, finaltime = 450): 112 136 print domain.timestepping_statistics(track_speeds=False, 113 137 triangle_id=triangle_id)
Note: See TracChangeset
for help on using the changeset viewer.