Changeset 8157
- Timestamp:
- Mar 20, 2011, 9:42:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_validation/validation_tests/dam_break_analytical.py
r8156 r8157 29 29 Taken from formula (3.14) from Zoppou and Roberts SWW notes 30 30 """ 31 x = h2/h1 31 32 h21 = h2/h1 32 33 h01 = h0/h1 33 34 34 return x**3 -9.0*(x**2)*h01 +16.0*(x**(3/2))*h01 -x*h01*(h01+8.0) +h01**335 return h21**3 -9.0*(h21**2)*h01 +16.0*(h21**(1.5))*h01 -h21*h01*(h01+8.0) +h01**3 35 36 36 37 37 38 h0 = 1.0 38 h1 = 10.0 39 h1 = 2.0 40 41 h21 = 1.0 42 h01 = 0.5 43 44 print h21**3 - 9.0*(h21**2)*h01 + 16.0*(h21**(1.5))*h01 - h21*h01*(h01+8.0) + h01**3 45 46 h21 = 0.5 47 h01 = 0.5 48 49 print - 8.0*h21**3 + 16.0*h21**(2.5) -8*h21**2 50 39 51 40 52 n = 10 … … 54 66 print wu(h0), wu(h1) 55 67 56 #from scipy.optimize import brentq68 from scipy.optimize import brentq 57 69 58 #h2 = brentq(wu, h0,h1,disp=True)70 h2 = brentq(wu, h0,h1,disp=True) 59 71 60 72 #print h2, wu(h2)
Note: See TracChangeset
for help on using the changeset viewer.