Commit 50f951ab authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

OrificeFree: protection against negative h1 in sqrt

parent 24781a50
......@@ -43,7 +43,7 @@ export class StructureOrificeFree extends Structure {
public CalcQ(): Result {
const data = this.getResultData();
const v = this.prms.CdO.v * this.prms.S.v * Structure.R2G * Math.sqrt(this.prms.h1.v);
const v = this.prms.CdO.v * this.prms.S.v * Structure.R2G * Math.sqrt(Math.max(0, this.prms.h1.v));
return new Result(v, this, data);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment