summaryrefslogtreecommitdiff
path: root/js/Hydraulics/Bache.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Hydraulics/Bache.js')
-rw-r--r--js/Hydraulics/Bache.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js
index e8e30f10..9a0d0a11 100644
--- a/js/Hydraulics/Bache.js
+++ b/js/Hydraulics/Bache.js
@@ -29,30 +29,31 @@ function Bache() {
model.out = ones(size(mo.outputs,"*"),1);
exprs = [[string(Patm)],[string(A)],[string(ze1)],[string(ze2)],[string(zs1)],[string(zs2)],[string(z0)],[string(T0)],[string(p_rho)]];
gr_i = [];
- x = standard_define([2,2],model,exprs,list(gr_i,0));
- x.graphics.in_implicit = [["I"],["I"]];
- x.graphics.out_implicit = [["I"],["I"],["E"]];
+ this.x = standard_define([2,2],model,exprs,list(gr_i,0));
+ this.x.graphics.in_implicit = [["I"],["I"]];
+ this.x.graphics.out_implicit = [["I"],["I"],["E"]];
}
Bache.prototype.details = function Bache() {
+ return this.x;
}
Bache.prototype.get = function Bache() {
}
Bache.prototype.set = function Bache() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho,exprs] = scicos_getvalue("Parametres de la bache",[["Pression dans le ciel de la bache : Patm (Pa)"],["Section de la bache : A (m2)"],["Altitude du piquage d entrée 1: ze1 (m)"],["Altitude du piquage d entrée 2: ze2 (m)"],["Altitude du piquage de sortie 1: zs1 (m)"],["Altitude du piquage de sortie 2: zs2 (m)"],["Altitude initiale du fluide : z0 (m)"],["Température initiale du fluide : T0 (K)"],["Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
- if (!ok) {
-break;
-}
- model.rpar = [[Patm],[A],[ze1],[ze2],[zs1],[zs2],[z0],[T0],[p_rho]];
- model.equations.parameters[2-1] = list(Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho);
- graphics.exprs = exprs;
- x.graphics = graphics;
- x.model = model;
-break;
-}
+ [ok,Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho,exprs] = scicos_getvalue("Parametres de la bache",[["Pression dans le ciel de la bache : Patm (Pa)"],["Section de la bache : A (m2)"],["Altitude du piquage d entrée 1: ze1 (m)"],["Altitude du piquage d entrée 2: ze2 (m)"],["Altitude du piquage de sortie 1: zs1 (m)"],["Altitude du piquage de sortie 2: zs2 (m)"],["Altitude initiale du fluide : z0 (m)"],["Température initiale du fluide : T0 (K)"],["Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ if (!ok) {
+ break;
+ }
+ model.rpar = [[Patm],[A],[ze1],[ze2],[zs1],[zs2],[z0],[T0],[p_rho]];
+ model.equations.parameters[2-1] = list(Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho);
+ graphics.exprs = exprs;
+ this.x.graphics = graphics;
+ this.x.model = model;
+ break;
+ }
}
}