diff options
Diffstat (limited to 'js/Hydraulics/PuitsP.js')
-rw-r--r-- | js/Hydraulics/PuitsP.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Hydraulics/PuitsP.js b/js/Hydraulics/PuitsP.js index 84d90966..c709e833 100644 --- a/js/Hydraulics/PuitsP.js +++ b/js/Hydraulics/PuitsP.js @@ -16,9 +16,9 @@ function PuitsP() { mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[this.P0],[this.T0],[this.H0],[this.option_temperature]]); this.model.equations = new ScilabDouble([mo]); this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); - var exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PuitsP\",sz(1),sz(2));"]); - this.x = standard_define([2.5,2],this.model,exprs,list(gr_i,0)); + this.exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PuitsP\",sz(1),sz(2));"]); + this.x = standard_define([2.5,2],this.model,this.exprs,list(this.gr_i,0)); this.x.graphics.in_implicit = ["I"]; return new BasicBlock(this.x); } @@ -39,18 +39,19 @@ function PuitsP() { this.T0 = parseFloat(arguments[0]["T0"]) this.H0 = parseFloat(arguments[0]["H0"]) this.option_temperature = parseFloat(arguments[0]["option_temperature"]) + this.exprs = arguments[0]["exprs"] this.x = arg1; this.graphics = arg1.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = arg1.model; while (true) { - [ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); + [ok,this.P0,this.T0,this.H0,this.option_temperature,this.exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); if (!ok) { break; } this.model.rpar = new ScilabDouble([this.P0],[this.T0],[this.H0],[this.option_temperature]); this.model.equations.parameters[2-1] = list(new ScilabDouble([this.P0]), new ScilabDouble([this.T0]), new ScilabDouble([this.H0]), new ScilabDouble([this.option_temperature])); - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; |