Skip to content
Snippets Groups Projects
Commit 92872658 authored by François Grand's avatar François Grand
Browse files

fix: replace "submersion" by "submergence" where appropriate

refs #314
parent 871dcfb3
No related branches found
No related tags found
No related merge requests found
Showing
with 22 additions and 22 deletions
......@@ -36,7 +36,7 @@ describe("class CloisonAval", () => {
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.059, 3);
expect(r.values.ZDV).toBeCloseTo(73.9, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07);
expect(r.log.messages[1].code).toBe(MessageCode.WARNING_VANLEV_ZDV_SUP_MAX);
});
it("ZDV max bound Calc(Z1) should return 75.096 and extraResults.ZDV should be 74", () => {
......@@ -44,7 +44,7 @@ describe("class CloisonAval", () => {
const r = ca.CalcSerie();
expect(r.vCalc).toBeCloseTo(75.096, 3);
expect(r.values.ZDV).toBeCloseTo(74, 2);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07);
expect(r.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07);
expect(r.log.messages[1].code).toBe(MessageCode.WARNING_VANLEV_ZDV_INF_MIN);
});
});
......
......@@ -132,7 +132,7 @@ describe("Class Cloisons: ", () => {
expect(cloisons.structures[0].result.values.P).toBeCloseTo(-0.65, 3);
expect(cloisons.structures[0].result.log.messages.length).toBe(2);
expect(cloisons.structures[0].result.log.messages[0].code).toBe(
MessageCode.WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09
MessageCode.WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09
);
expect(cloisons.structures[0].result.log.messages[1].code).toBe(MessageCode.WARNING_NEGATIVE_SILL);
});
......
......@@ -278,7 +278,7 @@ describe("Class Pab: ", () => {
const pab2 = Session.getInstance().findNubByUid("M29hc3") as Pab;
pab2.CalcSerie();
expect(pab2.children[0].result.log.messages.length).toBe(2);
expect(pab2.children[0].result.log.messages[0].code).toBe(MessageCode.WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09);
expect(pab2.children[0].result.log.messages[0].code).toBe(MessageCode.WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09);
expect(pab2.children[0].result.log.messages[1].code).toBe(MessageCode.WARNING_NEGATIVE_SILL);
});
});
......
......@@ -369,7 +369,7 @@ describe("solveur multi-modules", () => {
expect(res.vCalc).toBeDefined();
expect(res.log.messages.length).toBeGreaterThan(0);
// Vanne à l'entrée du canal (Parallel structures)
expect(res.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07);
expect(res.log.messages[0].code).toBe(MessageCode.WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07);
if (res.vCalc === undefined) {
expect(res.log.messages.length).toBe(3);
// Canal d'amenée (Cotes d'un bief)
......
......@@ -38,7 +38,7 @@ describe("Class StructureWeirSubmerged: ", () => {
expect(res.log.messages.length).toBe(1);
expect(
res.log.messages[0].code
).toBe(MessageCode.WARNING_WEIR_SUBMERSION_LOWER_THAN_08);
).toBe(MessageCode.WARNING_WEIR_SUBMERGENCE_LOWER_THAN_08);
});
});
});
......@@ -38,7 +38,7 @@ describe("Class StructureWeirSubmergedLarinier: ", () => {
expect(res.log.messages.length).toBe(1);
expect(
res.log.messages[0].code
).toBe(MessageCode.WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09);
).toBe(MessageCode.WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09);
});
});
describe("Calcul avec h2/h1 < 0.7 (=0.5) : ", () => {
......@@ -51,7 +51,7 @@ describe("Class StructureWeirSubmergedLarinier: ", () => {
expect(res.log.messages.length).toBe(1);
expect(
res.log.messages[0].code
).toBe(MessageCode.WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09);
).toBe(MessageCode.WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09);
});
});
});
......@@ -17,7 +17,7 @@ describe("Class StructureWeirVillemonte: ", () => {
expect(res.log.messages.length).toBe(1);
expect(
res.log.messages[0].code
).toBe(MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07);
).toBe(MessageCode.WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07);
});
});
});
......@@ -60,7 +60,7 @@ export abstract class Structure extends ChildNub {
/**
* calcul du pourcentage d'ennoiement arrondi à l'unité
*/
public computeSubmersionPercentage(H2?: number): number {
public computeSubmergencePercentage(H2?: number): number {
const h1 = this._prms.get("h1").v;
const h2 = H2 === undefined ? this._prms.get("h2").v : H2;
if (h1 !== 0) {
......
......@@ -31,7 +31,7 @@ export class StructureOrificeFree extends Structure {
{
Z2: this.prms.Z2.v,
Zco: this.prms.Zco.v,
submersionPerc: this.computeSubmersionPercentage(this.prms.Z2.v - this.prms.Zco.v).toString()
submergencePerc: this.computeSubmergencePercentage(this.prms.Z2.v - this.prms.Zco.v).toString()
}
));
}
......
......@@ -26,7 +26,7 @@ export class StructureRectangularOrificeFree extends RectangularStructure {
MessageCode.WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
{
h2: this.prms.h2.v,
submersionPerc: this.computeSubmersionPercentage().toString()
submergencePerc: this.computeSubmergencePercentage().toString()
}
));
}
......
......@@ -24,7 +24,7 @@ export class StructureWeirFree extends RectangularStructure {
MessageCode.WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
{
h2: this.prms.h2.v,
submersionPerc: this.computeSubmersionPercentage().toString()
submergencePerc: this.computeSubmergencePercentage().toString()
}
));
}
......
......@@ -24,11 +24,11 @@ export class StructureWeirSubmerged extends RectangularStructure {
const h2h1ratio = this.prms.h2.v / this.prms.h1.v;
if (h2h1ratio < 0.8) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_WEIR_SUBMERSION_LOWER_THAN_08,
MessageCode.WARNING_WEIR_SUBMERGENCE_LOWER_THAN_08,
{
h1: this.prms.h1.v,
h2: this.prms.h2.v,
submersionPerc: this.computeSubmersionPercentage().toString()
submergencePerc: this.computeSubmergencePercentage().toString()
}
));
}
......
......@@ -30,11 +30,11 @@ export class StructureWeirSubmergedLarinier extends RectangularStructure {
const h2h1ratio = this.prms.h2.v / this.prms.h1.v;
if (h2h1ratio < 0.7 || h2h1ratio > 0.9) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09,
MessageCode.WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09,
{
h1: this.prms.h1.v,
h2: this.prms.h2.v,
submersionPerc: this.computeSubmersionPercentage().toString()
submergencePerc: this.computeSubmergencePercentage().toString()
}
));
}
......
......@@ -17,11 +17,11 @@ export class StructureWeirVillemonte extends StructureWeirFree {
this.currentResult = super.Calc(sVarCalc, rInit);
if ((this.prms.h2.v / this.prms.h1.v) > 0.7) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_NOTCH_SUBMERSION_GREATER_THAN_07,
MessageCode.WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07,
{
h1: this.prms.h1.v,
h2: this.prms.h2.v,
submersionPerc: this.computeSubmersionPercentage().toString()
submergencePerc: this.computeSubmergencePercentage().toString()
}
));
}
......
......@@ -603,12 +603,12 @@ export enum MessageCode {
/**
* La formule de l'échancrure n'est pas conseillée pour un ennoiement supérieur à 0.7
*/
WARNING_NOTCH_SUBMERSION_GREATER_THAN_07,
WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07,
/**
* La formule de la fente n'est pas conseillée pour un ennoiement inférieur à 0.7 et supérieur à 0.9
*/
WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09,
WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09,
/** PAR : la largeur est plus grande que la valeur d'alerte %max% */
WARNING_PAR_L,
......@@ -646,7 +646,7 @@ export enum MessageCode {
/**
* La formule du seuil noyé n'est pas conseillé pour un ennoiement inférieur à 0.8
*/
WARNING_WEIR_SUBMERSION_LOWER_THAN_08,
WARNING_WEIR_SUBMERGENCE_LOWER_THAN_08,
/**
* Vanne levante : ZDV > ZDV max
......
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