Commit cd29abf3 authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

OrificeFree: warn when Z2 > Zco

parent 5b20fa0e
import { ParamCalculability } from "../param/param-definition";
import { Structure, StructureFlowMode, StructureFlowRegime } from "../structure/structure";
import { Message, MessageCode } from "../util/message";
import { Result } from "../util/result";
import { StructureOrificeFreeParams } from "./structure_orifice_free_params";
import { LoiDebit } from "./structure_props";
......@@ -22,6 +23,20 @@ export class StructureOrificeFree extends Structure {
return this._prms as StructureOrificeFreeParams;
}
public Calc(sVarCalc: string, rInit?: number): Result {
this.currentResult = super.Calc(sVarCalc, rInit);
if (this._loiDebit === LoiDebit.OrificeFree && this.prms.Z2.v > this.prms.Zco.v) {
this._result.resultElement.addMessage(new Message(
MessageCode.WARNING_ORIFICE_FREE_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
{
Z2: this.prms.Z2.v,
Zco: this.prms.Zco.v
}
));
}
return this._result;
}
/**
* Calcul du débit avec l'équation classique d'un orifice dénoyé
*/
......
......@@ -311,6 +311,11 @@ export enum MessageCode {
*/
WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
/**
* La cote de l'eau aval est plus élevée que la cote du centre de l'orifice (ennoiement possible)
*/
WARNING_ORIFICE_FREE_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION,
/**
* Grille orientée, préconisation pour le guidage des poissons : α ≤ 45°
*/
......
Markdown is supported
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