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, StructureFlowMode, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
export { RectangularStructureParams };
/**
* Equation classique seuil dénoyé
*/
export class StructureWeirFree extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.WeirFree;
}
/**
* Calcul analytique Q = f(Cd, L, h1, h2, W) seuil dénoyé
* @param sVarCalc Variable à calculer (doit être "Q")
*/
public CalcQ(): Result {
const data = this.getResultData();
const v = this.prms.Cd.v * this.prms.L.v * Structure.R2G * Math.pow(this.prms.h1.v, 1.5);
return new Result(v, this, data);
}
protected getFlowRegime() {
return StructureFlowRegime.FREE;
}
protected getFlowMode() {
return StructureFlowMode.WEIR;
}
}