main_macrorugo.sce 1.39 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Test des passes à macro rugosité pour JaLHyd
clear
sCurrentPath = get_absolute_file_path("main_macrorugo.sce");
getd(sCurrentPath);

// Tests parameters
ks = 0.01
Cd0=1.5
S = 0.05
C = 0.05;
D = 0.5;
sigma = 1;
B = 1
z_amont = 12.5;
long = 6;

// *****************************************************************************
printf("\n*** Emergent conditions ***\n")
// *****************************************************************************
h = 0.6
k = 0.8

// Test de find_U0_R0
Cf=2/(5.1*log10(h/ks-1)+6)^2
coeff_contraction=0.4*Cd0+0.7
res = find_U0_R0(2.58, h, C, D, sigma, Cd0, Cf, coeff_contraction, S)
printf("find_U0_R0=%f\n",res);

// Test de find_Q_nat2
[Q fVal] = fminsearch(list(find_Q_nat2, ks,D,k,Cd0,S,B,h,C,sigma,%f), 0.1);
printf("Qemerg=%f  fVal=%f\n",Q, fVal);
res = find_Q_nat2(Q,ks,D,k,Cd0,S,B,h,C,sigma,%t)
printf("find_Q_nat2=%f\n",res);
macrorugo_resultComp(z_amont, S, long, Q, B, h, C, Cd0, k, D)


// *****************************************************************************
printf("\n*** Submerged conditions ***\n")
// *****************************************************************************
k = 0.6
h = 0.8

[Q fVal] = fminsearch(list(find_Q_nat2, ks,D,k,Cd0,S,B,h,C,sigma,%f), 0.1);
printf("Qsubmerg=%f  fVal=%f\n",Q, fVal);
res = find_Q_nat2(Q,ks,D,k,Cd0,S,B,h,C,sigma,%t)
printf("find_Q_nat2=%f\n",res);
macrorugo_resultComp(z_amont, S, long, Q, B, h, C, Cd0, k, D)