An error occurred while loading the file. Please try again.
-
Dorchies David authored
#33 Structure: Better management of discharge inversion. PAB tests are better for discharge calculation but still wrong.
b89e41a6
import { Result } from "../util/result";
import { RectangularStructure } from "./rectangular_structure";
import { RectangularStructureParams } from "./rectangular_structure_params";
import { Structure, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
export { RectangularStructureParams };
/**
* Equation classique orifice noyé ("Vanne noyé")
*/
export class StructureRectangularOrificeSubmerged extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.RectangularOrificeSubmerged;
if (prms.W.v !== Infinity) {
this._isZDVcalculable = false;
}
this.prms.W.visible = true;
}
/**
* Calcul du débit avec l'équation classique d'un orifice noyé
* @param sVarCalc Variable à calculer (doit être égale à Q ici)
*/
public CalcQ(): Result {
const data = this.getResultData();
const v = this.prms.Cd.v * Math.min(this.prms.W.v, this.prms.h1.v) * this.prms.L.v
* Structure.R2G * Math.sqrt(this.prms.h1.v - this.prms.h2.v);
return new Result(v, this, data);
}
protected getFlowRegime() {
return StructureFlowRegime.SUBMERGED;
}
}