An error occurred while loading the file. Please try again.
-
Dorchies David authored7872c66f
/**
* 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 rectangular_structure.ts
*/
// import { describe, expect, it, xdescribe } from "../mock_jasmine";
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureWeirFree } from "../../src/structure/structure_weir_free";
import { Result } from "../../src/util/result";
import { itCalcQ } from "./functions";
const structPrm: RectangularStructureParams = new RectangularStructureParams(1, 0, 1, 1, 2, 0.6, 0);
const structTest: StructureWeirFree = new StructureWeirFree(structPrm, false);
describe("Class StructureWeirFree: ", () => {
describe("Calcul Q avec W croissant: ", () => {
const W: number[] = [
0.000000, 0.100000, 0.200000, 0.300000, 0.400000, 0.500000, 0.600000,
0.700000, 0.800000, 0.900000, 1.000000, 1.100000, 1.200000, 1.300000];
const h1: number = 1.200000;
const Q: number[] = [0.000000, 6.987191, 6.987191, 6.987191, 6.987191, 6.987191,
6.987191, 6.987191, 6.987191, 6.987191, 6.987191, 6.987191, 6.987191, 6.987191];
for (let i = 0; i < Q.length; i++) {
itCalcQ(structTest, h1, W[i], Q[i]);
}
});
describe("Calcul Q en charge avec h1 croissant: ", () => {
const W: number = 0.8;
const h1: number[] = [1.050000, 1.300000, 1.500000];
const Q: number[] = [5.718929, 7.878541, 9.764896];
const mode: StructureFlowMode[] = [
StructureFlowMode.WEIR, StructureFlowMode.WEIR, StructureFlowMode.WEIR];
const regime: StructureFlowRegime[] = [
StructureFlowRegime.FREE, StructureFlowRegime.FREE, StructureFlowRegime.FREE];
for (let i = 0; i < Q.length; i++) {
itCalcQ(structTest, h1[i], W, Q[i], mode[i], regime[i]);
}
});
describe("Calcul Q a surface libre avec h1 croissant: ", () => {
const W: number = Infinity;
const h1: number[] = [1.100000, 1.500000];
const Q: number[] = [6.132249, 9.764896];
const mode: StructureFlowMode[] = [
StructureFlowMode.WEIR, StructureFlowMode.WEIR];
const regime: StructureFlowRegime[] = [
StructureFlowRegime.FREE, StructureFlowRegime.FREE];
for (let i = 0; i < Q.length; i++) {
itCalcQ(structTest, h1[i], W, Q[i], mode[i], regime[i]);
}
});
});