diff options
Diffstat (limited to 'js/Hydraulics/SourceP.js')
-rw-r--r-- | js/Hydraulics/SourceP.js | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/js/Hydraulics/SourceP.js b/js/Hydraulics/SourceP.js index c0f4a876..504f1e52 100644 --- a/js/Hydraulics/SourceP.js +++ b/js/Hydraulics/SourceP.js @@ -20,29 +20,30 @@ function SourceP() { model.out = ones(size(mo.outputs,"*"),1); exprs = [[string(P0)],[string(T0)],[string(H0)],[string(option_temperature)]]; gr_i = []; - x = standard_define([2.5,2],model,exprs,list(gr_i,0)); - x.graphics.out_implicit = ["I"]; + this.x = standard_define([2.5,2],model,exprs,list(gr_i,0)); + this.x.graphics.out_implicit = ["I"]; } SourceP.prototype.details = function SourceP() { + return this.x; } SourceP.prototype.get = function SourceP() { } SourceP.prototype.set = function SourceP() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,P0,T0,H0,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); - if (!ok) { -break; -} - model.rpar = [[P0],[T0],[H0],[option_temperature]]; - model.equations.parameters[2-1] = list(P0,T0,H0,option_temperature); - graphics.exprs = exprs; - x.graphics = graphics; - x.model = model; -break; -} + [ok,P0,T0,H0,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); + if (!ok) { + break; + } + model.rpar = [[P0],[T0],[H0],[option_temperature]]; + model.equations.parameters[2-1] = list(P0,T0,H0,option_temperature); + graphics.exprs = exprs; + this.x.graphics = graphics; + this.x.model = model; + break; + } } } |