@@ -33,27 +35,27 @@ export class MacroRugo extends Nub {
}
publicEquation(sVarCalc:string):Result{
constQ=uniroot(this.calcQ,0,1E7);
constQ=uniroot(this.calcQ,this,0,1E7);
returnnewResult(Q);
}
/**
* Equation from Cassan, L., Laurens, P., 2016. Design of emergent and submerged rock-ramp fish passes. Knowledge & Management of Aquatic Ecosystems 45.
* Equation from Cassan, L., Laurens, P., 2016. Design of emergent and submerged rock-ramp fish passes.
* Knowledge & Management of Aquatic Ecosystems 45.
* @param sVarCalc Variable à calculer
*/
publiccalcQ(Q:number):number{
publiccalcQ(this:MacroRugo,Q:number):number{
// Reset cached variables depending on Q (or not...)
this._cache={};
/** Longueur (m) */
constL:number=this.prms.L.v;
constL:number=this.prms.L.v;
/** Tirant d'eau (m) */
consth:number=this.prms.Y.v;
/** Paramètre de bloc : Forme (1 pour rond, 2 pour carré)
* drag coefficient of a block considering a single block
infinitely high with F ≪ 1;
* infinitely high with F ≪ 1;
*/
// tslint:disable-next-line:variable-name
constCd0:number=this.prms.Cd0.v;
/** Concentration de blocs (-) */
constC:number=this.prms.C.v;
...
...
@@ -62,12 +64,11 @@ infinitely high with F ≪ 1;
/** Paramètre de bloc : Hauteur (m) */
constk:number=this.prms.PBH.v;
/** Pente (m/m) */
constS:number=this.prms.If.v;
constS:number=this.prms.If.v;
constg=MacroRugo.g;
constkappa=0.41;// von Karman constant
/** Calulated average velocity */
letu:number;
if(h/k>1.1){
...
...
@@ -76,7 +77,7 @@ infinitely high with F ≪ 1;
/** Velocity at the bed §2.3.2 Cassan et al., 2016 */
this.u0=Math.sqrt(2*g*S*D*this.R/(Cd0*C));
/** turbulent length scale (m) within the blocks layer (alpha_t) */
constalpha=uniroot(this.calcAlpha_t,0,100);
constalpha=uniroot(this.calcAlpha_t,this,0,100);
/** averaged velocity at the top of blocks (m.s-1) */
constuk=this.calcUz(alpha);
/** Equation (13) Cassan et al., 2016 */
...
...
@@ -84,17 +85,22 @@ infinitely high with F ≪ 1;
/** Equation (14) Cassan et al., 2016 */
constz0=(k-d)*Math.exp(-kappa*uk/this.ustar);
/** Integral of Equation (12) Cassan et al., 2016 */