1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
function Bache() {
Bache.prototype.define = function Bache() {
this.in1 = 2;
this.out = 3;
var model = scicos_model();
model.in = new ScilabDouble(math.transpose(math.range(-1, -this.in1, -1, true)));
model.out = new ScilabDouble(math.transpose(math.range(-1, -this.out, -1, true)));
this.Patm = 1.013E5;
this.A = 1;
this.ze1 = 40;
this.ze2 = 0;
this.zs1 = 40;
this.zs2 = 0;
this.z0 = 30;
this.T0 = 290;
this.p_rho = 0;
model.rpar = new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]);
model.sim = new ScilabString(["Bache"]);
model.blocktype = new ScilabString(["c"]);
model.dep_ut = new ScilabBoolean([true, false]);
var mo = new modelica_function();
mo.model = new ScilabString(["Bache"]);
mo.inputs = new ScilabString(["Ce1", "Ce2"]);
mo.outputs = new ScilabString(["Cs1", "Cs2", "yNiveau"]);
mo.parameters = list(new ScilabString(["Patm"], ["A"], ["ze1"], ["ze2"], ["zs1"], ["zs2"], ["z0"], ["T0"], ["p_rho"]), new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]));
model.equations = mo;
model.in = new ScilabDouble(...ones(size(getData(mo.inputs), '*'), 1));
model.out = new ScilabDouble(...ones(size(getData(mo.outputs), '*'), 1));
var exprs = new ScilabString([this.Patm.toString()], [this.A.toString()], [this.ze1.toString()], [this.ze2.toString()], [this.zs1.toString()], [this.zs2.toString()], [this.z0.toString()], [this.T0.toString()], [this.p_rho.toString()]);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Bache\",sz(1),sz(2));"]);
this.x = new standard_define([2, 2], model, exprs, list(gr_i, 0));
this.x.graphics.in_implicit = new ScilabString(["I"], ["I"]);
this.x.graphics.out_implicit = new ScilabString(["I"], ["I"], ["E"]);
return new BasicBlock(this.x);
}
Bache.prototype.details = function Bache() {
return this.x;
}
}
|