Commit 071bf9e2 authored by Dorchies David's avatar Dorchies David
Browse files

feat(MacroRugo): introduce r coefficient in fFr

- This rQ is different than the one use for the calculation of Vmax

Refs #295
parent b655be2b
......@@ -40,6 +40,10 @@ export class MacroRugo extends FishPass {
private _cache: { [key: string]: number };
public paramFhStar: [number, number, number] = [1, 0.8, 1.5];
/** Rapport pour le calcul de fFr */
public rQ: number = 1.;
constructor(prms: MacrorugoParams, dbg: boolean = false) {
super(prms, dbg);
this._cache = {};
......@@ -119,7 +123,7 @@ export class MacroRugo extends FishPass {
r.resultElement.values.Fr = resFr;
// Vitesse maximale
r.resultElement.values.Vmax = Math.max(
this.r * r.resultElement.values.Vg * Math.sqrt(this.CalcfFr(resVdeb)),
this.rV * r.resultElement.values.Vg * Math.sqrt(this.CalcfFr(resVdeb, 1)),
r.resultElement.values.Vg
);
}
......@@ -235,16 +239,13 @@ export class MacroRugo extends FishPass {
// Reset cached variables depending on Q (or not...)
this._cache = {};
/** adimensional water depth */
const hstar: number = this.prms.Y.v / this.prms.PBH.v;
switch (this.flowType) {
case MacroRugoFlowType.SUBMERGED:
return this.resolveQSubmerged();
case MacroRugoFlowType.EMERGENT:
return this.resolveQEmergent();
case MacroRugoFlowType.QUASI_EMERGENT:
const a = (hstar - 1) / (MacroRugo.limitSubmerg - 1);
const a = (this.prms.Y.v / this.prms.PBH.v - 1) / (MacroRugo.limitSubmerg - 1);
return (1 - a) * this.resolveQEmergent() + a * this.resolveQSubmerged();
}
}
......@@ -450,14 +451,13 @@ 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.5 pour un plot à face plane Cd0​=2.6
* Voir #283
* r = 1.1 pour un plot circulaire Cd0​=1 et r = 1.5 pour un plot à face plane Cd0​=2
*/
private get r(): number {
if (this._cache.r === undefined) {
this._cache.r = 0.4 * this.prms.Cd0.v + 0.7;
private get rV(): number {
if (this._cache.rV === undefined) {
this._cache.rV = 0.4 * this.prms.Cd0.v + 0.7;
}
return this._cache.r;
return this._cache.rV;
}
/**
......@@ -473,14 +473,14 @@ export class MacroRugo extends FishPass {
/**
* Calculation of Froude correction function (Cassan et al. 2014, Eq. 19)
*/
private CalcfFr(U0: number): number {
private CalcfFr(U0: number, rQ: number = this.rQ): number {
// tslint:disable-next-line:variable-name
const Fr = U0 /
(1 - Math.sqrt(MacroRugo.fracAxAy * this.prms.C.v)) /
Math.sqrt(MacroRugo.g * this.prms.Y.v);
if (Fr < 1.3) {
return Math.pow(Math.min(1 / (1 - Math.pow(Fr, 2) / 4), Math.pow(Fr, -2 / 3)), 2);
return Math.pow(Math.min(rQ / (1 - Math.pow(Fr, 2) / 4), Math.pow(Fr, -2 / 3)), 2);
} else {
return Math.pow(Fr, -4 / 3);
}
......
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