An error occurred while loading the file. Please try again.
-
Arnaud WATLET authored1b6231c9
/**
* IMPORTANT !
* Décommenter temporairement la ligne suivante (import { } from "./mock_jasmine")
* Pour exécuter ce code dans le débugger.
* Faire de même avec le fichier test_func.ts
*/
// import { describe, expect, it, xdescribe, xit } from "../mock_jasmine";
import { ParamDefinition } from "../../src/index";
import { Cloisons } from "../../src/structure/cloisons";
import { CloisonsParams } from "../../src/structure/cloisons_params";
import { CreateStructure } from "../../src/structure/factory_structure";
import { StructureKiviParams } from "../../src/structure/structure_kivi";
import { LoiDebit } from "../../src/structure/structure_props";
// tslint:disable-next-line:max-line-length
import { RectangularStructureParams, StructureWeirSubmergedLarinier } from "../../src/structure/structure_weir_submerged_larinier";
import { testParallelStructures } from "./functions";
const cloisons: Cloisons = new Cloisons(
new CloisonsParams(
0, // Débit total (m3/s)
102, // Cote de l'eau amont (m)
10, // Longueur des bassins (m)
1, // Largeur des bassins (m)
1, // Profondeur moyenne (m)
0.5 // Hauteur de chute (m)
),
false // debug
);
const fente: StructureWeirSubmergedLarinier = new StructureWeirSubmergedLarinier(
new RectangularStructureParams(
0,
101,
102,
101.5,
0.2,
0.65
)
);
cloisons.addChild(fente);
describe("Class Cloisons: ", () => {
describe("Calc(Q) Fente noyée (Larinier 1992)", () => {
it("vCalc should return 0.407", () => {
expect(cloisons.Calc("Q").vCalc).toBeCloseTo(0.407, 3);
});
it("extraResults.PV should return 199.7", () => {
expect(cloisons.Calc("Q").extraResults.PV).toBeCloseTo(199.7, 1);
});
});
const c2: Cloisons = new Cloisons(
new CloisonsParams(
0, // Débit total (m3/s)
102, // Cote de l'eau amont (m)
10, // Longueur des bassins (m)
1, // Largeur des bassins (m)
1, // Profondeur moyenne (m)
0.5 // Hauteur de chute (m)
),
false // debug
);
// Ajout d'une structure de chaque type dans Cloisons
const iLoiDebits: LoiDebit[] = [
LoiDebit.OrificeSubmerged,
LoiDebit.WeirSubmergedLarinier,