Line | |
---|
1 | from Numeric import Float, sqrt |
---|
2 | from numpy import zeros |
---|
3 | from config import g |
---|
4 | from scipy import sin, cos, tan, arcsin, arccos, arctan, pi |
---|
5 | |
---|
6 | h_0 = 5.0 |
---|
7 | h_1 = 10.0 |
---|
8 | L=2000.0 |
---|
9 | N=200 |
---|
10 | |
---|
11 | cell_len=L/N |
---|
12 | points=zeros(N+1, Float) |
---|
13 | for i in range(N+1): |
---|
14 | points[i]=i*cell_len |
---|
15 | #points[i] = i*cell_len - 0.5*L |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | #delt = 0.0 |
---|
20 | friction_slope = 0.0#0.05 #tan(delta) #0.05 # NOTE THAT friction_slope must less than bed_slope |
---|
21 | #thet = pi/36.0 |
---|
22 | bed_slope = 0.002 #tan(theta) #0.1 # bottom slope, positive if it is increasing bottom. |
---|
23 | thet = arctan(bed_slope) |
---|
24 | |
---|
25 | F2 = g*cos(thet)*cos(thet)*friction_slope |
---|
26 | c0 = sqrt(g*h_0) # sound speed |
---|
27 | m = -1.0*g*bed_slope + F2 # auxiliary variable |
---|
Note: See
TracBrowser
for help on using the repository browser.