rectangular_structure_params.ts 2.19 KB
Newer Older
1
import { ParamDefinition, ParamFamily } from "../param/param-definition";
2
import { ParamDomain, ParamDomainValue } from "../param/param-domain";
3
4
5
6
7
8
9
10
11
import { StructureParams } from "./structure_params";

/**
 * Parameters for rectangular structures (common for all rectangular structure equations)
 */
export class RectangularStructureParams extends StructureParams {
    /** Width of the gate or length of the sill (m) */
    public L: ParamDefinition;

12
13
14
15
16
17
18
19
    /**
     * Discharge coefficients
     * @note Each implemented law must make visible its Cd parameter
     */
    // tslint:disable-next-line:variable-name
    public CdGR: ParamDefinition;
    // tslint:disable-next-line:variable-name
    public CdWR: ParamDefinition;
20
    // tslint:disable-next-line:variable-name
21
    public CdWSL: ParamDefinition;
22
23
    // tslint:disable-next-line:variable-name
    public CdWS: ParamDefinition;
24

25
26
27
28
29
30
31
32
33
34
35
36
    /**
     * Constructeur d'une structure rectangulaire
     * @param rQ    Débit (m3/s)
     * @param rZDV  Cote de la crête du déversoir ou du radier de la vanne (m)
     * @param rZ1   Cote de l'eau amont (m)
     * @param rZ2   Cote de l'eau aval (m)
     * @param rL    Largeur de la vanne ou du déversoir (m)
     * @param rCd   Coefficient de débit (-)
     * @param rW    Ouverture de la vanne (m) (Valeur par défaut +infinity pour les déversoirs)
     */
    constructor(rQ: number, rZDV: number, rZ1: number, rZ2: number, rL: number, rCd: number, rW: number = Infinity) {
        super(rQ, rZDV, rZ1, rZ2, rW);
37
        this.L = new ParamDefinition(this, "L", ParamDomainValue.POS, "m", rL, ParamFamily.WIDTHS);
38
        this.addParamDefinition(this.L);
39
40
        const domainCd = new ParamDomain(ParamDomainValue.INTERVAL, 0, 10);
        this.CdGR = new ParamDefinition(this, "CdGR", domainCd, undefined, rCd);
41
        this.addParamDefinition(this.CdGR);
42
        this.CdWR = new ParamDefinition(this, "CdWR", domainCd, undefined, rCd);
43
        this.addParamDefinition(this.CdWR);
44
        this.CdWSL = new ParamDefinition(this, "CdWSL", domainCd, undefined, rCd);
45
        this.addParamDefinition(this.CdWSL);
46
47
        this.CdWS = new ParamDefinition(this, "CdWS", domainCd, undefined, rCd);
        this.addParamDefinition(this.CdWS);
48
49
    }
}