From 43e0aedcd73582e03d193169879a613498cd2fe1 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Mon, 30 Sep 2019 10:13:00 +0200 Subject: [PATCH] Fix #297 - SectionParametree replaced Yf & Yt with Ycor renamed Yco to Ycon linked doc to CourbeRemous target selector --- docs-fr/calculators/hsl/var_hydrauliques.md | 6 +-- src/app/calculators/remous/remous.config.json | 25 ++++++++++-- src/app/calculators/remous/remous.en.json | 10 ++--- src/app/calculators/remous/remous.fr.json | 14 +++---- .../section-param/section-param.config.json | 5 +-- .../section-param/section-param.en.json | 38 +++++++++---------- .../section-param/section-param.fr.json | 12 +++--- .../remous-results.component.ts | 2 +- .../section-results.component.ts | 5 +-- .../definition/form-compute-courbe-remous.ts | 2 +- src/locale/messages.en.json | 8 ++-- src/locale/messages.fr.json | 8 ++-- 12 files changed, 68 insertions(+), 67 deletions(-) diff --git a/docs-fr/calculators/hsl/var_hydrauliques.md b/docs-fr/calculators/hsl/var_hydrauliques.md index 541e31382..12b66c6fa 100644 --- a/docs-fr/calculators/hsl/var_hydrauliques.md +++ b/docs-fr/calculators/hsl/var_hydrauliques.md @@ -117,11 +117,9 @@ avec : * \(f(h_k) = \dfrac{Q^2 B}{g S^3} - 1\) * \(f'(h_k) = \dfrac{Q^2}{g} \dfrac{B'.S - 3 B S'}{S^4}\) -## Tirant d'eau fluvial Yf +## Tirant d'eau correspondant Ycor -## Tirant d'eau torrentiel Yt - -## Tirant d'eau conjugué Yco +## Tirant d'eau conjugué Ycon ## Charge spécifique Hs diff --git a/src/app/calculators/remous/remous.config.json b/src/app/calculators/remous/remous.config.json index a25896299..2e0c26fc1 100644 --- a/src/app/calculators/remous/remous.config.json +++ b/src/app/calculators/remous/remous.config.json @@ -64,7 +64,25 @@ { "id": "select_target", "type": "select", - "source": "remous_target" + "source": "remous_target", + "help": { + "B": "hsl/var_hydrauliques.html#largeur-au-miroir-b", + "P": "hsl/var_hydrauliques.html#perimetre-mouille-p", + "S": "hsl/var_hydrauliques.html#surface-mouillee-s", + "R": "hsl/var_hydrauliques.html#rayon-hydraulique-r", + "Fr": "hsl/var_hydrauliques.html#froude-fr", + "V": "hsl/var_hydrauliques.html#vitesse-moyenne-v", + "Yn": "hsl/var_hydrauliques.html#tirant-deau-normal-yn", + "Yc": "hsl/var_hydrauliques.html#tirant-deau-critique-yc", + "Ycor": "hsl/var_hydrauliques.html#tirant-deau-correspondant-ycor", + "Ycon": "hsl/var_hydrauliques.html#tirant-deau-conjugue-ycon", + "Hs": "hsl/var_hydrauliques.html#charge-specifique-hs", + "Hsc": "hsl/var_hydrauliques.html#charge-critique-hsc", + "J": "hsl/var_hydrauliques.html#perte-de-charge-j", + "I-J": "hsl/var_hydrauliques.html#variation-lineaire-de-lenergie-specifique-i-j", + "Imp": "hsl/var_hydrauliques.html#impulsion-imp", + "Tau0": "hsl/var_hydrauliques.html#force-tractrice-tau0" + } } ] }, @@ -84,9 +102,8 @@ "V": "hsl/var_hydrauliques.html#vitesse-moyenne-v", "Yn": "hsl/var_hydrauliques.html#tirant-deau-normal-yn", "Yc": "hsl/var_hydrauliques.html#tirant-deau-critique-yc", - "Yt": "hsl/var_hydrauliques.html#tirant-deau-torrentiel-yt", - "Yf": "hsl/var_hydrauliques.html#tirant-deau-fluvial-yf", - "Yco": "hsl/var_hydrauliques.html#tirant-deau-conjugue-yco", + "Ycor": "hsl/var_hydrauliques.html#tirant-deau-correspondant-ycor", + "Ycon": "hsl/var_hydrauliques.html#tirant-deau-conjugue-ycon", "Hs": "hsl/var_hydrauliques.html#charge-specifique-hs", "Hsc": "hsl/var_hydrauliques.html#charge-critique-hsc", "J": "hsl/var_hydrauliques.html#perte-de-charge-j", diff --git a/src/app/calculators/remous/remous.en.json b/src/app/calculators/remous/remous.en.json index 50fdee803..fadadf72f 100644 --- a/src/app/calculators/remous/remous.en.json +++ b/src/app/calculators/remous/remous.en.json @@ -34,9 +34,8 @@ "UNIT_P": "m", "UNIT_R": "m", "UNIT_V": "m/s", - "UNIT_YF": "m", - "UNIT_YT": "m", - "UNIT_YCO": "m", + "UNIT_YCOR": "m", + "UNIT_YCON": "m", "UNIT_J": "m", "UNIT_I-J": "m/m", "UNIT_IMP": "N", @@ -59,9 +58,8 @@ "select_target_Fr": "Froude number", "select_target_Yc": "Critical depth (m)", "select_target_Yn": "Normal depth (m)", - "select_target_Yf": "Subcritical depth (m)", - "select_target_Yt": "Supercritical depth (m)", - "select_target_Yco": "Conjugate depth (m)", + "select_target_Ycor": "Corresponding depth (m)", + "select_target_Ycon": "Conjugate depth (m)", "select_target_J": "Head loss (m)", "select_target_I-J": "Linear variation of specific head (m/m)", "select_target_Imp": "Impulse (N)", diff --git a/src/app/calculators/remous/remous.fr.json b/src/app/calculators/remous/remous.fr.json index ca462267a..ed9116978 100644 --- a/src/app/calculators/remous/remous.fr.json +++ b/src/app/calculators/remous/remous.fr.json @@ -33,9 +33,8 @@ "UNIT_P": "m", "UNIT_R": "m", "UNIT_V": "m/s", - "UNIT_YF": "m", - "UNIT_YT": "m", - "UNIT_YCO": "m", + "UNIT_YCOR": "m", + "UNIT_YCON": "m", "UNIT_J": "m", "UNIT_I-J": "m/m", "UNIT_IMP": "N", @@ -58,11 +57,10 @@ "select_target_Fr": "Le Froude", "select_target_Yc": "Le tirant d'eau critique (m)", "select_target_Yn": "Le tirant d'eau normal (m)", - "select_target_Yf": "Le tirant d'eau fluvial (m)", - "select_target_Yt": "Le tirant d'eau torrentiel (m)", - "select_target_Yco": "Le tirant d'eau conjugué (m)", + "select_target_Ycor": "Le tirant d'eau correspondant (m)", + "select_target_Ycon": "Le tirant d'eau conjugué (m)", "select_target_J": "La perte de charge (m)", - "select_target_I-J": "Variation linéaire de l'énergie spécifique (m/m)", - "select_target_Imp": "Impulsion (N)", + "select_target_I-J": "La variation linéaire de l'énergie spécifique (m/m)", + "select_target_Imp": "L'impulsion (N)", "select_target_Tau0": "La force tractrice (Pa)" } \ No newline at end of file diff --git a/src/app/calculators/section-param/section-param.config.json b/src/app/calculators/section-param/section-param.config.json index 22f01c5c9..9f5c22794 100644 --- a/src/app/calculators/section-param/section-param.config.json +++ b/src/app/calculators/section-param/section-param.config.json @@ -53,9 +53,8 @@ "V": "hsl/var_hydrauliques.html#vitesse-moyenne-v", "Yn": "hsl/var_hydrauliques.html#tirant-deau-normal-yn", "Yc": "hsl/var_hydrauliques.html#tirant-deau-critique-yc", - "Yt": "hsl/var_hydrauliques.html#tirant-deau-torrentiel-yt", - "Yf": "hsl/var_hydrauliques.html#tirant-deau-fluvial-yf", - "Yco": "hsl/var_hydrauliques.html#tirant-deau-conjugue-yco", + "Ycor": "hsl/var_hydrauliques.html#tirant-deau-correspondant-ycor", + "Ycon": "hsl/var_hydrauliques.html#tirant-deau-conjugue-ycon", "Hs": "hsl/var_hydrauliques.html#charge-specifique-hs", "Hsc": "hsl/var_hydrauliques.html#charge-critique-hsc", "J": "hsl/var_hydrauliques.html#perte-de-charge-j", diff --git a/src/app/calculators/section-param/section-param.en.json b/src/app/calculators/section-param/section-param.en.json index da77bfab8..09723fabf 100644 --- a/src/app/calculators/section-param/section-param.en.json +++ b/src/app/calculators/section-param/section-param.en.json @@ -20,23 +20,22 @@ "Q": "Flow", "Y": "Draft", "fs_param_calc": "Calculation parameters", - "Hs": "Charge spécifique", - "Hsc": "Charge critique", - "B": "Largeur au miroir", - "P": "Périmètre mouillé", - "S": "Surface mouillée", - "R": "Rayon hydraulique", - "V": "Vitesse moyenne", + "Hs": "Specific cahrge", + "Hsc": "Critical charge", + "B": "Width at mirror", + "P": "Wet perimeter", + "S": "Wet surface", + "R": "Hydraulic radius", + "V": "Average speed", "Fr": "Froude", - "Yc": "Tirant d'eau critique", - "Yn": "Tirant d'eau normal", - "Yf": "Tirant d'eau fluvial", - "Yt": "Tirant d'eau torrentiel", - "Yco": "Tirant d'eau conjugué", - "J": "Perte de charge", - "I-J": "Variation linéaire de l'énergie spécifique", - "Imp": "Impulsion", - "Tau0": "Force tractrice", + "Yc": "Critical depth", + "Yn": "Normal depth", + "Ycor": "Corresponding depth", + "Ycon": "Conjugate depth", + "J": "Loss of charge", + "I-J": "Linear variation of specific energy", + "Imp": "Impulse", + "Tau0": "Tractive force", "UNIT_B": "m", "UNIT_HS": "m", "UNIT_HSC": "m", @@ -49,8 +48,7 @@ "UNIT_TAU0": "Pa", "UNIT_V": "m/s", "UNIT_YC": "m", - "UNIT_YCO": "m", - "UNIT_YF": "m", - "UNIT_YN": "m", - "UNIT_YT": "m" + "UNIT_YCON": "m", + "UNIT_YCOR": "m", + "UNIT_YN": "m" } diff --git a/src/app/calculators/section-param/section-param.fr.json b/src/app/calculators/section-param/section-param.fr.json index 0de692fe9..c9065310f 100644 --- a/src/app/calculators/section-param/section-param.fr.json +++ b/src/app/calculators/section-param/section-param.fr.json @@ -29,9 +29,8 @@ "Fr": "Froude", "Yc": "Tirant d'eau critique", "Yn": "Tirant d'eau normal", - "Yf": "Tirant d'eau fluvial", - "Yt": "Tirant d'eau torrentiel", - "Yco": "Tirant d'eau conjugué", + "Ycor": "Tirant d'eau correspondant", + "Ycon": "Tirant d'eau conjugué", "J": "Perte de charge", "I-J": "Variation linéaire de l'énergie spécifique", "Imp": "Impulsion", @@ -48,8 +47,7 @@ "UNIT_TAU0": "Pa", "UNIT_V": "m/s", "UNIT_YC": "m", - "UNIT_YCO": "m", - "UNIT_YF": "m", - "UNIT_YN": "m", - "UNIT_YT": "m" + "UNIT_YCON": "m", + "UNIT_YCOR": "m", + "UNIT_YN": "m" } diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts index f7a0be85d..bed67125d 100644 --- a/src/app/components/remous-results/remous-results.component.ts +++ b/src/app/components/remous-results/remous-results.component.ts @@ -207,7 +207,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck public graph1_options = {}; /* - * config du graphe secondaire (paramètre supplémentaire sauf Hs, Hsc, Yf, Yt, Yco) + * config du graphe secondaire (paramètre supplémentaire sauf Hs, Hsc, Ycor, Ycon) */ public graph2_type = "line"; public graph2_data = {}; diff --git a/src/app/components/section-results/section-results.component.ts b/src/app/components/section-results/section-results.component.ts index 57215b164..854b2e273 100644 --- a/src/app/components/section-results/section-results.component.ts +++ b/src/app/components/section-results/section-results.component.ts @@ -50,10 +50,9 @@ export class SectionResultsComponent extends ResultsComponent implements DoCheck "Hs": { r: 255, g: 0, b: 0 }, "Hsc": { r: 0, g: 0, b: 255 }, "Yn": { r: 16, g: 128, b: 16 }, - "Yf": { r: 128, g: 128, b: 128 }, - "Yt": { r: 0, g: 0, b: 0 }, + "Ycor": { r: 128, g: 128, b: 128 }, "Yc": { r: 255, g: 128, b: 0 }, - "Yco": { r: 255, g: 0, b: 255 }, + "Ycon": { r: 255, g: 0, b: 255 }, }; /** hardcoded bullet-proof default canvas size **/ diff --git a/src/app/formulaire/definition/form-compute-courbe-remous.ts b/src/app/formulaire/definition/form-compute-courbe-remous.ts index 230beaf55..2491a2683 100644 --- a/src/app/formulaire/definition/form-compute-courbe-remous.ts +++ b/src/app/formulaire/definition/form-compute-courbe-remous.ts @@ -46,7 +46,7 @@ export class FormComputeCourbeRemous extends FormCompute { this.remousResults.hauteurNormale = this.resultYn.resultElement; this.remousResults.hauteurCritique = this.resultYc.resultElement; if (this.remousResults.extraParamSymbol) { - this.remousResults.extraChart = ["Hs", "Hsc", "Yf", "Yt", "Yco"].indexOf(this.remousResults.extraParamSymbol) === -1; + this.remousResults.extraChart = ! ["Hs", "Hsc", "Ycor", "Ycon"].includes(this.remousResults.extraParamSymbol); } else { this.remousResults.extraChart = false; } diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index e070884cc..9e11bf181 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -45,9 +45,8 @@ "ERROR_REMOUS_PENTE_FORTE": "The water line slope is too steep at abscissa %x% m (the discretisation step should be reduced)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCONJUG": "Non-convergence of the calculation of the combined depth (Newton's method)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCRITIQUE": "Non-convergence of the calculation of the critical depth (Newton's method)", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HFLU": "Non convergence of the calculation of the corresponding elevation (Newton's method) for the calculation of the subcritical depth", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCOR": "Non convergence of the calculation of the corresponding elevation (Newton's method)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence of the calculation of the normal depth (Newton's method)", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HTOR": "Non convergence of the calculation of the corresponding height (Newton's method) for the calculation of the supercritical depth", "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "The slope is negative or zero, the normal depth is infinite", "ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.", "INFO_CALCULATOR_CALC_NAME": "Calculator name", @@ -253,11 +252,10 @@ "INFO_LIB_VMAX": "Maximal speed", "INFO_LIB_W": "Gate opening", "INFO_LIB_YC": "Critical depth", - "INFO_LIB_YCO": "Conjugate depth", - "INFO_LIB_YF": "Subcritical depth", + "INFO_LIB_YCON": "Conjugate depth", + "INFO_LIB_YCOR": "Corresponding depth", "INFO_LIB_YMOY": "Average depth", "INFO_LIB_YN": "Normal depth", - "INFO_LIB_YT": "Supercritical depth", "INFO_LIB_Z": "Water level", "INFO_LIB_Z1": "Upstream water level", "INFO_LIB_Z2": "Downstream water level", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 7f78962c3..56324143c 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -45,9 +45,8 @@ "ERROR_REMOUS_PENTE_FORTE": "La pente de la ligne d'eau est trop forte à l'abscisse %x% m (il faudrait réduire le pas de discrétisation)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCONJUG": "Non convergence du calcul de la hauteur conjuguée (Méthode de Newton)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCRITIQUE": "Non convergence du calcul de la hauteur critique (Méthode de Newton)", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HFLU": "Non convergence du calcul de la hauteur correspondante (Méthode de Newton) pour le calcul de la hauteur fluviale", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCOR": "Non convergence du calcul de la hauteur correspondante (Méthode de Newton)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence du calcul de la hauteur normale (Méthode de Newton)", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HTOR": "Non convergence du calcul de la hauteur correspondante (Méthode de Newton) pour le calcul de la hauteur torrentielle", "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "La pente est négative ou nulle, la hauteur normale est infinie", "ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé: le paramètre demandé n'est pas calculable.", "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul", @@ -252,11 +251,10 @@ "INFO_LIB_VMAX": "Vitesse maximale", "INFO_LIB_W": "Ouverture de vanne", "INFO_LIB_YC": "Tirant d'eau critique", - "INFO_LIB_YCO": "Tirant d'eau conjugué", - "INFO_LIB_YF": "Tirant d'eau fluvial", + "INFO_LIB_YCON": "Tirant d'eau conjugué", + "INFO_LIB_YCOR": "Tirant d'eau correspondant", "INFO_LIB_YMOY": "Tirant d'eau moyen", "INFO_LIB_YN": "Tirant d'eau normal", - "INFO_LIB_YT": "Tirant d'eau torrentiel", "INFO_LIB_Z": "Niveau d'eau", "INFO_LIB_Z1": "Cote de l'eau amont", "INFO_LIB_Z2": "Cote de l'eau aval", -- GitLab