Exemplo n.º 1
0
#: These guys as well (steady).
mod.Ca_ic = Param(mod.ncstr, default=1.9193793974995963E-02, mutable=True)
mod.T_ic = Param(mod.ncstr, default=3.8400724261199036E+02, mutable=True)
mod.Tj_ic = Param(mod.ncstr, default=3.7127352272578315E+02, mutable=True)

# m.Ca_ic = Param(m.ncstr, default=1.9193793974995963E-02)
# m.T_ic = Param(m.ncstr, default=3.8400724261199036E+02)
# m.Tj_ic = Param(m.ncstr, default=3.7127352272578315E+02)

mod.de_ca = Constraint(mod.t, mod.ncstr)
mod.de_T = Constraint(mod.t, mod.ncstr)
mod.de_Tj = Constraint(mod.t, mod.ncstr)

#: No need of these guys at steady.
if mod.steady:
    mod.Ca_icc = None
    mod.T_icc = None
    mod.Tj_icc = None
else:
    mod.Ca_icc = Constraint(mod.ncstr)
    mod.T_icc = Constraint(mod.ncstr)
    mod.Tj_icc = Constraint(mod.ncstr)

# let Ca0 := 1.9193793974995963E-02 ;
# let T0  := 3.8400724261199036E+02 ;
# let Tj0 := 3.7127352272578315E+02 ;

mod.kdef.rule = lambda m, i, n: _rule_k(m, i, n)
mod.de_ca.rule = lambda m, i, n: _rule_ca(m, i, n)
mod.de_T.rule = lambda m, i, n: _rule_t(m, i, n)
mod.de_Tj.rule = lambda m, i, n: _rule_tj(m, i, n)