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

feat(macrorugo): new calculation of r

- for Cd0=1.1 and r = 1.1 for circular blocks
- for Cd0=2.6 and r = 1.5 for plane faced blocks

Refs #283
parent f3da78a3
......@@ -35,7 +35,7 @@ function macrorugo_resultComp(z_amont, S, long, Q, L, pf, C, Cd0, h, D)
q_technique=0.815*(pf/D)^1.45*S^0.557*C^(-0.456)*(9.81*D)^0.5.*D*L;
V_technique=4.54*(pf/D)^0.32*S^0.56*(9.81*D)^0.5;
end
coeff_contraction=0.2*Cd0+0.9;
coeff_contraction = (Cd0 * 0.4 + 1.21) / 1.5;
Vmax=Vg.*coeff_contraction*calcfFr(Fr);
print_r("Vmax");
print_r("V_technique");
......
......@@ -23,7 +23,7 @@ Vg: 1.804786,
Fr = 0.743902
P = 566.066964
flowcond = emergent
Vmax = 2.722572
Vmax = 2.673954
V_technique = 1.991299
q_technique = 0.561860
Strickler = 7.255093
......@@ -54,7 +54,7 @@ const macroRugoExtraResultEmergentCd11: { [key: string]: number | MacroRugoFlowT
Vg: 1.804786,
Fr: 0.743902,
PV: 566.066964,
Vmax: 2.722572,
Vmax: 2.673954,
Strickler: 7.255093
};
......@@ -78,7 +78,7 @@ Vg: 1.255512,
Fr: 0.517500,
PV: 393.788411,
flowcond: emergent,
Vmax: 2.047863,
Vmax: 2.163235,
V_technique: 1.991299,
q_technique: 0.561860,
Strickler: 5.047056
......@@ -98,7 +98,7 @@ const macroRugoExtraResultEmergentCd26: { [key: string]: number | MacroRugoFlowT
Vg: 1.255512,
Fr: 0.517500,
PV: 393.788411,
Vmax: 2.047863,
Vmax: 2.163235,
Strickler: 5.047056
};
......
......@@ -1010,7 +1010,7 @@ describe("vérificateur de franchissement −", () => {
it("Largeur franchissable insuffisante", () => {
// contexte
Session.getInstance().clear();
Session.getInstance().unserialise(`{"header":{"source":"jalhyd","format_version":"1.3","created":"2021-02-13T10:21:53.436Z"},"settings":{"precision":1e-7,"maxIterations":100,"displayPrecision":3},"documentation":"","session":[{"uid":"b2tnbW","props":{"calcType":"MacroRugoCompound","inclinedApron":"INCLINED"},"meta":{"title":"M-Rugo complexe"},"children":[{"uid":"MHV3dW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.052},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"aDJrOG","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.156},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"MXF4cW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.26},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"czE5Y2","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.364},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"ajZteW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.458},{"symbol":"B","mode":"SINGLE","value":0.722}]}],"parameters":[{"symbol":"L","mode":"SINGLE","value":1},{"symbol":"If","mode":"SINGLE","value":0.05},{"symbol":"Ks","mode":"SINGLE","value":0.01},{"symbol":"C","mode":"SINGLE","value":0.2},{"symbol":"PBD","mode":"SINGLE","value":0.4},{"symbol":"PBH","mode":"SINGLE","value":0.6},{"symbol":"Cd0","mode":"SINGLE","value":2.6},{"symbol":"Z1","mode":"SINGLE","value":13.1},{"symbol":"ZRL","mode":"SINGLE","value":12.5},{"symbol":"ZRR","mode":"SINGLE","value":12},{"symbol":"BR","mode":"SINGLE","value":4.3},{"symbol":"DH","mode":"SINGLE","value":3}]},{"uid":"Z215Y2","props":{"calcType":"Verificateur","nubToVerify":"b2tnbW","speciesList":["dDZzOX"]},"meta":{"title":"Vérification"},"children":[],"parameters":[]},{"uid":"dDZzOX","props":{"calcType":"Espece","divingJetSupported":"NOT_SUPPORTED","species":"SPECIES_CUSTOM"},"meta":{"title":"Espèce"},"children":[],"parameters":[{"symbol":"OK","mode":"CALCUL"},{"symbol":"DHMaxS","mode":"SINGLE","value":0.35},{"symbol":"DHMaxP","mode":"SINGLE","value":0.35},{"symbol":"BMin","mode":"SINGLE","value":0.3},{"symbol":"PMinS","mode":"SINGLE","value":1},{"symbol":"PMinP","mode":"SINGLE","value":1},{"symbol":"LMinS","mode":"SINGLE","value":2.5},{"symbol":"LMinP","mode":"SINGLE","value":2.5},{"symbol":"HMin","mode":"SINGLE","value":0.3},{"symbol":"YMin","mode":"SINGLE","value":0.6},{"symbol":"VeMax","mode":"SINGLE","value":2},{"symbol":"YMinSB","mode":"SINGLE","value":0.2},{"symbol":"YMinPB","mode":"SINGLE","value":0.3},{"symbol":"PVMaxPrec","mode":"SINGLE","value":150},{"symbol":"PVMaxLim","mode":"SINGLE","value":800000}]}]}`);
Session.getInstance().unserialise(`{"header":{"source":"jalhyd","format_version":"1.3","created":"2021-02-13T10:21:53.436Z"},"settings":{"precision":1e-7,"maxIterations":100,"displayPrecision":3},"documentation":"","session":[{"uid":"b2tnbW","props":{"calcType":"MacroRugoCompound","inclinedApron":"INCLINED"},"meta":{"title":"M-Rugo complexe"},"children":[{"uid":"MHV3dW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.052},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"aDJrOG","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.156},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"MXF4cW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.26},{"symbol":"B","mode":"SINGLE","value":0.894}]},{"uid":"czE5Y2","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.364},{"symbol":"B","mode":"SINGLE","value":0.895}]},{"uid":"ajZteW","props":{"calcType":"MacroRugo"},"children":[],"parameters":[{"symbol":"ZF1","mode":"SINGLE","value":12.458},{"symbol":"B","mode":"SINGLE","value":0.722}]}],"parameters":[{"symbol":"L","mode":"SINGLE","value":1},{"symbol":"If","mode":"SINGLE","value":0.04},{"symbol":"Ks","mode":"SINGLE","value":0.01},{"symbol":"C","mode":"SINGLE","value":0.2},{"symbol":"PBD","mode":"SINGLE","value":0.4},{"symbol":"PBH","mode":"SINGLE","value":0.6},{"symbol":"Cd0","mode":"SINGLE","value":2.6},{"symbol":"Z1","mode":"SINGLE","value":13.1},{"symbol":"ZRL","mode":"SINGLE","value":12.5},{"symbol":"ZRR","mode":"SINGLE","value":12},{"symbol":"BR","mode":"SINGLE","value":4.3},{"symbol":"DH","mode":"SINGLE","value":3}]},{"uid":"Z215Y2","props":{"calcType":"Verificateur","nubToVerify":"b2tnbW","speciesList":["dDZzOX"]},"meta":{"title":"Vérification"},"children":[],"parameters":[]},{"uid":"dDZzOX","props":{"calcType":"Espece","divingJetSupported":"NOT_SUPPORTED","species":"SPECIES_CUSTOM"},"meta":{"title":"Espèce"},"children":[],"parameters":[{"symbol":"OK","mode":"CALCUL"},{"symbol":"DHMaxS","mode":"SINGLE","value":0.35},{"symbol":"DHMaxP","mode":"SINGLE","value":0.35},{"symbol":"BMin","mode":"SINGLE","value":0.3},{"symbol":"PMinS","mode":"SINGLE","value":1},{"symbol":"PMinP","mode":"SINGLE","value":1},{"symbol":"LMinS","mode":"SINGLE","value":2.5},{"symbol":"LMinP","mode":"SINGLE","value":2.5},{"symbol":"HMin","mode":"SINGLE","value":0.3},{"symbol":"YMin","mode":"SINGLE","value":0.6},{"symbol":"VeMax","mode":"SINGLE","value":2},{"symbol":"YMinSB","mode":"SINGLE","value":0.2},{"symbol":"YMinPB","mode":"SINGLE","value":0.3},{"symbol":"PVMaxPrec","mode":"SINGLE","value":150},{"symbol":"PVMaxLim","mode":"SINGLE","value":800000}]}]}`);
const v = Session.getInstance().findNubByUid("Z215Y2") as Verificateur;
// résultat
const res = v.CalcSerie();
......
......@@ -431,12 +431,12 @@ export class MacroRugo extends FishPass {
/**
* Calcul du ratio entre la vitesse moyenne à l'aval d'un block et la vitesse maximale
* r = 1.1 pour un plot circulaire Cd0​=1.1 et r = 1.35 pour un plot à face plane Cd0​=2.6
* r = 1.1 pour un plot circulaire Cd0​=1.1 et r = 1.5 pour un plot à face plane Cd0​=2.6
* Voir #283
*/
private get r(): number {
if (this._cache.r === undefined) {
this._cache.r = this.prms.Cd0.v / 6 + 11 / 12;
this._cache.r = (this.prms.Cd0.v * 0.4 + 1.21) / 1.5;
}
return this._cache.r;
}
......
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