1 | """Module where global model parameters are set |
---|
2 | """ |
---|
3 | |
---|
4 | epsilon = 1.0e-12 |
---|
5 | |
---|
6 | default_boundary_tag = 'exterior' |
---|
7 | |
---|
8 | |
---|
9 | time_format = '%d/%m/%y %H:%M:%S' |
---|
10 | |
---|
11 | min_timestep = 1.0e-6 #Should be computed based on geometry |
---|
12 | max_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 | |
---|
32 | v_max = 100 #For use in domain_ext.c |
---|
33 | sound_speed = 500 |
---|
34 | |
---|
35 | |
---|
36 | max_smallsteps = 50 #Max number of degenerate steps allowed b4 trying first order |
---|
37 | |
---|
38 | g = 9.8 #Gravity |
---|
39 | manning = 0.3 #Manning's friction coefficient |
---|
40 | |
---|
41 | |
---|
42 | eta_w = 3.0e-3 #Wind stress coefficient |
---|
43 | rho_a = 1.2e-3 #Atmospheric density |
---|
44 | rho_w = 1023 #Fluid density [kg/m^3] (rho_w = 1023 for salt water) |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | beta = 0.9 #]0;1] (e.g. 0.9). 1 allows the steepest gradients, |
---|
52 | #lower values are the more conservative |
---|
53 | #the limiter being a first order method. |
---|
54 | |
---|
55 | pmesh_filename = '.\\pmesh' |
---|
56 | |
---|
57 | |
---|
58 | import os, sys |
---|
59 | |
---|
60 | if sys.platform == 'win32': |
---|
61 | data_dir = 'C:\grohm_output' |
---|
62 | else: |
---|
63 | data_dir = os.path.expanduser('~'+os.sep+'grohm_output') |
---|
64 | |
---|
65 | |
---|
66 | |
---|
67 | use_extensions = True #Try to use C-extensions |
---|
68 | #use_extensions = False #Do not use C-extensions |
---|
69 | |
---|
70 | use_psyco = True #Use psyco optimisations |
---|
71 | #use_psyco = False #Do not use psyco optimisations |
---|
72 | |
---|
73 | |
---|
74 | #Specific to shallow water W.E. |
---|
75 | minimum_allowed_height = 1.0e-3 #Water depth below which it is considered to be 0 |
---|
76 | |
---|