Last change
on this file since 8427 was
8427,
checked in by davies, 13 years ago
|
Adding the trapezoidal channel validation test, and editing the ANUGA manual
|
File size:
1.0 KB
|
Line | |
---|
1 | from scipy.special import jn |
---|
2 | from scipy import pi, sqrt, linspace, pi, sin, cos |
---|
3 | from config import g |
---|
4 | from Numeric import zeros, Float |
---|
5 | from rootsearch import * |
---|
6 | from bisect_function import * |
---|
7 | |
---|
8 | def j0(x): |
---|
9 | return jn(0.0, x) |
---|
10 | |
---|
11 | def j1(x): |
---|
12 | return jn(1.0, x) |
---|
13 | |
---|
14 | def j2(x): |
---|
15 | return jn(2.0, x) |
---|
16 | |
---|
17 | def j3(x): |
---|
18 | return jn(3.0, x) |
---|
19 | |
---|
20 | def jm1(x): |
---|
21 | return jn(-1.0, x) |
---|
22 | |
---|
23 | def jm2(x): |
---|
24 | return jn(-2.0, x) |
---|
25 | |
---|
26 | |
---|
27 | #DIMENSIONAL PARAMETERS |
---|
28 | L = 5e4 # Length of channel (m) |
---|
29 | h_0 = 5e2 # Height at origin when the water is still |
---|
30 | numb = 550#650 # initial Number of computational cells |
---|
31 | cell_len = 100.0 # is actually 1.1*L/numb |
---|
32 | Tp = 900.0#1020.0#3600.0#1020.0#900.0# Period of oscillation |
---|
33 | a = 1.0#5.0#1.0# # Amplitude at origin |
---|
34 | |
---|
35 | points = zeros(numb+2,Float) |
---|
36 | for i in range(numb+2): |
---|
37 | points[i] = i*cell_len - 0.5*cell_len |
---|
38 | N = len(points)-1 # Number of computational cells |
---|
39 | |
---|
40 | |
---|
41 | #DIMENSIONLESS PARAMETERS |
---|
42 | eps = a/h_0 |
---|
43 | T = Tp*sqrt(g*h_0)/L |
---|
44 | A = eps/j0(4.0*pi/T) |
---|
Note: See
TracBrowser
for help on using the repository browser.