source: anuga_work/development/anuga_1d/config.py @ 5740

Last change on this file since 5740 was 5740, checked in by steve, 16 years ago
File size: 2.9 KB
Line 
1"""Module where global model parameters are set for anuga_1d
2"""
3
4epsilon = 1.0e-12
5h0 = 1.0e-6
6
7default_boundary_tag = 'exterior'
8
9
10time_format = '%d/%m/%y %H:%M:%S'
11
12min_timestep = 1.0e-6 #Should be computed based on geometry
13max_timestep = 1000
14#This is how:
15#Define maximal possible speed in open water v_max, e.g. 500m/s (soundspeed?)
16#Then work out minimal internal distance in mesh r_min and set
17#min_timestep = r_min/v_max
18#
19#Max speeds are calculated in the flux function as
20#
21#lambda = v +/- sqrt(gh)
22#
23# so with 500 m/s, h ~ 500^2/g = 2500 m well out of the domain of the
24# shallow water wave equation
25#
26#The actual soundspeed can be as high as 1530m/s
27#(see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html),
28#but that would only happen with h>225000m in this equation. Why ?
29#The maximal speed we specify is really related to the max speed
30#of surface pertubation
31#
32
33
34v_max = 100 #For use in domain_ext.c
35sound_speed = 500
36
37
38max_smallsteps = 50  #Max number of degenerate steps allowed b4 trying first order
39
40manning = 0.3  #Manning's friction coefficient
41g = 9.8       #Gravity
42#g(phi) = 9780313 * (1 + 0.0053024 sin(phi)**2 - 0.000 0059 sin(2*phi)**2) micro m/s**2, where phi is the latitude
43#The 'official' average is 9.80665
44
45
46
47
48eta_w = 3.0e-3 #Wind stress coefficient
49rho_a = 1.2e-3 #Atmospheric density
50rho_w = 1023   #Fluid density [kg/m^3] (rho_w = 1023 for salt water)
51
52
53#Betas [0;1] control the allowed steepness of gradient for second order
54#extrapolations. Values of 1 allow the steepes gradients while
55#lower values are more conservative. Values of 0 correspond to
56#1'st order extrapolations.
57#
58# Large values of beta_h may cause simulations to require more timesteps
59# as surface will 'hug' closer to the bed.
60# Small values of beta_h will make code faster, but one may experience
61# artificial momenta caused by discontinuities in water depths in
62# the presence of steep slopes. One example of this would be
63# stationary water 'lapping' upwards to a higher point on the coast.
64#
65#
66#
67#There are separate betas for the w-limiter and the h-limiter
68#
69#
70#
71#
72#Good values are:
73#beta_w = 0.9
74#beta_h = 0.2
75
76
77
78beta_w = 1.5
79beta_h = 0.2
80timestepping_method = 'euler'
81
82CFL = 1.0  #FIXME (ole): Is this in use yet??
83           #(Steve) yes, change domain.CFL to
84           #make changes
85
86
87pmesh_filename = '.\\pmesh'
88
89
90import os, sys
91
92if sys.platform == 'win32':
93    #default_datadir = 'C:\grohm_output'
94    default_datadir = '.'
95else:
96    #default_datadir = os.path.expanduser('~'+os.sep+'grohm_output')
97    default_datadir = '.'
98
99
100use_extensions = True    #Try to use C-extensions
101#use_extensions = False   #Do not use C-extensions
102
103use_psyco = True  #Use psyco optimisations
104#use_psyco = False  #Do not use psyco optimisations
105
106
107optimised_gradient_limiter = True #Use hardwired gradient limiter
108
109#Specific to shallow water W.E.
110minimum_allowed_height = 1.0e-3 #Water depth below which it is considered to be 0
111maximum_allowed_speed = 100.0
Note: See TracBrowser for help on using the repository browser.