Skip to content
Snippets Groups Projects
Commit dfb3d11f authored by Mathias Chouet's avatar Mathias Chouet Committed by mathias.chouet
Browse files

PAR : simulation

parent 7e9fdcda
No related branches found
No related tags found
1 merge request!99Devel - PAR
......@@ -52,7 +52,9 @@ describe("ngHyd − calculate all parameters of all calculators", async () => {
if (inputs.length > 0) {
// for each param
for (const input of inputs) {
for (let i = 0; i < inputs.length; i++) {
// grab input again because calculating the module just refreshed all the fieldsets
const input = (await calcPage.getParamInputsHavingCalcMode())[i];
// click "calc" mode button for this parameter
await calcPage.setParamMode(input, "cal");
// check that only 1 button is in "calc" state
......
......@@ -9,5 +9,5 @@ export const testedCalcTypes = [
// omit 16 - CloisonAval
17, 18, 19, 20, 21, 22, 23, 24, 25,
// omit 26 - YAXN
27
27, 29
];
[
{
"id": "fs_param_hydro",
"type": "fieldset",
"fields": [
"Q",
"Z1",
{
"id": "Z2",
"allowEmpty": true
}
]
},
{
"id": "fs_geometry",
"type": "fieldset",
"fields": [
{
"type": "select",
"id": "select_par_type",
"property": "parType",
"default": "PLANE"
},
"S",
{
"id": "P",
"allowEmpty": true
},
{
"id": "Nb",
"allowEmpty": true
},
{
"id": "ZD1",
"allowEmpty": true
},
{
"id": "ZR1",
"allowEmpty": true
},
{
"id": "ZD2",
"allowEmpty": true
},
{
"id": "ZR2",
"allowEmpty": true
},
"L",
"a",
"N",
"M"
]
},
{
"type": "options",
"selectIds": [ "select_par_type" ],
"help": "par/par_simulation.html"
}
]
{
"fs_param_hydro": "Hydraulic parameters",
"Q": "Flow",
"Z1": "Upstream water elevation",
"Z2": "Downstream water elevation",
"fs_geometry": "Pass geometry",
"ZD1": "Upstream spilling elevation",
"ZR1": "Upstream apron elevation",
"ZD2": "Downstream spilling elevation",
"ZR2": "Downstream apron elevation",
"S": "Slope",
"P": "Space between baffles",
"Nb": "Number of baffles",
"L": "Pass width",
"a": "Baffle / chevron height",
"N": "Number of patterns",
"M": "Number of longitudinal strips",
"h": "Water level in the pass",
"ha": "Upstream head",
"qStar": "Dimensionless flow",
"V": "Flow velocity",
"ZM": "Minimal rake height of upstream side walls",
"LPI": "Pass length following the slope",
"LPH": "Pass length in horizontal projection",
"A": "A",
"B": "B",
"C": "C",
"D": "D",
"H": "Baffle height",
"Hmin": "Hmin",
"Hmax": "Hmax",
"select_par_type": "Type de passe",
"select_par_type_0": "Plane baffles",
"select_par_type_1": "Fatou",
"select_par_type_2": "Superactive",
"select_par_type_3": "Mixed / chevrons",
"UNIT_ZD1": "m",
"UNIT_S": "m/m",
"UNIT_P": "m",
"UNIT_NB": "",
"UNIT_L": "m",
"UNIT_a": "m",
"UNIT_N": "",
"UNIT_M": "",
"UNIT_H": "m",
"UNIT_HA": "m",
"UNIT_QSTAR": "m³/s",
"UNIT_V": "m/s",
"UNIT_ZM": "m",
"UNIT_ZR1": "m",
"UNIT_A": "m",
"UNIT_B": "m",
"UNIT_C": "m",
"UNIT_D": "m",
"UNIT_HMIN": "m",
"UNIT_HMAX": "m",
"UNIT_ZD2": "m",
"UNIT_ZR2": "m",
"UNIT_LPI": "m",
"UNIT_LPH": "m"
}
{
"fs_param_hydro": "Paramètres hydrauliques",
"Q": "Débit",
"Z1": "Cote de l'eau amont",
"Z2": "Cote de leau aval",
"fs_geometry": "Géométrie de la passe",
"ZD1": "Cote de déversement à l'amont",
"ZR1": "Cote de radier à l'amont",
"ZD2": "Cote de déversement à l'aval",
"ZR2": "Cote de radier à l'aval",
"S": "Pente",
"P": "Espacement entre les ralentisseurs",
"Nb": "Nombre de ralentisseurs",
"L": "Largeur de la passe",
"a": "Hauteur des ralentisseurs / des chevrons",
"N": "Nombre de motifs",
"M": "Nombre de bandes longitudinales",
"h": "Hauteur d'eau dans la passe",
"ha": "Charge amont",
"qStar": "Débit adimensionnel",
"V": "Vitesse débitante",
"ZM": "Cote d'arase minimale des murs latéraux à l'amont",
"LPI": "Longueur de la passe en suivant la pente",
"LPH": "Longueur de la passe en projection horizontale",
"A": "A",
"B": "B",
"C": "C",
"D": "D",
"H": "Hauteur d'un ralentisseur",
"Hmin": "Hmin",
"Hmax": "Hmax",
"select_par_type": "Type de passe",
"select_par_type_0": "Ralentisseurs plans",
"select_par_type_1": "Fatou",
"select_par_type_2": "Ralentisseurs suractifs",
"select_par_type_3": "Mixte / chevrons",
"UNIT_ZD1": "m",
"UNIT_S": "m/m",
"UNIT_P": "m",
"UNIT_NB": "",
"UNIT_L": "m",
"UNIT_a": "m",
"UNIT_N": "",
"UNIT_M": "",
"UNIT_H": "m",
"UNIT_HA": "m",
"UNIT_QSTAR": "m³/s",
"UNIT_V": "m/s",
"UNIT_ZM": "m",
"UNIT_ZR1": "m",
"UNIT_A": "m",
"UNIT_B": "m",
"UNIT_C": "m",
"UNIT_D": "m",
"UNIT_HMIN": "m",
"UNIT_HMAX": "m",
"UNIT_ZD2": "m",
"UNIT_ZR2": "m",
"UNIT_LPI": "m",
"UNIT_LPH": "m"
}
......@@ -23,7 +23,7 @@
"path": "passe-ralentisseurs.jpg",
"credits": "????"
},
"calculators": [ 28 ]
"calculators": [ 28, 29 ]
},
{
"name": "PASSE_NATURELLE",
......
......@@ -90,6 +90,7 @@ export class FormulaireFixedVar extends FormulaireDefinition {
protected compute() {
this.runNubCalc(this.currentNub);
this.reaffectResultComponents();
this.refreshFieldsets();
}
protected reaffectResultComponents() {
......@@ -117,6 +118,12 @@ export class FormulaireFixedVar extends FormulaireDefinition {
}
}
protected refreshFieldsets() {
for (const fs of this.allFieldsets) {
fs.updateFields();
}
}
// interface Observer
public update(sender: IObservable, data: any) {
......
......@@ -227,7 +227,7 @@ export class FieldSet extends FormulaireElement implements Observer {
}
/**
* Reflects all properties values in the interface, through the values of the <select> fields
* Reloads the model values and properties, and reloads localisation strings
*/
public updateFields() {
this.parseFields();
......
{
"ERROR_AT_LEAST_ONE_OF_THOSE_MUST_BE_DEFINED": "At least one of the following values should be specified : %symbols%",
"ERROR_CLOISON_AVAL_UN_OUVRAGE_REGULE": "Only one regulated device is allowed on the downstream wall",
"WARNING_DEVER_ZR_SUP_Z1": "Elevation of the river bed can't be higher than water elevation: Impossible to calculate the kinetic energy",
"WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "Downstream elevation is higher than weir elevation (possible submersion)",
......@@ -32,6 +33,8 @@
"ERROR_PAB_CALC_Z1_CLOISON": "Error in calculating the upstream water elevation of a wall",
"ERROR_PAB_Z1_LOWER_THAN_Z2": "Upstream water elevation should be higher than downstream water elevation",
"ERROR_PAB_Z1_LOWER_THAN_UPSTREAM_WALL": "Upstream water elevation is too low for water to flow through the first wall",
"ERROR_PAR_NB_INCONSISTENT": "Number of baffles should be %stdNb%",
"ERROR_PAR_ZR_ZD_MISMATCH": "Values of %ZR% and %ZD% mismatch : either %ZR% should be %expectedZR%, or %ZD% should be %expectedZD%",
"ERROR_PARAM_MUST_BE_A_NUMBER": "Please type a numeric value",
"ERROR_PARAM_MUST_BE_AT_LEAST": "Value must be >= %s",
"ERROR_PARAM_MUST_BE_POSITIVE": "Please type a positive numeric value",
......@@ -133,6 +136,8 @@
"INFO_ENUM_OUVRAGE_Q_REGIME_1": "Partially submerged",
"INFO_ENUM_OUVRAGE_Q_REGIME_2": "Submerged",
"INFO_ENUM_OUVRAGE_Q_REGIME_3": "Zero flow",
"INFO_ENUM_PARFLOWREGIME_0": "Free",
"INFO_ENUM_PARFLOWREGIME_1": "Submerged",
"INFO_ENUM_STRUCTUREFLOWMODE_0": "Weir",
"INFO_ENUM_STRUCTUREFLOWMODE_1": "Orifice",
"INFO_ENUM_STRUCTUREFLOWMODE_2": "Zero flow",
......@@ -230,6 +235,7 @@
"INFO_LIB_DISTANCE_AMONT": "Distance from upstream (m)",
"INFO_LIB_EC": "EC: Kinetic energy",
"INFO_LIB_ENUM_MACRORUGOFLOWTYPE": "Flow type",
"INFO_LIB_ENUM_PARFLOWREGIME": "Regime",
"INFO_LIB_FLU": "Subcritical water line",
"INFO_LIB_FR": "Froude number",
"INFO_LIB_FS_OUVRAGE": "Device",
......@@ -387,6 +393,8 @@
"INFO_PABPUISSANCE_TITRE_COURT": "FL: diss. power",
"INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power",
"INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
"INFO_PARSIMULATION_TITRE": "Humpback fishway: simulation",
"INFO_PARSIMULATION_TITRE_COURT": "HF: simulation",
"INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
"INFO_PAR_TITRE": "Humpback fishway: setup",
"INFO_PAR_TITRE_COURT": "HF: setup",
......
{
"ERROR_AT_LEAST_ONE_OF_THOSE_MUST_BE_DEFINED": "Au moins une des valeurs suivantes doit être renseignée&nbsp;: %symbols%",
"ERROR_CLOISON_AVAL_UN_OUVRAGE_REGULE": "Un seul ouvrage régulé est autorisé sur la cloison aval",
"WARNING_DEVER_ZR_SUP_Z1": "La cote du lit du cours d'eau ne peut pas être supérieure à la cote de l'eau&nbsp;: Impossible de calculer l'énergie cinétique",
"WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "La cote de l'eau aval est plus élevée que la cote du seuil (ennoiement possible)",
......@@ -32,6 +33,8 @@
"ERROR_PAB_CALC_Z1_CLOISON": "Erreur de calcul de la cote de l'eau amont d'une cloison",
"ERROR_PAB_Z1_LOWER_THAN_Z2": "La cote de l'eau amont doit être supérieure à la cote de l'eau aval",
"ERROR_PAB_Z1_LOWER_THAN_UPSTREAM_WALL": "La cote de l'eau amont est trop basse pour que l'eau s'écoule à travers la première cloison",
"ERROR_PAR_NB_INCONSISTENT": "Le nombre de ralentisseurs devrait être %stdNb%",
"ERROR_PAR_ZR_ZD_MISMATCH": "Les valeurs de %ZR% et %ZD% ne correspondent pas&nbsp;: soit %ZR% devrait valoir %expectedZR%, soit %ZD% devrait valoir %expectedZD%",
"ERROR_PARAM_MUST_BE_A_NUMBER": "Veuillez entrer une valeur numérique",
"ERROR_PARAM_MUST_BE_AT_LEAST": "La valeur doit être >= %s",
"ERROR_PARAM_MUST_BE_POSITIVE": "Veuillez entrer une valeur numérique positive",
......@@ -133,6 +136,8 @@
"INFO_ENUM_OUVRAGE_Q_REGIME_1": "Partiellement noyé",
"INFO_ENUM_OUVRAGE_Q_REGIME_2": "Noyé",
"INFO_ENUM_OUVRAGE_Q_REGIME_3": "Débit nul",
"INFO_ENUM_PARFLOWREGIME_0": "Dénoyé",
"INFO_ENUM_PARFLOWREGIME_1": "Noyé",
"INFO_ENUM_STRUCTUREFLOWMODE_0": "Surface libre",
"INFO_ENUM_STRUCTUREFLOWMODE_1": "En charge",
"INFO_ENUM_STRUCTUREFLOWMODE_2": "Débit nul",
......@@ -230,6 +235,7 @@
"INFO_LIB_DISTANCE_AMONT": "Distance depuis l'amont (m)",
"INFO_LIB_EC": "EC: Énergie cinétique",
"INFO_LIB_ENUM_MACRORUGOFLOWTYPE": "Type d'écoulement",
"INFO_LIB_ENUM_PARFLOWREGIME": "Régime",
"INFO_LIB_FLU": "Ligne d'eau fluviale",
"INFO_LIB_FR": "Froude",
"INFO_LIB_FS_OUVRAGE": "Ouvrage",
......@@ -390,6 +396,8 @@
"INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages",
"INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
"INFO_PAR_TITRE_COURT": "PAR&nbsp;: calage",
"INFO_PARSIMULATION_TITRE": "Passe à ralentisseurs&nbsp;: simulation",
"INFO_PARSIMULATION_TITRE_COURT": "PAR&nbsp;: simulation",
"INFO_PARAMFIELD_AWAITING_CALCULATION": "En attente de calcul",
"INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Conditions aux limites",
"INFO_PARAMFIELD_CALCULATED": "Calculé",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment