Last change
on this file since 7837 was
7837,
checked in by mungkasi, 12 years ago

Again, adding some codes for 1d problems on debris avalanche and periodic waves.

File size:
761 bytes

Line  

1  from Numeric import zeros, Float, sqrt 

2  from config import g 

3  from scipy import sin, cos, tan, arcsin, arccos, arctan, pi 

4  

5  h_0 = 20.0 # depth upstream. Note that the depth downstream is 0.0 

6  L = 2000.0 # length of stream/domain 

7  n = 800 # number of cells 

8  cell_len = L/n # length of each cell 

9  points = zeros(n+1, Float) 

10  for i in range (n+1): 

11  points[i] = i*cell_len  0.5*L 

12  

13  

14  friction_slope = 0.05 #tan(delta) #0.05 # NOTE THAT friction_slope must less than bed_slope 

15  bed_slope = 0.1 #tan(theta) #0.1 # bottom slope, positive if it is increasing bottom. 

16  thet = arctan(bed_slope) 

17  

18  

19  F2 = g*cos(thet)*cos(thet)*friction_slope 

20  c0 = sqrt(g*h_0) # sound speed 

21  m = 1.0*g*bed_slope + F2 # auxiliary variable 

Note: See
TracBrowser
for help on using the repository browser.