source: trunk/anuga_work/development/gong_2008/run_gong_slide_parameters.py @ 7884

Last change on this file since 7884 was 5676, checked in by sexton, 16 years ago

Bridgette's study for investigating sensitivity of input wave at Wollongong

File size: 3.1 KB
Line 
1"""Script for running a tsunami inundation scenario for Wollongong, NSW, Australia.
2
3Source data such as elevation and boundary data is assumed to be available in
4directories specified by project_slide_parameters.py
5The output sww file is stored in project_slide_parameters.outputtimedir
6
7The scenario is defined by a triangular mesh created from project.polygon,
8the elevation data and a tsunami wave generated by s submarine mass failure.
9
10Bridgette Lewis, 2008
11"""
12
13#-------------------------------------------------------------------------------
14# Import necessary modules
15#-------------------------------------------------------------------------------
16
17# Standard modules
18import os
19import time
20from shutil import copy
21from os.path import dirname, basename
22from os import mkdir, access, F_OK, sep
23import sys
24
25# Related major packages
26from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files
27from anuga.shallow_water import smf
28
29# Application specific imports
30import project_slide_parameters              # Definition of file names and polygons
31import project_slide
32
33#-------------------------------------------------------------------------------
34# Set up scenario (tsunami_source is a callable object used with set_quantity)
35#-------------------------------------------------------------------------------
36from smf import slide_tsunami
37
38# effect on a3D and wavelength
39length = project_slide_parameters.birubi_length
40width = project_slide_parameters.birubi_width
41depth = project_slide_parameters.birubi_depth
42slope = project_slide_parameters.birubi_slope
43thickness = project_slide_parameters.birubi_thickness
44alpha = project_slide_parameters.birubi_alpha
45x0 = project_slide_parameters.slide_origin_birubi[0]
46y0 = project_slide_parameters.slide_origin_birubi[1]
47
48gamma = 1.85
49massco = 1.0
50dragco = 1.0
51
52# no effect on a3D and wavelength but used in Double Gaussian
53dx = 0.01
54kappa = 3.
55kappad = 0.8
56
57# this doesn't seem to apper anywhere in smf
58frictionco = 0.01
59
60# scaling for Double Gaussian function
61scale = 30. # Bridgette's fiddle
62
63fid = open('test.csv','w')
64s = 'parameter, wavelength, 3D_amp, eta_min\n'
65fid.write(s)
66
67for i in range(30):
68    scale = scale - 1.
69    #length = length + 10.
70    #depth = depth - 10.
71    tsunami_source = slide_tsunami(length=length,
72                                   width=width,
73                                   depth=depth,
74                                   slope=slope,
75                                   thickness=thickness, 
76                                   x0=x0, 
77                                   y0=y0, 
78                                   alpha=alpha,
79                                   gamma=gamma,
80                                   massco=massco,
81                                   dragco=dragco,
82                                   frictionco=frictionco,
83                                   dx=dx,
84                                   kappa=kappa,
85                                   kappad=kappad,
86                                   scale=scale,
87                                   verbose=False)
88
89    #parameter = depth
90    #parameter = length
91    parameter = scale
92
93    s = '%.6f, %.6f, %.6f, %.6f \n' %(parameter,tsunami_source.wavelength,tsunami_source.a3D,tsunami_source.nmin)
94    fid.write(s)
95
96fid.close()
Note: See TracBrowser for help on using the repository browser.