[7839] | 1 | """Module where global model parameters are set for anuga_1d |
---|
| 2 | """ |
---|
| 3 | |
---|
[7860] | 4 | epsilon = 1.0e-6 |
---|
| 5 | h0 = 1.0e-6 |
---|
[7839] | 6 | |
---|
| 7 | default_boundary_tag = 'exterior' |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | time_format = '%d/%m/%y %H:%M:%S' |
---|
| 11 | |
---|
| 12 | min_timestep = 1.0e-6 #Should be computed based on geometry |
---|
| 13 | max_timestep = 1.0e3 |
---|
| 14 | max_smallsteps = 50 # Max number of degenerate steps allowed b4 trying first order |
---|
| 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 | |
---|
| 36 | max_smallsteps = 50 #Max number of degenerate steps allowed b4 trying first order |
---|
| 37 | |
---|
| 38 | manning = 0.0 #Manning's friction coefficient |
---|
| 39 | g = 9.8 #Gravity |
---|
| 40 | #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 |
---|
| 41 | #The 'official' average is 9.80665 |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | |
---|
[7860] | 48 | beta_w = 1.0 |
---|
| 49 | beta_h = 1.0 |
---|
| 50 | timestepping_method = 'rk2' |
---|
[7839] | 51 | |
---|
| 52 | CFL = 1.0 #FIXME (ole): Is this in use yet?? |
---|
| 53 | #(Steve) yes, change domain.CFL to |
---|
| 54 | #make changes |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | pmesh_filename = '.\\pmesh' |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | import os, sys |
---|
| 61 | |
---|
| 62 | if sys.platform == 'win32': |
---|
| 63 | #default_datadir = 'C:\grohm_output' |
---|
| 64 | default_datadir = '.' |
---|
| 65 | else: |
---|
| 66 | #default_datadir = os.path.expanduser('~'+os.sep+'grohm_output') |
---|
| 67 | default_datadir = '.' |
---|
| 68 | |
---|
| 69 | |
---|
[7860] | 70 | #use_extensions = True #Try to use C-extensions |
---|
| 71 | ##use_extensions = False #Do not use C-extensions |
---|
| 72 | # |
---|
| 73 | #use_psyco = True #Use psyco optimisations |
---|
| 74 | ##use_psyco = False #Do not use psyco optimisations |
---|
| 75 | # |
---|
| 76 | # |
---|
| 77 | #optimised_gradient_limiter = True #Use hardwired gradient limiter |
---|
[7839] | 78 | |
---|
| 79 | #Specific to shallow water W.E. |
---|
| 80 | h_min = minimum_allowed_height = 1.0e-6 #1.0e-6 #Water depth below which it is considered to be 0 |
---|
| 81 | maximum_allowed_speed = 1000.0 |
---|