An error occurred while loading the file. Please try again.
-
Mathias Chouet authored
merged cParamsCanal and ParamsSection Structures are now only defined by their LoiDebit (no more StructureType) Session : fixed serialization of lately registered Nubs Sections are now defined by a CalculatorType and a NodeType fixed bug in findFirstSingleParameter added tests for session serialisation
7b6e5403
import { cSnTrapez, ParamsSectionTrapez } from "../../src/section/section_trapez";
import { precDist } from "../test_config";
import { checkResult } from "../test_func";
let paramCnl: ParamsSectionTrapez;
let sect: cSnTrapez;
describe("Section paramétrée trapèze :", () => {
beforeEach(() => {
paramCnl = new ParamsSectionTrapez(2.5, // largeur de fond
0.56, // fruit
0.8, // tirant d'eau
40, // Ks=Strickler
10, // Q=Débit
0.001, // If=pente du fond
1, // YB= hauteur de berge
);
paramCnl.Pr.v = precDist;
sect = new cSnTrapez(paramCnl);
});
describe("torrentiel :", () => {
// charge spécifique
it("Hs should equal to 1.716", () => {
checkResult(sect.CalcSection("Hs"), 1.716);
});
// charge critique
it("Hsc should equal to 1.534", () => {
checkResult(sect.CalcSection("Hsc"), 1.534);
});
// largeur au miroir
it("B should equal to 3.396", () => {
checkResult(sect.CalcSection("B"), 3.396);
});
// périmètre mouillé
it("P should equal to 4.334", () => {
checkResult(sect.CalcSection("P"), 4.334);
});
// surface mouillée
it("S should equal to 2.358", () => {
checkResult(sect.CalcSection("S"), 2.358);
});
// rayon hydraulique
it("R should equal to 0.544", () => {
checkResult(sect.CalcSection("R"), 0.544);
});
// vitesse moyenne
it("V should equal to 4.24", () => {
checkResult(sect.CalcSection("V"), 4.24);
});
// nombre de Froude
it("Fr should equal to 1.625", () => {
checkResult(sect.CalcSection("Fr"), 1.625);
});
// tirant d'eau critique
it("Yc should equal to 1.074", () => {
checkResult(sect.CalcSection("Yc"), 1.074);
});
// tirant d'eau normal
it("Yn should equal to 2.275", () => {
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
checkResult(sect.CalcSection("Yn"), 2.275);
});
// tirant d'eau fluvial
it("Yf should equal to 1.502", () => {
checkResult(sect.CalcSection("Yf"), 1.502);
});
// tirant d'eau torrentiel
it("Yt should equal to 0.8", () => {
checkResult(sect.CalcSection("Yt"), 0.8);
});
// tirant d'eau conjugué
it("Yco should equal to 1.398", () => {
checkResult(sect.CalcSection("Yco"), 1.398);
});
// perte de charge
it("J should equal to 0.025", () => {
// paramCnl.v.Prec = 0.00001;
checkResult(sect.CalcSection("J"), 0.025);
});
// Variation linéaire de l'énergie spécifique
it("I-J should equal to -0.024", () => {
checkResult(sect.CalcSection("I-J"), -0.024);
});
// impulsion hydraulique
it("Imp should equal to 51187.203", () => {
checkResult(sect.CalcSection("Imp"), 51187.203);
});
// force tractrice (contrainte de cisaillement)
it("Tau0 should equal to 135.020", () => {
checkResult(sect.CalcSection("Tau0"), 135.020);
});
});
});