Commit 97d137af authored by Dorchies David's avatar Dorchies David
Browse files

feat(MacroRugo): adjustment of r_Q

Refs #295
parent 7f710648
function [f] = calcfFr(Frg, rQ)
if ~exists("rQ","local") then
if(Cd0 > 1.99) then
rQ = 1.21
else
rQ = 1.12
end
rQ = 0.091 * Cd0 + 1.033
end
if abs(Frg) < 1
......
......@@ -28,7 +28,7 @@ printf("\n*** Emergent conditions Cd=2***\n")
// *****************************************************************************
h = 0.4
k = 0.6
Cd0 = 2.// Forme plane
Cd0 = 2. // Forme plane
macrorugo_searchQ(ks, D, k, Cd0, S, B, h, C, z_amont, long, bDbg)
// *****************************************************************************
......
......@@ -4,29 +4,29 @@ import { MacrorugoParams } from "../../src/macrorugo/macrorugo_params";
import { checkResult } from "../test_func";
/*
*** Emergent conditions Cd=1.15***
*** Emergent conditions Cd=1.***
*** INPUT ***
ks: 0.010000,
D: 0.500000,
k = 0.600000
Cd0: 1.150000,
Cd0: 1.000000,
S: 0.050000,
B: 1.000000,
h: 0.400000,
C: 0.130000,
RESULTS:
find_Q_nat(0.686550)=0.719273
Q=0.398841 fVal=0.000000
find_Q_nat(0.736243)=0.625925
Q=0.485873 fVal=0.000000
ZF2: 12.200000,
Vdeb: 0.997103,
Vg: 1.559326,
Fr: 0.787177,
PV: 489.078970,
Vdeb: 1.214683,
Vg: 1.899590,
Fr: 0.958949,
PV: 595.801953,
flowcond: emergent,
Vmax: 1.829035,
Vmax: 1.953423,
V_technique: 1.748990,
q_technique: 0.312101,
Strickler: 8.213879,
Strickler: 10.006248
*/
function macroRugoInstanceEmergentCd1(): MacroRugo {
......@@ -36,7 +36,7 @@ function macroRugoInstanceEmergentCd1(): MacroRugo {
6, // L
1, // B
0.05, // If
0.398841, // Q
0.485873, // Q
0.4, // h
0.01, // Ks
0.13, // C
......@@ -50,12 +50,12 @@ function macroRugoInstanceEmergentCd1(): MacroRugo {
const macroRugoExtraResultEmergentCd1: { [key: string]: number | MacroRugoFlowType } = {
ENUM_MacroRugoFlowType: MacroRugoFlowType.EMERGENT,
ZF2: 12.200000,
Vdeb: 0.997103,
Vg: 1.559326,
Fr: 0.787177,
PV: 489.078970,
Vmax: 1.829035,
Strickler: 8.213879
Vdeb: 1.214683,
Vg: 1.899590,
Fr: 0.958949,
PV: 595.801953,
Vmax: 1.953423,
Strickler: 10.006248
};
/*
......@@ -64,81 +64,81 @@ const macroRugoExtraResultEmergentCd1: { [key: string]: number | MacroRugoFlowTy
ks: 0.010000,
D: 0.500000,
k = 0.600000
Cd0: 2.070000,
Cd0: 2.000000,
S: 0.050000,
B: 1.000000,
h: 0.400000,
C: 0.130000,
RESULTS:
find_Q_nat(0.503712)=0.614201
Q=0.258032 fVal=0.000000
find_Q_nat(0.512451)=0.610003
Q=0.268450 fVal=0.000000
ZF2: 12.200000,
Vdeb: 0.645079,
Vg: 1.008811,
Fr: 0.509267,
PV: 316.411237,
Vdeb: 0.671125,
Vg: 1.049543,
Fr: 0.529829,
PV: 329.186776,
flowcond: emergent,
Vmax: 1.510258,
V_technique: 1.748990,
q_technique: 0.312101,
Strickler: 5.313996
Vmax: 1.580263,
V_technique: 1.427752,
q_technique: 0.266857,
Strickler: 5.528556
*/
function macroRugoInstanceEmergentCd2(): MacroRugo {
const nub: MacroRugo = macroRugoInstanceEmergentCd1();
nub.prms.Cd0.singleValue = 2;
nub.prms.Q.singleValue = 0.258032;
nub.prms.Q.singleValue = 0.268450;
return nub;
}
const macroRugoExtraResultEmergentCd2: { [key: string]: number | MacroRugoFlowType } = {
ENUM_MacroRugoFlowType: MacroRugoFlowType.EMERGENT,
ZF2: 12.200000,
Vdeb: 0.645079,
Vg: 1.008811,
Fr: 0.509267,
PV: 316.411237,
Vmax: 1.510258,
Strickler: 5.313996
Vdeb: 0.671125,
Vg: 1.049543,
Fr: 0.529829,
PV: 329.186776,
Vmax: 1.580263,
Strickler: 5.528556
};
/*
*** Submerged conditions Cd=1.15***
*** Submerged conditions Cd=1***
*** INPUT ***
ks: 0.010000,
D: 0.500000,
k = 0.600000
Cd0: 1.150000,
Cd0: 1.000000,
S: 0.050000,
B: 1.000000,
h: 0.800000,
C: 0.130000,
RESULTS:
find_Q_nat(1.373101)=0.102117
Q=1.454795 fVal=0.000000
find_Q_nat(1.472487)=0.092897
Q=1.546804 fVal=0.000000
ZF2: 12.200000,
Vdeb: 1.818493,
Vg: 2.843863,
Fr: 1.015147,
PV: 891.970987,
Vdeb: 1.933505,
Vg: 3.023725,
Fr: 1.079351,
PV: 948.384279,
flowcond: immerge,
q_technique: 1.060933,
Strickler: 9.436988,
Strickler: 10.033836,
*/
function macroRugoInstanceSubmerged(): MacroRugo {
const nub: MacroRugo = macroRugoInstanceEmergentCd1();
nub.prms.Y.singleValue = 0.8;
nub.prms.Q.singleValue = 1.454795;
nub.prms.Q.singleValue = 1.546804;
return nub;
}
const macroRugoExtraResultSubmerged: { [key: string]: number | MacroRugoFlowType } = {
ENUM_MacroRugoFlowType: MacroRugoFlowType.SUBMERGED,
ZF2: 12.200000,
Vdeb: 1.818493,
PV: 891.970987,
Strickler: 9.436988
Vdeb: 1.933505,
PV: 948.384279,
Strickler: 10.033836
};
function MacroRugoFactory(sInstance: string): MacroRugo {
......@@ -215,8 +215,8 @@ function macroRugoInstanceJalHyd85(): MacroRugo {
describe("Class MacroRugo: ", () => {
testMacroRugoConfig("EmergentCd1", 0.686550, 0.719273, macroRugoExtraResultEmergentCd1);
testMacroRugoConfig("EmergentCd2", 0.503712, 0.614201, macroRugoExtraResultEmergentCd2);
testMacroRugoConfig("EmergentCd1", 0.736243, 0.625925, macroRugoExtraResultEmergentCd1);
testMacroRugoConfig("EmergentCd2", 0.512451, 0.610003, macroRugoExtraResultEmergentCd2);
// Le test passe en debug mais pas sous Jasmine !??
// describe(`Condition Submerged` , () => {
// it(`resolveAlpha_t(0.07) should be 0.074752`, () => {
......@@ -224,7 +224,7 @@ describe("Class MacroRugo: ", () => {
// expect(macroRugoInstanceSubmerged()["resolveAlpha_t"](0.07)).toBeCloseTo(0.074752, 5);
// });
// });
testMacroRugoConfig("Submerged", 1.373101, 0.102117, macroRugoExtraResultSubmerged);
testMacroRugoConfig("Submerged", 1.472487, 0.092897, macroRugoExtraResultSubmerged);
describe("JalHyd #85", () => {
it("CalcSerie Q should return the good result :)", () => {
......@@ -232,7 +232,7 @@ describe("Class MacroRugo: ", () => {
const nubMR2 = macroRugoInstanceJalHyd85();
nubMR.prms.Y.setValues(0.7, 1.2, 0.1);
const aQ: number[] = [0.681442, 0.808861, 1.132263, 1.429118, 1.790897, 2.215953];
const aQ: number[] = [0.656297, 0.778636, 1.211155, 1.523789, 1.902439, 2.345380];
nubMR.CalcSerie();
for (let i = 0; i < aQ.length; i++) {
......
......@@ -43,7 +43,7 @@ export class MacroRugo extends FishPass {
private paramFhStar: [number, number, number] = [1, 0.8, 1.5];
/** Coefficient used in rQ */
private paramRQ: [number, number] = [0.09, 1.03];
private paramRQ: [number, number] = [0.091, 1.033];
/** Coefficient used in rQ */
private paramRV: [number, number] = [0.2, 1];
......
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