Skip to content
Snippets Groups Projects
Commit c192196f authored by Dorchies David's avatar Dorchies David
Browse files

Fix #206 again. Good test and good correction (Hope so!)

parent fe8eb878
No related branches found
No related tags found
No related merge requests found
......@@ -31,11 +31,12 @@ describe("Class RegimeUniforme / section rectangulaire :", () => {
ruRect1 = generateRegimeUniforme(generateRectangularSection());
SessionSettings.precision = 1E-7;
})
for (const p of ruRect1.calculableParameters) {
it(`${p.symbol} should be ${p.singleValue}`, () => {
for (const p0 of ruRect1.calculableParameters) {
it(`${p0.symbol} should be ${p0.singleValue}`, () => {
const p = ruRect1.section.prms.get(p0.symbol);
const ref: number = p.singleValue;
p.singleValue = undefined;
p.initValue = 1e-8;
p.singleValue = 1e-8;
p.v = p.initValue;
ruRect1.calculatedParam = p;
checkResult(ruRect1.CalcSerie(), ref);
expect(ruRect1.result.values.V).toBeCloseTo(0.784, 3);
......
......@@ -33,7 +33,7 @@ describe("référence d'un paramètre à un résultat complémentaire multivalu
nub2.prms.V0.defineReference(nub1, "V");
nub2.CalcSerie();
const refVals = [ 2.177, 2.011, 1.878, 1.769, 1.677, 1.598, 1.530, 1.469, 1.415, 1.367, 1.324 ];
const refVals = [ 0.554, 0.574, 0.590, 0.602, 0.613, 0.622, 0.630, 0.636, 0.642, 0.647, 0.652 ];
let i = 0;
for (const v of nub2.getParameter("V0").valueList) {
......
......@@ -107,8 +107,8 @@ export class RegimeUniforme extends SectionNub {
return rS;
}
const v = this.section.prms.Ks.v * Math.pow(rR.vCalc, 2 / 3) * rS.vCalc * Math.sqrt(this.section.prms.If.v);
return new Result(v, this);
this.section.prms.Q.v = this.section.prms.Ks.v * Math.pow(rR.vCalc, 2 / 3) * rS.vCalc * Math.sqrt(this.section.prms.If.v);
return new Result(this.section.prms.Q.v, this);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment