summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-16 18:58:14 +0530
committerSunil Shetye2018-06-16 18:58:14 +0530
commit3a3e1d6aa7fd38a910a7416040050ffa9550566e (patch)
treedcc92d9645e3389855686e6356af24cc8160754f /js
parenta208791a02511d50eed1663203ac26eabfdfaa6f (diff)
downloadsci2js-3a3e1d6aa7fd38a910a7416040050ffa9550566e.tar.gz
sci2js-3a3e1d6aa7fd38a910a7416040050ffa9550566e.tar.bz2
sci2js-3a3e1d6aa7fd38a910a7416040050ffa9550566e.zip
support (a:b) syntax
Diffstat (limited to 'js')
-rw-r--r--js/Hydraulics/Bache.js59
1 files changed, 57 insertions, 2 deletions
diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js
index 3a25b009..c184f939 100644
--- a/js/Hydraulics/Bache.js
+++ b/js/Hydraulics/Bache.js
@@ -1,3 +1,58 @@
-Syntax error in input LexToken(COLON,':',1,2449)
/* autogenerated from "macros/Hydraulics/Bache.sci" */
-None
+function Bache() {
+Bache.prototype.get = function Bache() {
+}
+Bache.prototype.set = function Bache() {
+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
+}
+}
+Bache.prototype.define = function Bache() {
+in1=2;
+out=3;
+model=scicos_model();
+model.in1=[-transpose([1:in1])];
+model.out=[-transpose([1:out])];
+Patm=1.013e5;
+A=1;
+ze1=40;
+ze2=0;
+zs1=40;
+zs2=0;
+z0=30;
+T0=290;
+p_rho=0;
+model.rpar=[Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho];
+model.sim="Bache";
+model.blocktype="c";
+model.dep_ut=[true,None];
+mo=modelica();
+mo.model="Bache";
+mo.inputs=["Ce1","Ce2"];
+mo.outputs=["Cs1","Cs2","yNiveau"];
+mo.parameters=list(["Patm","A","ze1","ze2","zs1","zs2","z0","T0","p_rho"],[Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho]);
+model.equations=mo;
+model.in1=ones(size(mo.inputs,"*"),1);
+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"];
+}
+Bache.prototype.details = function Bache() {
+}
+}