source: anuga_core/source/anuga/config.py @ 3632

Last change on this file since 3632 was 3632, checked in by ole, 18 years ago

Changed gravity back to 9.8 as unit tests in shallow_water depend on it.
Change this later.

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