source: anuga_work/development/convergence_okushiri_2008/run_okushiri_truescale.py @ 5343

Last change on this file since 5343 was 5343, checked in by Leharne, 17 years ago

True-scale version of Okushiri wavetank experiment

File size: 3.3 KB
Line 
1"""Validation of the AnuGA implementation of the shallow water wave equation.
2
3This script sets up a modified version of the Okushiri Island benchmark
4
5as published at
6
7THE THIRD INTERNATIONAL WORKSHOP ON LONG-WAVE RUNUP MODELS
8June 17-18 2004
9Wrigley Marine Science Center
10Catalina Island, California
11http://www.cee.cornell.edu/longwave/
12
13This version up-scales the original 1:400 scale wave-tank experiment, to
14"true-scale".
15
16The original validation data was downloaded and made available in this directory
17for convenience but the original data is available at
18http://www.cee.cornell.edu/longwave/index.cfm?page=benchmark&problem=2
19where a detailed description of the problem is also available.
20
21
22Run create_okushiri_truescale.py to process the boundary condition and build a the
23mesh before running this script.
24
25"""
26
27# Module imports
28from anuga.shallow_water import Domain
29from anuga.shallow_water import Reflective_boundary
30from anuga.shallow_water import Transmissive_Momentum_Set_Stage_boundary
31from anuga.abstract_2d_finite_volumes.util import file_function
32
33import project_truescale
34
35
36#-------------------------
37# Create Domain from mesh
38#-------------------------
39domain = Domain(project_truescale.mesh_filename, use_cache=True, verbose=True)
40print domain.statistics()
41
42
43#-------------------------
44# Initial Conditions
45#-------------------------
46domain.set_quantity('friction', 0.0)
47domain.set_quantity('stage', 0.0)
48domain.set_quantity('elevation',
49                    filename=project_truescale.bathymetry_filename,
50                    alpha=0.02,                   
51                    verbose=True,
52                    use_cache=True)
53
54
55#-------------------------
56# Set simulation parameters
57#-------------------------
58domain.set_name(project_truescale.output_filename)  # Name of output sww file
59domain.set_default_order(2)               # Apply second order scheme
60domain.set_all_limiters(0.9)              # Max second order scheme (old lim)
61domain.set_minimum_storable_height(0.4)   # Don't store h < 0.4m
62domain.tight_slope_limiters = 1
63domain.beta_h = 0.0
64
65#Timings on AMD64-242 (beta_h=0)
66#  tight_slope_limiters = 0:
67#    3035s - 3110s
68#  tight_slope_limiters = 1:
69#    3000s - 3008s
70#
71# beta_h>0: In the order of 3200s
72
73#-------------------------
74# Boundary Conditions
75#-------------------------
76
77# Create boundary function from timeseries provided in file
78function = file_function(project_truescale.boundary_filename,
79                         domain, verbose=True)
80
81# Create and assign boundary objects
82Bts = Transmissive_Momentum_Set_Stage_boundary(domain, function)
83Br = Reflective_boundary(domain)
84domain.set_boundary({'wave': Bts, 'wall': Br})
85
86
87# Select triangle containing ch5 for diagnostic output
88# around known gauge
89triangle_id = domain.get_triangle_containing_point([1808.4, 478.4])
90# This should get triangle id 32833 with centroid (4.5244, 1.1972)
91
92
93#-------------------------
94# Evolve through time
95#-------------------------
96import time
97t0 = time.time()
98
99for t in domain.evolve(yieldstep = 1, finaltime = 450):
100    print domain.timestepping_statistics(track_speeds=False,
101                                         triangle_id=triangle_id)
102    print domain.boundary_statistics()
103
104print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracBrowser for help on using the repository browser.