-
Mathias Chouet authored
merged cParamsCanal and ParamsSection Structures are now only defined by their LoiDebit (no more StructureType) Session : fixed serialization of lately registered Nubs Sections are now defined by a CalculatorType and a NodeType fixed bug in findFirstSingleParameter added tests for session serialisation
7b6e5403
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 dénoyé ("Vanne dénoyé")
*/
export class StructureRectangularOrificeFree extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.RectangularOrificeFree;
this.prms.W.visible = true;
}
/**
* Calcul du débit avec l'équation classique d'un orifice dénoyé
* @param sVarCalc Variable à calculer (doit être égale à Q ici)
*/
public Equation(sVarCalc: string): Result {
Structure.CheckEquation(sVarCalc);
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);
return new Result(v, this, data);
}
protected getFlowRegime() {
return StructureFlowRegime.FREE;
}
}