Changeset 6086 for anuga_core/source/anuga/config.py
- Timestamp:
- Dec 19, 2008, 10:38:08 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/config.py
r5961 r6086 2 2 """ 3 3 4 # --------------------4 ################################################################################ 5 5 # Numerical constants 6 #-------------------- 7 epsilon = 1.0e-12 # Smallest number - used for safe division 8 max_float = 1.0e36 # Largest number - used to initialise (max, min) ranges 9 default_smoothing_parameter = 0.001 # Default alpha for penalised 10 # least squares fitting 11 12 single_precision = 1.0e-6 # Smallest single precision number 6 ################################################################################ 7 8 epsilon = 1.0e-12 # Smallest number - used for safe division 9 max_float = 1.0e36 # Largest number - used to initialise 10 # (max, min) ranges 11 default_smoothing_parameter = 0.001 # Default alpha for penalised 12 # least squares fitting 13 single_precision = 1.0e-6 # Smallest single precision number 13 14 velocity_protection = 1.0e-6 14 15 15 # -------------------------------------------16 # Standard filenames, directories and system 17 # parameters used by ANUGA18 #------------------------------------------- 16 ################################################################################ 17 # Standard filenames, directories and system parameters used by ANUGA 18 ################################################################################ 19 19 20 pmesh_filename = '.\\pmesh' 20 21 version_filename = 'stored_version_info.py' … … 28 29 major_revision = '1.0beta' 29 30 30 31 #------------------- 31 ################################################################################ 32 32 # Physical constants 33 #------------------- 33 ################################################################################ 34 34 35 manning = 0.03 # Manning's friction coefficient 35 36 #g = 9.80665 # Gravity - FIXME reinstate this and fix unit tests. … … 38 39 #The 'official' average is 9.80665 39 40 40 eta_w = 3.0e-3 #Wind stress coefficient 41 rho_a = 1.2e-3 #Atmospheric density 42 rho_w = 1023 #Fluid density [kg/m^3] (rho_w = 1023 for salt water) 43 44 45 #----------------------------------------------------- 41 eta_w = 3.0e-3 # Wind stress coefficient 42 rho_a = 1.2e-3 # Atmospheric density 43 rho_w = 1023 # Fluid density [kg/m^3] (rho_w = 1023 for salt water) 44 45 ################################################################################ 46 46 # Limiters - used with linear reconstruction of vertex 47 47 # values from centroid values 48 # -----------------------------------------------------48 ################################################################################ 49 49 50 50 # Betas [0;1] control the allowed steepness of gradient for second order … … 63 63 beta_vh_dry = 0.2 64 64 65 66 65 # Alpha_balance controls how limiters are balanced between deep and shallow. 67 # A large value will favour the deep water limiters, allowing the a closer hug to the coastline. 68 # This will minimise 'creep' but at the same time cause smaller time steps 66 # A large value will favour the deep water limiters, allowing the a closer hug 67 # to the coastline. This will minimise 'creep' but at the same time cause 68 # smaller time steps 69 69 # Range: 70 71 70 alpha_balance = 2.0 72 71 … … 85 84 # This option is good with tight_slope_limiters, especially for large domains. 86 85 use_centroid_velocities = True 87 88 86 89 87 # FIXME (Ole) Maybe get rid of order altogether and use beta_w … … 91 89 default_order = 1 92 90 93 94 #------------- 91 ################################################################################ 95 92 # Timestepping 96 # -------------93 ################################################################################ 97 94 98 95 CFL = 1.0 # CFL condition assigned to domain.CFL - controls timestep size 99 96 100 97 # Choose type of timestepping, 98 #timestepping_method = 'rk2' # 2nd Order TVD scheme 101 99 timestepping_method = 'euler' # 1st order euler 102 #timestepping_method = 'rk2' # 2nd Order TVD scheme103 100 104 101 # rk2 is a little more stable than euler, so rk2 timestepping … … 109 106 beta_rk2 = 1.6 110 107 111 112 113 108 # Option to search for signatures where isolated triangles are 114 109 # responsible for a small global timestep. … … 116 111 # overall computation. 117 112 # This facility is experimental. 118 119 113 # protect_against_isolated_degenerate_timesteps = False 120 114 protect_against_isolated_degenerate_timesteps = False 121 115 122 123 116 min_timestep = 1.0e-6 # Minimal timestep accepted in ANUGA 124 117 max_timestep = 1.0e+3 125 max_smallsteps = 50 # Max number of degenerate steps allowed b4 trying first order 126 127 #Perhaps minimal timestep could be based on the geometry as follows: 128 #Define maximal possible speed in open water v_max, e.g. 500m/s (soundspeed?) 129 #Then work out minimal internal distance in mesh r_min and set 130 #min_timestep = r_min/v_max 131 # 132 #Max speeds are calculated in the flux function as 133 # 134 #lambda = v +/- sqrt(gh) 118 max_smallsteps = 50 # Max number of degenerate steps allowed b4 119 # trying first order 120 121 # Perhaps minimal timestep could be based on the geometry as follows: 122 # Define maximal possible speed in open water v_max, e.g. 500m/s (soundspeed?) 123 # Then work out minimal internal distance in mesh r_min and set 124 # min_timestep = r_min/v_max 125 # 126 # Max speeds are calculated in the flux function as 127 # 128 # lambda = v +/- sqrt(gh) 135 129 # 136 130 # so with 500 m/s, h ~ 500^2/g = 2500 m well out of the domain of the 137 131 # shallow water wave equation 138 132 # 139 #The actual soundspeed can be as high as 1530m/s 140 #(see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html), 141 #but that would only happen with h>225000m in this equation. Why ? 142 #The maximal speed we specify is really related to the max speed 143 #of surface pertubation 144 # 145 #v_max = 100 #For use in domain_ext.c 146 #sound_speed = 500 147 148 149 #--------------------------------------------------- 133 # The actual soundspeed can be as high as 1530m/s 134 # (see http://staff.washington.edu/aganse/public.projects/clustering/clustering.html), 135 # but that would only happen with h>225000m in this equation. Why ? 136 # The maximal speed we specify is really related to the max speed 137 # of surface pertubation 138 # 139 # v_max = 100 #For use in domain_ext.c 140 # sound_speed = 500 141 142 ################################################################################ 150 143 # Ranges specific to the shallow water wave equation 151 # These control maximal and minimal values of 152 # quantities 153 #--------------------------------------------------- 144 # These control maximal and minimal values of quantities 145 ################################################################################ 154 146 155 147 # Water depth below which it is considered to be 0 in the model … … 163 155 maximum_allowed_speed = 0.0 # Maximal particle speed of water 164 156 #maximum_allowed_speed = 1.0 # Maximal particle speed of water 165 # Too large (100) creates 'flopping' water166 # Too small (0) creates 'creep'157 # Too large (100) creates 'flopping' water 158 # Too small (0) creates 'creep' 167 159 168 160 maximum_froude_number = 100.0 # To be used in limiters. 169 161 170 171 #------------------------------------------------------------ 162 ################################################################################ 172 163 # Performance parameters used to invoke various optimisations 173 # ------------------------------------------------------------164 ################################################################################ 174 165 175 166 use_extensions = True # Use C-extensions 176 use_psyco = True # Use psyco optimisations167 use_psyco = True # Use psyco optimisations 177 168 178 169 optimise_dry_cells = True # Exclude dry and still cells from flux computation 179 170 optimised_gradient_limiter = True # Use hardwired gradient limiter 180 use_edge_limiter = False # The edge limiter is better, but most runs have been using vertex limiting. Validations passed with this one True 9th May 2008, but many unit tests need backward compatibility flag set FIXME(Ole). 171 use_edge_limiter = False # The edge limiter is better, but most runs have been 172 # using vertex limiting. Validations passed with this 173 # one True 9th May 2008, but many unit tests need 174 # backward compatibility flag set FIXME(Ole). 181 175 182 176 points_file_block_line_size = 500 # Number of lines read in from a points file 183 177 # when blocking 184 178 185 186 187 188 189 190 179 ################################################################################ 180 # Dynamically-defined constants. 181 ################################################################################ 182 183 # Determine if we can read/write large NetCDF files 184 185 netcdf_mode_w = 'w' 186 netcdf_mode_a = 'a' 187 netcdf_mode_r = 'r' 188 189 try: 190 import tempfile 191 from Scientific.IO.NetCDF import NetCDFFile 192 193 fname = tempfile.mktemp() 194 fid = NetCDFFile(fname, netcdf_mode_w) 195 fid.close() 196 netcdf_mode_w = 'wl' 197 # log('Using NetCDF large file mode') 198 except IOError: 199 pass 200
Note: See TracChangeset
for help on using the changeset viewer.