Commit 22e9a7d7 authored by Grand Francois's avatar Grand Francois
Browse files

remous : ajout des tests par la méthode d'Euler sur la section rectangulaire...

remous : ajout des tests par la méthode d'Euler sur la section rectangulaire (données venant de la version PHP)
Showing with 275 additions and 3 deletions
+275 -3
...@@ -74,6 +74,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -74,6 +74,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 100.000: 6, 95.000: 5.75, 90.000: 5.5, 85.000: 5.25, 80.000: 4.999, 75.000: 4.749, 70.000: 4.499, 65.000: 4.249, 60.000: 3.998, 55.000: 3.748, 50.000: 3.498, 45.000: 3.248, 40.000: 2.997, 35.000: 2.747, 30.000: 2.497, 25.000: 2.246, 20.000: 1.995, 15.000: 1.744, 10.000: 1.491, 5.000: 1.237, 0.000: 0.977 }; let f = { 100.000: 6, 95.000: 5.75, 90.000: 5.5, 85.000: 5.25, 80.000: 4.999, 75.000: 4.749, 70.000: 4.499, 65.000: 4.249, 60.000: 3.998, 55.000: 3.748, 50.000: 3.498, 45.000: 3.248, 40.000: 2.997, 35.000: 2.747, 30.000: 2.497, 25.000: 2.246, 20.000: 1.995, 15.000: 1.744, 10.000: 1.491, 5.000: 1.237, 0.000: 0.977 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -109,6 +111,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -109,6 +111,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = {}; let f = {};
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -144,6 +148,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -144,6 +148,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 100.000: 1, 95.000: 0.729 }; let f = { 100.000: 1, 95.000: 0.729 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -178,6 +184,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -178,6 +184,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 5.500: 1, 5.250: 0.987, 5.000: 0.974, 4.750: 0.96, 4.500: 0.947, 4.250: 0.933, 4.000: 0.92, 3.750: 0.906, 3.500: 0.893, 3.250: 0.88, 3.000: 0.866, 2.750: 0.853, 2.500: 0.839, 2.250: 0.826, 2.000: 0.812, 1.750: 0.798, 1.500: 0.784, 1.250: 0.77, 1.000: 0.756, 0.750: 0.742, 0.500: 0.727, 0.250: 0.712, 0.000: 0.15 }; let f = { 5.500: 1, 5.250: 0.987, 5.000: 0.974, 4.750: 0.96, 4.500: 0.947, 4.250: 0.933, 4.000: 0.92, 3.750: 0.906, 3.500: 0.893, 3.250: 0.88, 3.000: 0.866, 2.750: 0.853, 2.500: 0.839, 2.250: 0.826, 2.000: 0.812, 1.750: 0.798, 1.500: 0.784, 1.250: 0.77, 1.000: 0.756, 0.750: 0.742, 0.500: 0.727, 0.250: 0.712, 0.000: 0.15 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -212,6 +220,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -212,6 +220,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 100.000: 0.403, 95.000: 0.524, 90.000: 0.558, 85.000: 0.584, 80.000: 0.604, 75.000: 0.621, 70.000: 0.637, 65.000: 0.65, 60.000: 0.662, 55.000: 0.673, 50.000: 0.684, 45.000: 0.693, 40.000: 0.701, 35.000: 0.709, 30.000: 0.717, 25.000: 0.725, 20.000: 0.731, 15.000: 0.738, 10.000: 0.744, 5.000: 0.75, 0.000: 0.755 }; let f = { 100.000: 0.403, 95.000: 0.524, 90.000: 0.558, 85.000: 0.584, 80.000: 0.604, 75.000: 0.621, 70.000: 0.637, 65.000: 0.65, 60.000: 0.662, 55.000: 0.673, 50.000: 0.684, 45.000: 0.693, 40.000: 0.701, 35.000: 0.709, 30.000: 0.717, 25.000: 0.725, 20.000: 0.731, 15.000: 0.738, 10.000: 0.744, 5.000: 0.75, 0.000: 0.755 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -246,6 +256,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -246,6 +256,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 100.000: 0.403, 95.000: 0.524, 90.000: 0.558, 85.000: 0.584, 80.000: 0.604, 75.000: 0.621, 70.000: 0.637, 65.000: 0.65, 60.000: 0.662, 55.000: 0.673, 50.000: 0.684, 45.000: 0.693, 40.000: 0.701, 35.000: 0.709, 30.000: 0.717, 25.000: 0.725, 20.000: 0.731, 15.000: 0.738, 10.000: 0.744, 5.000: 0.75, 0.000: 0.15 }; let f = { 100.000: 0.403, 95.000: 0.524, 90.000: 0.558, 85.000: 0.584, 80.000: 0.604, 75.000: 0.621, 70.000: 0.637, 65.000: 0.65, 60.000: 0.662, 55.000: 0.673, 50.000: 0.684, 45.000: 0.693, 40.000: 0.701, 35.000: 0.709, 30.000: 0.717, 25.000: 0.725, 20.000: 0.731, 15.000: 0.738, 10.000: 0.744, 5.000: 0.75, 0.000: 0.15 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -281,6 +293,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -281,6 +293,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
// //dx = 0.05 // //dx = 0.05
// let f = { 5.000: 0.403, 4.950: 0.414, 4.900: 0.419, 4.850: 0.423, 4.800: 0.426, 4.750: 0.429, 4.700: 0.432, 4.650: 0.434, 4.600: 0.436, 4.550: 0.438, 4.500: 0.439, 4.450: 0.441, 4.400: 0.443, 4.350: 0.445, 4.300: 0.446, 4.250: 0.447, 4.200: 0.449, 4.150: 0.45, 4.100: 0.451, 4.050: 0.452, 4.000: 0.454, 3.950: 0.455, 3.900: 0.456, 3.850: 0.457, 3.800: 0.458, 3.750: 0.46, 3.700: 0.461, 3.650: 0.462, 3.600: 0.463, 3.550: 0.465, 3.500: 0.466, 3.450: 0.467, 3.400: 0.468, 3.350: 0.469, 3.300: 0.469, 3.250: 0.47, 3.200: 0.471, 3.150: 0.471, 3.100: 0.472, 3.050: 0.472, 3.000: 0.473, 2.950: 0.474, 2.900: 0.474, 2.850: 0.475, 2.800: 0.476, 2.750: 0.476, 2.700: 0.477, 2.650: 0.477, 2.600: 0.478, 2.550: 0.479, 2.500: 0.479, 2.450: 0.48, 2.400: 0.48, 2.350: 0.481, 2.300: 0.482, 2.250: 0.482, 2.200: 0.483, 2.150: 0.483, 2.100: 0.484, 2.050: 0.485, 2.000: 0.485, 1.950: 0.486, 1.900: 0.486, 1.850: 0.487, 1.800: 0.488, 1.750: 0.488, 1.700: 0.489, 1.650: 0.49, 1.600: 0.49, 1.550: 0.491, 1.500: 0.491, 1.450: 0.492, 1.400: 0.493, 1.350: 0.493, 1.300: 0.494, 1.250: 0.494, 1.200: 0.495, 1.150: 0.496, 1.100: 0.496, 1.050: 0.497, 1.000: 0.497, 0.950: 0.498, 0.900: 0.499, 0.850: 0.499, 0.800: 0.5, 0.750: 0.501, 0.700: 0.501, 0.650: 0.502, 0.600: 0.502, 0.550: 0.503, 0.500: 0.504, 0.450: 0.504, 0.400: 0.505, 0.350: 0.505, 0.300: 0.506, 0.250: 0.507, 0.200: 0.507, 0.150: 0.508, 0.100: 0.508, 0.050: 0.509, 0.000: 0.01 }; // let f = { 5.000: 0.403, 4.950: 0.414, 4.900: 0.419, 4.850: 0.423, 4.800: 0.426, 4.750: 0.429, 4.700: 0.432, 4.650: 0.434, 4.600: 0.436, 4.550: 0.438, 4.500: 0.439, 4.450: 0.441, 4.400: 0.443, 4.350: 0.445, 4.300: 0.446, 4.250: 0.447, 4.200: 0.449, 4.150: 0.45, 4.100: 0.451, 4.050: 0.452, 4.000: 0.454, 3.950: 0.455, 3.900: 0.456, 3.850: 0.457, 3.800: 0.458, 3.750: 0.46, 3.700: 0.461, 3.650: 0.462, 3.600: 0.463, 3.550: 0.465, 3.500: 0.466, 3.450: 0.467, 3.400: 0.468, 3.350: 0.469, 3.300: 0.469, 3.250: 0.47, 3.200: 0.471, 3.150: 0.471, 3.100: 0.472, 3.050: 0.472, 3.000: 0.473, 2.950: 0.474, 2.900: 0.474, 2.850: 0.475, 2.800: 0.476, 2.750: 0.476, 2.700: 0.477, 2.650: 0.477, 2.600: 0.478, 2.550: 0.479, 2.500: 0.479, 2.450: 0.48, 2.400: 0.48, 2.350: 0.481, 2.300: 0.482, 2.250: 0.482, 2.200: 0.483, 2.150: 0.483, 2.100: 0.484, 2.050: 0.485, 2.000: 0.485, 1.950: 0.486, 1.900: 0.486, 1.850: 0.487, 1.800: 0.488, 1.750: 0.488, 1.700: 0.489, 1.650: 0.49, 1.600: 0.49, 1.550: 0.491, 1.500: 0.491, 1.450: 0.492, 1.400: 0.493, 1.350: 0.493, 1.300: 0.494, 1.250: 0.494, 1.200: 0.495, 1.150: 0.496, 1.100: 0.496, 1.050: 0.497, 1.000: 0.497, 0.950: 0.498, 0.900: 0.499, 0.850: 0.499, 0.800: 0.5, 0.750: 0.501, 0.700: 0.501, 0.650: 0.502, 0.600: 0.502, 0.550: 0.503, 0.500: 0.504, 0.450: 0.504, 0.400: 0.505, 0.350: 0.505, 0.300: 0.506, 0.250: 0.507, 0.200: 0.507, 0.150: 0.508, 0.100: 0.508, 0.050: 0.509, 0.000: 0.01 };
// compObject("Yfluvial", res["flu"], f, 0.03); // compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -327,6 +341,8 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -327,6 +341,8 @@ describe('Class Remous / section rectangulaire :', () => {
let res = rem.calculRemous(undefined); let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode trapèzes
let f = { 5.0000: 0.403, 4.9500: 0.415, 4.9000: 0.42, 4.8500: 0.423, 4.8000: 0.426, 4.7500: 0.429, 4.7000: 0.432, 4.6500: 0.434, 4.6000: 0.436, 4.5500: 0.438, 4.5000: 0.44, 4.4500: 0.441, 4.4000: 0.443, 4.3500: 0.445, 4.3000: 0.446, 4.2500: 0.448, 4.2000: 0.449, 4.1500: 0.45, 4.1000: 0.452, 4.0500: 0.453, 4.0000: 0.454, 3.9500: 0.455, 3.9000: 0.457, 3.8500: 0.458, 3.8000: 0.459, 3.7500: 0.46, 3.7000: 0.461, 3.6500: 0.462, 3.6000: 0.463, 3.5500: 0.464, 3.5000: 0.465, 3.4500: 0.466, 3.4000: 0.467, 3.3500: 0.468, 3.3000: 0.469, 3.2500: 0.47, 3.2000: 0.471, 3.1500: 0.471, 3.1000: 0.472, 3.0500: 0.473, 3.0000: 0.474, 2.9500: 0.475, 2.9000: 0.476, 2.8500: 0.476, 2.8000: 0.477, 2.7500: 0.478, 2.7000: 0.479, 2.6500: 0.479, 2.6000: 0.48, 2.5500: 0.481, 2.5000: 0.482, 2.4500: 0.482, 2.4000: 0.483, 2.3500: 0.484, 2.3000: 0.484, 2.2500: 0.485, 2.2000: 0.486, 2.1500: 0.487, 2.1000: 0.487, 2.0500: 0.488, 2.0000: 0.489, 1.9500: 0.489, 1.9000: 0.49, 1.8500: 0.49, 1.8000: 0.491, 1.7500: 0.492, 1.7000: 0.492, 1.6500: 0.493, 1.6000: 0.494, 1.5500: 0.494, 1.5000: 0.495, 1.4500: 0.495, 1.4000: 0.496, 1.3500: 0.497, 1.3000: 0.497, 1.2500: 0.498, 1.2000: 0.498, 1.1500: 0.499, 1.1000: 0.499, 1.0500: 0.5, 1.0000: 0.5, 0.9500: 0.501, 0.9000: 0.502, 0.8500: 0.502, 0.8000: 0.503, 0.7500: 0.503, 0.7000: 0.504, 0.6500: 0.504, 0.6000: 0.505, 0.5500: 0.505, 0.5000: 0.506, 0.4500: 0.506, 0.4000: 0.507, 0.3500: 0.507, 0.3000: 0.508, 0.2500: 0.508, 0.2000: 0.509, 0.1500: 0.509, 0.1000: 0.51, 0.0500: 0.51, 0.0000: 0.01 }; let f = { 5.0000: 0.403, 4.9500: 0.415, 4.9000: 0.42, 4.8500: 0.423, 4.8000: 0.426, 4.7500: 0.429, 4.7000: 0.432, 4.6500: 0.434, 4.6000: 0.436, 4.5500: 0.438, 4.5000: 0.44, 4.4500: 0.441, 4.4000: 0.443, 4.3500: 0.445, 4.3000: 0.446, 4.2500: 0.448, 4.2000: 0.449, 4.1500: 0.45, 4.1000: 0.452, 4.0500: 0.453, 4.0000: 0.454, 3.9500: 0.455, 3.9000: 0.457, 3.8500: 0.458, 3.8000: 0.459, 3.7500: 0.46, 3.7000: 0.461, 3.6500: 0.462, 3.6000: 0.463, 3.5500: 0.464, 3.5000: 0.465, 3.4500: 0.466, 3.4000: 0.467, 3.3500: 0.468, 3.3000: 0.469, 3.2500: 0.47, 3.2000: 0.471, 3.1500: 0.471, 3.1000: 0.472, 3.0500: 0.473, 3.0000: 0.474, 2.9500: 0.475, 2.9000: 0.476, 2.8500: 0.476, 2.8000: 0.477, 2.7500: 0.478, 2.7000: 0.479, 2.6500: 0.479, 2.6000: 0.48, 2.5500: 0.481, 2.5000: 0.482, 2.4500: 0.482, 2.4000: 0.483, 2.3500: 0.484, 2.3000: 0.484, 2.2500: 0.485, 2.2000: 0.486, 2.1500: 0.487, 2.1000: 0.487, 2.0500: 0.488, 2.0000: 0.489, 1.9500: 0.489, 1.9000: 0.49, 1.8500: 0.49, 1.8000: 0.491, 1.7500: 0.492, 1.7000: 0.492, 1.6500: 0.493, 1.6000: 0.494, 1.5500: 0.494, 1.5000: 0.495, 1.4500: 0.495, 1.4000: 0.496, 1.3500: 0.497, 1.3000: 0.497, 1.2500: 0.498, 1.2000: 0.498, 1.1500: 0.499, 1.1000: 0.499, 1.0500: 0.5, 1.0000: 0.5, 0.9500: 0.501, 0.9000: 0.502, 0.8500: 0.502, 0.8000: 0.503, 0.7500: 0.503, 0.7000: 0.504, 0.6500: 0.504, 0.6000: 0.505, 0.5500: 0.505, 0.5000: 0.506, 0.4500: 0.506, 0.4000: 0.507, 0.3500: 0.507, 0.3000: 0.508, 0.2500: 0.508, 0.2000: 0.509, 0.1500: 0.509, 0.1000: 0.51, 0.0500: 0.51, 0.0000: 0.01 };
compObject("Yfluvial", res["flu"], f, 0.03); compObject("Yfluvial", res["flu"], f, 0.03);
...@@ -337,4 +353,260 @@ describe('Class Remous / section rectangulaire :', () => { ...@@ -337,4 +353,260 @@ describe('Class Remous / section rectangulaire :', () => {
compArray("abcisses", res["trX"], x); compArray("abcisses", res["trX"], x);
}); });
}); });
describe('méthode Euler explicite :', () => {
it("forte pente, ressaut avant l'amont", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.05, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
5, // Dx=Pas d'espace
100 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.15, // Yamont = tirant amont
6, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 100.000: 6, 95.000: 5.75, 90.000: 5.5, 85.000: 5.25, 80.000: 5, 75.000: 4.75, 70.000: 4.5, 65.000: 4.25, 60.000: 4, 55.000: 3.749, 50.000: 3.499, 45.000: 3.249, 40.000: 2.999, 35.000: 2.749, 30.000: 2.498, 25.000: 2.247, 20.000: 1.996, 15.000: 1.745, 10.000: 1.493, 5.000: 1.24, 0.000: 0.983 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = {};
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
compArray("abcisses", res["trX"], x);
});
it("forte pente, ressaut après l'aval", () => {
// TODO algo à reprendre
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.05, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
5, // Dx=Pas d'espace
100 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.15, // Yamont = tirant amont
0.45, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = {};
compObject("Yfluvial", res["flu"], f, 0.03);
let t = { 0.000: 0.15, 5.000: 0.207, 10.000: 0.241, 15.000: 0.252, 20.000: 0.253, 25.000: 0.253, 30.000: 0.253, 35.000: 0.253, 40.000: 0.253, 45.000: 0.253, 50.000: 0.253, 55.000: 0.253, 60.000: 0.253, 65.000: 0.253, 70.000: 0.253, 75.000: 0.253, 80.000: 0.253, 85.000: 0.253, 90.000: 0.253, 95.000: 0.253, 100.000: 0.45 };
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
compArray("abcisses", res["trX"], x);
});
it("forte pente, ressaut (1 point) à l'intérieur du bief", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.05, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
5, // Dx=Pas d'espace
100 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.15, // Yamont = tirant amont
1, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 100.000: 1, 95.000: 0.737, 90.000: 0.451 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = { 0.000: 0.15, 5.000: 0.207, 10.000: 0.241, 15.000: 0.252, 20.000: 0.253, 25.000: 0.253, 30.000: 0.253, 35.000: 0.253, 40.000: 0.253, 45.000: 0.253, 50.000: 0.253, 55.000: 0.253, 60.000: 0.253, 65.000: 0.253, 70.000: 0.253, 75.000: 0.253, 80.000: 0.253, 85.000: 0.253, 90.000: 0.451 };
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
compArray("abcisses", res["trX"], x);
});
it("forte pente, ressaut (plusieurs points) à l'intérieur du bief", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.05, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
0.25, // Dx=Pas d'espace
5.5 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.15, // Yamont = tirant amont
1, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 5.500: 1, 5.250: 0.987, 5.000: 0.974, 4.750: 0.96, 4.500: 0.947, 4.250: 0.934, 4.000: 0.921, 3.750: 0.907, 3.500: 0.894, 3.250: 0.881, 3.000: 0.867, 2.750: 0.854, 2.500: 0.84, 2.250: 0.826, 2.000: 0.813, 1.750: 0.799, 1.500: 0.785, 1.250: 0.771, 1.000: 0.757, 0.750: 0.743, 0.500: 0.729, 0.250: 0.714, 0.000: 0.15 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = { 0.000: 0.15, 0.250: 0.153, 0.500: 0.156, 0.750: 0.158, 1.000: 0.161, 1.250: 0.164, 1.500: 0.166, 1.750: 0.169, 2.000: 0.172, 2.250: 0.174, 2.500: 0.177, 2.750: 0.179, 3.000: 0.181, 3.250: 0.184, 3.500: 0.186, 3.750: 0.907 };
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 0.250, 0.500, 0.750, 1.000, 1.250, 1.500, 1.750, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500, 3.750, 4.000, 4.250, 4.500, 4.750, 5.000, 5.250, 5.500];
compArray("abcisses", res["trX"], x);
});
it("faible pente, ressaut avant l'amont", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.001, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
5, // Dx=Pas d'espace
100 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.3, // Yamont = tirant amont
0.403, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 100.000: 0.403, 95.000: 17.456, 90.000: 17.451, 85.000: 17.446, 80.000: 17.441, 75.000: 17.436, 70.000: 17.431, 65.000: 17.426, 60.000: 17.421, 55.000: 17.416, 50.000: 17.411, 45.000: 17.406, 40.000: 17.401, 35.000: 17.396, 30.000: 17.391, 25.000: 17.386, 20.000: 17.381, 15.000: 17.376, 10.000: 17.371, 5.000: 17.366, 0.000: 17.361 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = {};
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
compArray("abcisses", res["trX"], x);
});
it("faible pente, ressaut (1 point) à l'intérieur du bief", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.001, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
5, // Dx=Pas d'espace
100 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.15, // Yamont = tirant amont
0.403, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 100.000: 0.403, 95.000: 17.456, 90.000: 17.451, 85.000: 17.446, 80.000: 17.441, 75.000: 17.436, 70.000: 17.431, 65.000: 17.426, 60.000: 17.421, 55.000: 17.416, 50.000: 17.411, 45.000: 17.406, 40.000: 17.401, 35.000: 17.396, 30.000: 17.391, 25.000: 17.386, 20.000: 17.381, 15.000: 17.376, 10.000: 17.371, 5.000: 17.366, 0.000: 17.361 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = {};
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 5.000, 10.000, 15.000, 20.000, 25.000, 30.000, 35.000, 40.000, 45.000, 50.000, 55.000, 60.000, 65.000, 70.000, 75.000, 80.000, 85.000, 90.000, 95.000, 100.000];
compArray("abcisses", res["trX"], x);
});
it("faible pente, ressaut (plusieurs points) à l'intérieur du bief", () => {
let prms = new ParamsSectionRectang(undefined, // tirant d'eau
2.5, // largeur de fond
40, // Ks=Strickler
2, // Q=Débit
0.001, // If=pente du fond
precDist, // précision
1, // YB=hauteur de berge
undefined,// YCL=Condition limite en cote à l'amont ou à l'aval
// 0.05, // Dx=Pas d'espace
0.25, // Dx=Pas d'espace
5 // Long= Longueur du bief
);
let sect = new cSnRectang(undefined, prms);
let prem = new CourbeRemousParams(0.01, // Yamont = tirant amont
0.403, // Yaval = tirant aval
MethodeResolution.EulerExplicite
);
let rem = new CourbeRemous(sect, prem);
let res = rem.calculRemous(undefined);
// données de validation : version PHP (Oct 2017) méthode Euler
let f = { 5.000: 0.403, 4.750: 1.256, 4.500: 1.256, 4.250: 1.255, 4.000: 1.255, 3.750: 1.255, 3.500: 1.255, 3.250: 1.255, 3.000: 1.255, 2.750: 1.255, 2.500: 1.254, 2.250: 1.254, 2.000: 1.254, 1.750: 1.254, 1.500: 1.254, 1.250: 1.254, 1.000: 1.254, 0.750: 1.253, 0.500: 1.253, 0.250: 1.253, 0.000: 1.253 };
compObject("Yfluvial", res["flu"], f, 0.03);
let t = {};
compObject("Ytorrentiel", res["tor"], t, 0.03);
let x = [0.000, 0.250, 0.500, 0.750, 1.000, 1.250, 1.500, 1.750, 2.000, 2.250, 2.500, 2.750, 3.000, 3.250, 3.500, 3.750, 4.000, 4.250, 4.500, 4.750, 5.000];
compArray("abcisses", res["trX"], x);
});
});
}); });
...@@ -95,7 +95,7 @@ export class CourbeRemous extends Nub { ...@@ -95,7 +95,7 @@ export class CourbeRemous extends Nub {
// constructor(s: acSection, crp: CourbeRemousParams, log: cLog) { // constructor(s: acSection, crp: CourbeRemousParams, log: cLog) {
constructor(s: acSection, crp: CourbeRemousParams) { constructor(s: acSection, crp: CourbeRemousParams) {
super(s.prms, true); super(s.prms, false);
this.Sn = s; this.Sn = s;
this.prmSect = s.prms; this.prmSect = s.prms;
this.prmCR = crp; this.prmCR = crp;
...@@ -337,7 +337,7 @@ export class CourbeRemous extends Nub { ...@@ -337,7 +337,7 @@ export class CourbeRemous extends Nub {
// if (end($trY) > $this ->oSect ->rHautNormale xor $rY > $this ->oSect ->rHautNormale) { // if (end($trY) > $this ->oSect ->rHautNormale xor $rY > $this ->oSect ->rHautNormale) {
if (XOR(lastY > this.Sn.HautNormale, rY.vCalc > this.Sn.HautNormale)) { if (XOR(lastY > this.Sn.HautNormale, rY.vCalc > this.Sn.HautNormale)) {
// $this ->oLog ->Add(_T('hydraulic:pente_forte').' '.$x. ' m ('._T('hydraulic:reduire_pas').')', true); // $this ->oLog ->Add(_T('hydraulic:pente_forte').' '.$x. ' m ('._T('hydraulic:reduire_pas').')', true);
console.log("La pente de la ligne d'eau est trop forte à l'abscisse " + x + " m (Il faudrait réduire le pas de discrétisation)"); this.debug("La pente de la ligne d'eau est trop forte à l'abscisse " + x + " m (Il faudrait réduire le pas de discrétisation)");
} }
// $trY[sprintf('%1.'.round($this ->oP ->iPrec).'f', $x)] = $rY; // $trY[sprintf('%1.'.round($this ->oP ->iPrec).'f', $x)] = $rY;
...@@ -345,7 +345,7 @@ export class CourbeRemous extends Nub { ...@@ -345,7 +345,7 @@ export class CourbeRemous extends Nub {
// n++; // n++;
} else { } else {
// $this ->oLog ->Add(_T('hydraulic:arret_calcul').' '.$x. ' m'); // $this ->oLog ->Add(_T('hydraulic:arret_calcul').' '.$x. ' m');
console.log("Arrêt du calcul : Hauteur critique atteinte à l'abscisse", x, "m"); this.debug("Arrêt du calcul : Hauteur critique atteinte à l'abscisse " + x + " m");
this._lastError = rY; this._lastError = rY;
break; break;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment