Changeset 2945
- Timestamp:
- May 23, 2006, 2:25:03 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/smf.py
r2869 r2945 346 346 kappa = self.kappa 347 347 kappad = self.kappad 348 amin = self.find_min(x0,wa,kappad,kappa )348 amin = self.find_min(x0,wa,kappad,kappa,dx,am) 349 349 350 350 #double Gaussian calculation assumes water displacement is oriented … … 363 363 for i in range(N): 364 364 try: 365 z[i] = -am / ( amin*(cosh(kappa*(yr[i]-y0)/(wi+wa)))**2) \365 z[i] = -am / ((cosh(kappa*(yr[i]-y0)/(wi+wa)))**2) \ 366 366 * (exp(-((xr[i]-x0)/wa)**2) - \ 367 367 kappad*exp(-((xr[i]-dx-x0)/wa)**2)) … … 394 394 self.dx = 2.0 * (c * sqrt(-log((zsmall/a),e))) / 5.0 395 395 396 def find_min(self, x0, wa, kappad, kappa ):396 def find_min(self, x0, wa, kappad, kappa, dx, am): 397 397 """Determine eta_min to scale eta(x,y) 398 398 """ … … 400 400 from math import exp, cosh 401 401 402 step = 0.001402 step = 10.0 403 403 x = x0 404 404 deriv = 10.0 405 405 tol = 0.001 406 count_max = 100000 406 count_max = 1000000 407 407 c = 0 408 408
Note: See TracChangeset
for help on using the changeset viewer.