% Relation HQ et évolution de mu en fonctionde la pente amont
%
% Auteurs : Thibault Prévost.
% NOMA(s)   :0525 1500.
% Date    : 08/2021

%Rassemblement des données

DebitOpenfoam=[0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3];

Hau0=[1.8335 1.9457 2.0529 2.1484 2.2379 2.3272 2.4081 2.4826 2.5445 2.6085 2.6745 2.7215];
Hau1=[1.8324 1.9578 2.0655 2.1564 2.2372 2.3152 2.391 2.4589 2.5213 2.5865 2.6392 2.6961];
Hau2=[1.8337 1.9541 2.0597 2.1557 2.237 2.3132 2.3846 2.4465 2.5146 2.5801 2.631 2.6921];
Hau3=[1.8295 1.9464 2.0518 2.1518 2.2351 2.3111 2.3845 2.4532 2.5122 2.5789 2.6278 2.6883 ];

p=1.5;
H1=Hau1-p;
H2=Hau2-p;
H3=Hau3-p;

muH0 = [0.2931 0.3794 0.4119 0.4324 0.4452 0.4501 0.4565 0.4636 0.4759 0.4836 0.4878 0.5017];
muH1 = [0.2945 0.3644 0.3982 0.4245 0.4458 0.4601 0.4698 0.4809 0.4922 0.4984 0.5106 0.5178];
muH2 = [0.2928 0.3689 0.4044 0.4252 0.4460 0.4618 0.4749 0.4903 0.4970 0.5028 0.5162 0.5204];
muH3 = [0.2984 0.3785 0.4131 0.4290 0.4478 0.4636 0.4749 0.4852 0.4988 0.5036 0.5184 0.5229];


figure
plot(DebitOpenfoam,Hau0-p,'ro-')
hold on
plot(DebitOpenfoam,Hau1-p,'g*-')
hold on
plot(DebitOpenfoam,Hau2-p,'bx-')
hold on
plot(DebitOpenfoam,Hau3-p,'m+-')
xlabel('Debits [m^3/s]')
ylabel('Hauteur H [m]')
legend('Parement amont vertical','Pente 1/3','Pente 2/3','Pente 3/3','Location','southeast')
hold off


figure
plot(p./(Hau1-p), muH1./muH0,'g*-')
hold on
plot(p./(Hau2-p), muH2./muH0,'bx-')
hold on
plot(p./(Hau3-p), muH3./muH0,'m+-')
xlabel('p/H')
ylabel('coefficient \kappa')
legend('Pente 1/3','Pente 2/3','Pente 3/3','Location','northeast')
hold off


