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

Last change on this file since 4786 was 4786, checked in by ole, 16 years ago

Moved major revision info to anuga_config, updated scripts and made userguide include build number in its header.

File size: 4.9 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#FIXME (Ole): More of these may need to be moved to anuga_config.py
9time_format = '%d/%m/%y %H:%M:%S'
10
11min_timestep = 1.0e-6 #Should be computed based on geometry
12max_timestep = 1.0e+3
13#This is how:
14#Define maximal possible speed in open water v_max, e.g. 500m/s (soundspeed?)
15#Then work out minimal internal distance in mesh r_min and set
16#min_timestep = r_min/v_max
17#
18#Max speeds are calculated in the flux function as
19#
20#lambda = v +/- sqrt(gh)
21#
22# so with 500 m/s, h ~ 500^2/g = 2500 m well out of the domain of the
23# shallow water wave equation
24#
25#The actual soundspeed can be as high as 1530m/s
26#(see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html),
27#but that would only happen with h>225000m in this equation. Why ?
28#The maximal speed we specify is really related to the max speed
29#of surface pertubation
30#
31
32
33#v_max = 100 #For use in domain_ext.c
34sound_speed = 500
35
36
37max_smallsteps = 50  #Max number of degenerate steps allowed b4 trying first order
38
39manning = 0.03  #Manning's friction coefficient
40#g = 9.80665       #Gravity
41g = 9.8
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# NOTE (Ole): I believe this was addressed with the introduction of
66# tight_slope_limiters. I wish to retire the beta_? parameters.
67# Can you please let me know if you disagree?
68
69
70#There are separate betas for the w, uh, vh and h limiters
71#
72#Good values are:
73
74
75# I think these are better SR but they conflict with the unit tests!
76beta_w      = 1.0
77beta_w_dry  = 0.2
78beta_uh     = 1.0
79beta_uh_dry = 0.2
80beta_vh     = 1.0
81beta_vh_dry = 0.2
82beta_h      = 0.2
83
84# beta_h can be safely put to zero esp if we are using
85# tight_slope_limiters = 1. This will
86# also speed things up in general
87beta_h = 0.0
88
89
90# Alpha_balance controls how limiters are balanced between deep and shallow.
91# A large value will favour the deep water limiters, allowing the a closer hug to the coastline.
92# This will minimise 'creep' but at the same time cause smaller time steps
93# Range:
94
95alpha_balance = 2.0 
96
97# Flag use of new limiters.
98# tight_slope_limiters = 0 means use old limiters (e.g. for some tests)
99# tight_slope_limiters = 1 means use new limiters that hug the bathymetry closer
100tight_slope_limiters = 0
101
102
103
104CFL = 1.0  #FIXME (ole): Is this in use yet??
105           #(Steve) yes, change domain.CFL to
106           #make changes
107
108# Choose type of timestepping,
109timestepping_method = 'euler' # 1st order euler
110#timestepping_method = 'rk2'   # 2nd Order TVD scheme
111
112# Option to search for signatures where isolated triangles are
113# responsible for a small global timestep.
114# Treating these by limiting their momenta may help speed up the
115# overall computation.
116# This facility is experimental.
117protect_against_isolated_degenerate_timesteps = False
118
119pmesh_filename = '.\\pmesh'
120version_filename = 'stored_version_info.py'
121
122
123import os, sys
124
125if sys.platform == 'win32':
126    default_datadir = '.'
127else:
128    default_datadir = '.'
129
130
131use_extensions = True    #Try to use C-extensions
132#use_extensions = False   #Do not use C-extensions
133
134use_psyco = True  #Use psyco optimisations
135#use_psyco = False  #Do not use psyco optimisations
136
137
138optimise_dry_cells = True # Exclude dry and still cells from flux computation
139
140optimised_gradient_limiter = True # Use hardwired gradient limiter
141
142#Specific to shallow water W.E.
143minimum_allowed_height = 1.0e-3 #Water depth below which it is considered to be 0 in the model
144
145maximum_allowed_speed = 0.0 # Maximal particle speed of water
146#maximum_allowed_speed = 1.0 # Maximal particle speed of water
147                            # Too large (100) creates 'flopping' water
148                            # Too small (0) creates 'creep'
149
150
151minimum_storable_height = 1.0e-5 # Water depth below which it is *stored* as 0
152
153points_file_block_line_size = 500 # Number of lines read in from a points file
154                                  # when blocking
155
156umask = 002  # used to set file and directory permission created by anuga
157
158max_float = 1.0e36 # Largest number. Used to initialise (max, min) ranges.
159   
Note: See TracBrowser for help on using the repository browser.