UNPKG

jalhyd

Version:

JaLHyd, a Javascript Library for Hydraulics

110 lines 3.99 kB
import { ParamDefinition } from "../internal_modules"; import { IParamDefinitionIterator } from "../internal_modules"; import { Result } from "../internal_modules"; import { CloisonAval } from "../internal_modules"; import { Cloisons } from "../internal_modules"; import { PabParams } from "../internal_modules"; import { FishPass } from "../internal_modules"; export declare class Pab extends FishPass { /** * paramètres castés au bon type */ get prms(): PabParams; /** * enfants castés au bon type */ get children(): Cloisons[]; /** * @returns iterator on all child nubs (may include extra nubs, see Pab nub) * @see Nub.directChildNubIterator() */ directChildNubIterator(): IterableIterator<any>; /** * Last wall at downstream */ private _downWall; constructor(prms: PabParams, downWall: CloisonAval, dbg?: boolean); get downWall(): CloisonAval; set downWall(dw: CloisonAval); /** * Add Cloisons to the PAB from a cloison model * @param cloisonModel Cloison model parametrised as first upstream basin * @param n Number of walls (or falls) of the PAB (Number of basin = n - 1) */ addCloisonsFromModel(cloisonModel: Cloisons, n: number): void; CalcSerie(rInit?: number): Result; /** * @param sVarCalc Calcul */ Calc(sVarCalc: string, rInit?: number): Result; /** * add upstream/downstream head and submergence extra results to a parallel structure result * (except for orifices) */ private addWallResults; /** * Calcul analytique * @warning Should be called by this.Calc only for parameter initialisations * @param sVarCalc Variable à calculer (Z1 uniquement) */ Equation(sVarCalc: string): Result; get calculableParameters(): ParamDefinition[]; /** * Returns an iterator over : * - own parameters (this._prms) * - children parameters (this._children[*]._prms) * Special treatment for PAB's downwall */ get parameterIterator(): IParamDefinitionIterator; /** * Returns an object representation of the Nub's current state * @param extra extra key-value pairs, for ex. calculator title in GUI */ objectRepresentation(extra?: object): any; /** * Fills the current Nub with parameter values, provided an object representation * @param obj object representation of a Nub content (parameters) * @returns the calculated parameter found, if any - used by child Nub to notify * its parent of the calculated parameter to set */ loadObjectRepresentation(obj: any): { p: ParamDefinition; hasErrors: boolean; changedUids: { [key: string]: string; }; }; /** * Adds a new empty resultElement to the current Result object, so that * computation result is stored into it, via set currentResult(); does * the same for all children and downWall */ initNewResultElement(): void; /** * Sets this._result to a new empty Result, before starting a new CalcSerie(); * does the same for all children and downWall */ reinitResult(): void; /** * Only Q and Z1 are calculable (see #108) */ findFirstCalculableParameter(otherThan?: ParamDefinition): ParamDefinition; /** * paramétrage de la calculabilité des paramètres */ protected setParametersCalculability(): void; /** * Remove Calculability of DH for not updating Z2 during calculation; adjust * visibility for PAB display and serialisation * @param child Cloison newly added to the PAB */ protected adjustChildParameters(child: Cloisons): void; /** * Remove visibility of downwall hydraulic parameters, for serialisation * @param dw */ protected adjustDownwallParameters(dw: CloisonAval): void; private calcCloisonZ1; private dbgWall; } //# sourceMappingURL=pab.d.ts.map