diff --git a/spec/pab/pab.spec.ts b/spec/pab/pab.spec.ts index 292f77851433e23a776759f06fce914f67deb9e1..9aa599eed56fc6837150ec43d5a9b2f85044d7e6 100644 --- a/spec/pab/pab.spec.ts +++ b/spec/pab/pab.spec.ts @@ -183,7 +183,7 @@ describe("Class Pab: ", () => { pab.calculatedParam = pab.prms.Z1; checkPabResults(pab, 78.27); }); - it("Calc(Q) should return 0.773", () => { + it("CalcSerie(Q) should return 0.773", () => { pab.calculatedParam = pab.prms.Q; checkPabResults(pab, 0.773); }); diff --git a/src/pab/cloison_aval.ts b/src/pab/cloison_aval.ts index e35b4c08691e36a54379178dab2aa669c0820c1d..1dbe30374c9712d6877f2046b74755aaadeb79e2 100644 --- a/src/pab/cloison_aval.ts +++ b/src/pab/cloison_aval.ts @@ -54,7 +54,7 @@ export class CloisonAval extends ParallelStructure { s.prms.ZDV.v = s.prms.maxZDV.v; } } - if (this._result === undefined || this._result.ok) { + if (!this.hasVanneLevante() || this.result.ok) { // Calculation of Z1 with the new ZDV in case of existing vanne levante this.currentResult = super.Calc("Z1", rInit); if (this.result.ok) { @@ -74,7 +74,7 @@ export class CloisonAval extends ParallelStructure { } } } - return this._result; + return this.result; } /**