Commit e38f62bd authored by Dorchies David's avatar Dorchies David
Browse files

feat(macrorugo): Add Vg and remove Fr, Vmax and Vg for submerged regime

Refs #285
parent eb955c94
......@@ -137,8 +137,6 @@ const macroRugoExtraResultSubmerged: { [key: string]: number | MacroRugoFlowType
ENUM_MacroRugoFlowType: MacroRugoFlowType.SUBMERGED,
ZF2: 12.200000,
Vdeb: 1.611506,
Vg: 2.520165,
Fr: 0.899600,
PV: 790.443862,
Strickler: 8.362838
};
......
......@@ -108,15 +108,17 @@ export class MacroRugo extends FishPass {
resVdeb = 0;
}
r.resultElement.values.Vdeb = resVdeb;
// Froude
r.resultElement.values.Vg = r.resultElement.values.Vdeb / (1 - Math.sqrt(MacroRugo.fracAxAy * this.prms.C.v));
let resFr = r.resultElement.values.Vg / Math.sqrt(MacroRugo.g * this.prms.Y.v);
if (isNaN(resFr)) { // if Y == 0
resFr = 0;
if (this.flowType !== MacroRugoFlowType.SUBMERGED) {
// Froude
r.resultElement.values.Vg = r.resultElement.values.Vdeb / (1 - Math.sqrt(MacroRugo.fracAxAy * this.prms.C.v));
let resFr = r.resultElement.values.Vg / Math.sqrt(MacroRugo.g * this.prms.Y.v);
if (isNaN(resFr)) { // if Y == 0
resFr = 0;
}
r.resultElement.values.Fr = resFr;
// Vitesse maximale
r.resultElement.values.Vmax = this.r * r.resultElement.values.Vg * this.CalcfFr(resVdeb);
}
r.resultElement.values.Fr = resFr;
// Vitesse maximale
r.resultElement.values.Vmax = this.r * r.resultElement.values.Vg * this.CalcfFr(resVdeb);
// Puissance dissipée
r.resultElement.values.PV = 1000 * MacroRugo.g * r.resultElement.values.Vdeb * this.prms.If.v;
// Type d'écoulement
......@@ -191,6 +193,7 @@ export class MacroRugo extends FishPass {
PV: "W/m³",
Vdeb: "m/s",
Vmax: "m/s",
Vg: "m/s",
ZF2: "m",
Strickler: "SI"
}
......
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