Commit 4e6145c3 authored by Dorchies David's avatar Dorchies David
Browse files

#22 MAJ pour IHM nghyd

parent f75ae6c6
......@@ -8,8 +8,7 @@
import { ParamCalculability, ParamValueMode } from "../../src";
import { MacroRugo, MacroRugoFlowType, MacrorugoParams } from "../../src/macrorugo/macrorugo";
import { Result } from "../../src/util/result";
import { checkResult, checkPercent } from "../test_func";
import { checkPercent, checkResult } from "../test_func";
function macroRugoInstanceEmergent(): MacroRugo {
return new MacroRugo(
......
......@@ -17,7 +17,8 @@ export enum CalculatorType {
Structure, // ouvrages hydrauliques simples
ParallelStructure, // ouvrages hydrauliques en parallèle
Dever, // Outil Cassiopée Dever
Cloisons // Outil Cassiopée PAB Cloisons
Cloisons, // Outil Cassiopée PAB Cloisons
MacroRugo // Passe à enrochement simple (Cassan et al., 2016)
}
/**
......
......@@ -72,7 +72,7 @@ export class MacroRugo extends Nub {
// Vitesse maximale
r.extraResults.V = r.extraResults.Vdeb * this.calc_fFr(r.extraResults.Vdeb);
// Puissance dissipée
r.extraResults.P = 1000 * MacroRugo.g * this.V(this.prms.Q) / this.prms.B.v * this.prms.If.v;
r.extraResults.PV = 1000 * MacroRugo.g * this.V(this.prms.Q) / this.prms.B.v * this.prms.If.v;
// Type d'écoulement
if (this.prms.Y.v / this.prms.PBH.v < 1) {
r.extraResults.FlowType = MacroRugoFlowType.EMERGENT;
......@@ -95,14 +95,14 @@ export class MacroRugo extends Nub {
cV = [3.35, 0.27, 0.53];
} else {
cQ = [0.815, 1.45, 0.557, -0.456];
cV = [4.54, 0.32, 0.56]
cV = [4.54, 0.32, 0.56];
}
}
r.extraResults.Q2 = cQ[0] * Math.pow(this.prms.Y.v / hdk, cQ[1]) *
r.extraResults.Q_GuideTech = cQ[0] * Math.pow(this.prms.Y.v / hdk, cQ[1]) *
Math.pow(this.prms.If.v, cQ[2]) * Math.pow(this.prms.C.v, cQ[3]) *
Math.sqrt(MacroRugo.g * this.prms.PBD.v) * this.prms.PBD.v * this.prms.B.v;
if (this.prms.Y.v / this.prms.PBH.v <= MacroRugo.limitSubmerg) {
r.extraResults.V2 = cV[0] * Math.pow(this.prms.Y.v / this.prms.PBD.v, cV[1]) *
r.extraResults.V_GuideTech = cV[0] * Math.pow(this.prms.Y.v / this.prms.PBD.v, cV[1]) *
Math.pow(this.prms.If.v, cQ[2]) * Math.sqrt(MacroRugo.g * this.prms.PBD.v);
}
return r;
......
......@@ -5,6 +5,7 @@ import { Props, SessionNub } from "./session_nub";
// Calculettes
import { ConduiteDistrib, ConduiteDistribParams } from "./cond_distri";
import { LechaptCalmon, LechaptCalmonParams } from "./lechaptcalmon";
import { MacroRugo, MacrorugoParams } from "./macrorugo/macrorugo";
import { PabDimension, PabDimensionParams } from "./pab/pab_dimension";
import { PabPuissance, PabPuissanceParams } from "./pab/pab_puissance";
import { RegimeUniforme } from "./regime_uniforme";
......@@ -353,6 +354,25 @@ export class NubFactory {
);
}
case CalculatorType.MacroRugo:
{
return new MacroRugo(
new MacrorugoParams(
12.5, // ZF1
6, // L
1, // B
0.05, // If
1.57, // Q
0.6, // h
0.01, // Ks
0.05, // C
0.5, // D
0.8, // k
1.5 // Cd0
)
);
}
default:
throw new Error(
// tslint:disable-next-line:max-line-length
......
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