source: inundation/ga/storm_surge/pyvolution/config.py @ 907

Last change on this file since 907 was 907, checked in by ole, 20 years ago

Addressed problem with artificial momentum generated by discontinuous water depths in the presence of steep slopes.
Now very shallow water is limited with a separate h-limiter controlled by beta_h
(see config.py) for details.

File size: 2.5 KB
RevLine 
[259]1"""Module where global model parameters are set
2"""
3
[449]4epsilon = 1.0e-12
[259]5
6default_boundary_tag = 'exterior'
7
8
[324]9time_format = '%d/%m/%y %H:%M:%S'
10
[259]11min_timestep = 1.0e-6 #Should be computed based on geometry
12max_timestep = 1000
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
26#(see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html), but that would only happen with h>225000m in this equation. Why ?
27#The maximal speed we specify is really related to the max speed
28#of surface pertubation
29
30
31
32v_max = 100 #For use in domain_ext.c
33sound_speed = 500
34
35
[443]36max_smallsteps = 50  #Max number of degenerate steps allowed b4 trying first order
[259]37
38g = 9.8        #Gravity
39manning = 0.3 #Manning's friction coefficient
40
41
[566]42eta_w = 3.0e-3 #Wind stress coefficient
43rho_a = 1.2e-3 #Atmospheric density
44rho_w = 1023   #Fluid density [kg/m^3] (rho_w = 1023 for salt water)
[259]45
[566]46
[907]47#Betas [0;1] control the allowed steepness of gradient for second order
48#extrapolations. Values of 1 allow the steepes gradients while
49#lower values are more conservative. Values of 0 correspond to
50#1'st order extrapolations.
51#
52# Large values of beta_h may cause simulations to require more timesteps
53# as surface will 'hug' closer to the bed.
54# Small values of beta_h will make code faster, but one may experience
55# artificial momenta caused by discontinuities in water depths in
56# the presence of steep slopes. One example of this would be
57# stationary water 'lapping' upwards to a higher point on the coast.
58#
59#
60#
61#There are separate betas for the w-limiter and the h-limiter
62#
63#
64#
65#
66#Good values are:
67#beta_w = 0.9
68#beta_h = 0.2
[566]69
[259]70
[907]71
72beta_w = 0.9
73beta_h = 0.2 
74
75
[259]76pmesh_filename = '.\\pmesh'
77
78
79import os, sys
80
81if sys.platform == 'win32':
[844]82    default_datadir = 'C:\grohm_output'
[259]83else:   
[844]84    default_datadir = os.path.expanduser('~'+os.sep+'grohm_output')
[259]85
86
87
88use_extensions = True   #Try to use C-extensions
89#use_extensions = False   #Do not use C-extensions
90
91use_psyco = True  #Use psyco optimisations
[273]92#use_psyco = False  #Do not use psyco optimisations
[259]93
94
95#Specific to shallow water W.E.
96minimum_allowed_height = 1.0e-3 #Water depth below which it is considered to be 0
[444]97
Note: See TracBrowser for help on using the repository browser.