summaryrefslogtreecommitdiff
path: root/js/Hydraulics/SourceP.js
blob: c0f4a87690150861eff3d478b686f405c0c7ef9d (plain)
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
47
48
/* autogenerated from "macros/Hydraulics/SourceP.sci" */
function SourceP() {
    SourceP.prototype.define = function SourceP() {
        model = scicos_model();
        P0 = 300000;
        T0 = 290;
        H0 = 100000;
        option_temperature = 1;
        model.rpar = [[P0],[T0],[H0],[option_temperature]];
        model.sim = "Source";
        model.blocktype = "c";
        model.dep_ut = [true,false];
        mo = modelica();
        mo.model = "Source";
        mo.inputs = [];
        mo.outputs = ["C"];
        mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[P0],[T0],[H0],[option_temperature]]);
        model.equations = mo;
        model.in1 = ones(size(mo.inputs,"*"),1);
        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"];
    }
    SourceP.prototype.details = function SourceP() {
    }
    SourceP.prototype.get = function SourceP() {
    }
    SourceP.prototype.set = function SourceP() {
        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;
}
    }
}