From f6ee545875aca4a59068bc5e340c038c6f1059d7 Mon Sep 17 00:00:00 2001 From: David Dorchies <david.dorchies@irstea.fr> Date: Wed, 11 Dec 2019 15:11:22 +0100 Subject: [PATCH] =?UTF-8?q?#52=20Suppression=20du=20calcul=20de=20la=20sur?= =?UTF-8?q?face=20hydraulique=20des=20d=C3=A9versoirs=20devenu=20inutile?= =?UTF-8?q?=20avec=20la=20nouvelle=20formule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/structure/structure_test.ts | 7 ------- src/structure/dever.ts | 14 -------------- src/structure/rectangular_structure.ts | 7 ------- src/structure/structure.ts | 5 ----- src/structure/structure_kivi.ts | 9 +-------- src/structure/structure_orifice_free.ts | 4 ---- src/structure/structure_orifice_submerged.ts | 4 ---- src/structure/structure_triangular_trunc_weir.ts | 14 -------------- src/structure/structure_triangular_weir.ts | 7 ------- 9 files changed, 1 insertion(+), 70 deletions(-) diff --git a/spec/structure/structure_test.ts b/spec/structure/structure_test.ts index eccab9a2..f0a004c7 100644 --- a/spec/structure/structure_test.ts +++ b/spec/structure/structure_test.ts @@ -31,13 +31,6 @@ export class StructureTest extends Structure { return new Result(this.prms.Z1.v - this.prms.Z2.v - this.prms.ZDV.v, this, data); } - /** - * Calcul de l'aire d'écoulement sur le seuil ou dans l'orifice - */ - public calcA(): number { - return Math.min(Math.max(this.prms.h1.v, this.prms.h2.v), this.prms.W.v); - } - } /* Test structure with : diff --git a/src/structure/dever.ts b/src/structure/dever.ts index e79b7ccd..382fb33a 100644 --- a/src/structure/dever.ts +++ b/src/structure/dever.ts @@ -50,8 +50,6 @@ export class Dever extends ParallelStructure { r.resultElement.values.V = QT / (this.prms.BR.v * (this.prms.Z1.v - this.prms.ZR.v)); // Energie cinétique dans le cours d'eau amont r.resultElement.values.Ec = r.resultElement.values.V * r.resultElement.values.V / (2 * 9.81); - // Calcul du rapport des aires sur les seuils et de l'aire du cours d'eau amont - const rA: number = this.calcA() / (this.prms.BR.v * (this.prms.Z1.v - this.prms.ZR.v)); // Calcul de Cv this.bZcorrected = false; const Q0 = super.CalcQ().vCalc; @@ -112,18 +110,6 @@ export class Dever extends ParallelStructure { }; } - /** - * Calcul de la somme des aires des ouvrages. - * @note N.B. : doit être appelé après calcul si le calcul porte sur Z1 ou - */ - private calcA(): number { - let A: number = 0; - for (const st of this.structures) { - A += st.calcA(); - } - return A; - } - /** * Calcul du facteur de la correction du coefficient de débit dû à la vitesse d'approche * @param rA Rapport entre l'aire d'écoulement des seuils et l'aire de la section amont diff --git a/src/structure/rectangular_structure.ts b/src/structure/rectangular_structure.ts index 366124d1..ae113b26 100644 --- a/src/structure/rectangular_structure.ts +++ b/src/structure/rectangular_structure.ts @@ -22,13 +22,6 @@ export abstract class RectangularStructure extends Structure { return this._prms as RectangularStructureParams; } - /** - * Calcul de l'aire d'écoulement sur le seuil ou dans l'orifice - */ - public calcA(): number { - return Math.min(Math.max(this.prms.h1.v, this.prms.h2.v), this.W) * this.prms.L.v; - } - /** * paramétrage de la calculabilité des paramètres */ diff --git a/src/structure/structure.ts b/src/structure/structure.ts index e4a37bf4..7dfef65e 100644 --- a/src/structure/structure.ts +++ b/src/structure/structure.ts @@ -125,11 +125,6 @@ export abstract class Structure extends ChildNub { return undefined; } - /** - * Calcul de l'aire d'écoulement sur le seuil ou dans l'orifice - */ - public abstract calcA(): number; - /** * Calcul d'une équation quelle que soit l'inconnue à calculer. * Gestion du débit nul et de l'inversion de débit diff --git a/src/structure/structure_kivi.ts b/src/structure/structure_kivi.ts index bd6ce28c..77c7cb19 100644 --- a/src/structure/structure_kivi.ts +++ b/src/structure/structure_kivi.ts @@ -53,14 +53,7 @@ export class StructureKivi extends Structure { } - /** - * Calcul de l'aire d'écoulement sur le seuil ou dans l'orifice - */ - public calcA(): number { - return Math.max(this.prms.h1.v, this.prms.h2.v) * this.prms.L.v; - } - - protected getFlowRegime(): StructureFlowRegime { + protected getFlowRegime(): StructureFlowRegime { if (this.prms.h2.v > 0) { return StructureFlowRegime.SUBMERGED; } else { diff --git a/src/structure/structure_orifice_free.ts b/src/structure/structure_orifice_free.ts index 3c803d7a..058c822e 100644 --- a/src/structure/structure_orifice_free.ts +++ b/src/structure/structure_orifice_free.ts @@ -48,10 +48,6 @@ export class StructureOrificeFree extends Structure { return new Result(v, this, data); } - public calcA(): number { - return this.prms.S.v; - } - protected getFlowRegime() { return StructureFlowRegime.FREE; } diff --git a/src/structure/structure_orifice_submerged.ts b/src/structure/structure_orifice_submerged.ts index f1dd4355..df3878b2 100644 --- a/src/structure/structure_orifice_submerged.ts +++ b/src/structure/structure_orifice_submerged.ts @@ -34,10 +34,6 @@ export class StructureOrificeSubmerged extends Structure { return new Result(v, this, data); } - public calcA(): number { - return this.prms.S.v; - } - protected getFlowRegime() { return StructureFlowRegime.SUBMERGED; } diff --git a/src/structure/structure_triangular_trunc_weir.ts b/src/structure/structure_triangular_trunc_weir.ts index b313099e..0f03975e 100644 --- a/src/structure/structure_triangular_trunc_weir.ts +++ b/src/structure/structure_triangular_trunc_weir.ts @@ -43,20 +43,6 @@ export class StructureTriangularTruncWeirFree extends Structure { return new Result(Q, this, data); } - /** - * Calcul de l'aire d'écoulement sur le seuil - */ - public calcA(): number { - if (this.prms.Z1.v <= this.prms.ZT.v) { - const h: number = Math.max(this.prms.h1.v, this.prms.h2.v); - return h * h * this.prms.BT.v / (this.prms.ZT.v - this.prms.ZDV.v); - } else { - const Z: number = Math.max(this.prms.Z1.v, this.prms.Z2.v); - return this.prms.BT.v * (this.prms.ZT.v - this.prms.ZDV.v) - + 2 * this.prms.BT.v * (Z - this.prms.ZT.v); - } - } - protected getFlowRegime() { if (this.prms.Z2.v <= this.prms.ZDV.v) { return StructureFlowRegime.FREE; diff --git a/src/structure/structure_triangular_weir.ts b/src/structure/structure_triangular_weir.ts index d8b20361..eeb8cdeb 100644 --- a/src/structure/structure_triangular_weir.ts +++ b/src/structure/structure_triangular_weir.ts @@ -39,13 +39,6 @@ export class StructureTriangularWeir extends Structure { return new Result(Q, this, data); } - /** - * Calcul de l'aire d'écoulement sur le seuil - */ - public calcA(): number { - return Math.pow(Math.max(this.prms.h1.v, this.prms.h2.v), 2) * this.getTanFromDegrees(this.prms.alpha2.v); - } - protected getFlowRegime() { if (this.prms.Z2.v <= this.prms.ZDV.v) { return StructureFlowRegime.FREE; -- GitLab