1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# -*-octave-*- Put Emacs into octave-mode
# Input specification (ReactorTF_input.txt)
# Generated by MTT at Fri Mar 3 11:52:23 GMT 2000
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1 2000/12/28 17:12:57 peterg
## To RCS
##
###############################################################
## Reduce steady-state parameter file (ReactorTF_sspar.r)
## as siso_sspar ecxept that inputs/states have different meaning
|
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# -*-octave-*- Put Emacs into octave-mode
# Input specification (ReactorTF_input.txt)
# Generated by MTT at Fri Mar 3 11:52:23 GMT 2000
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2 2003/06/06 06:38:44 gawthrop
## Made compatible with current MTT.
##
## Revision 1.1 2000/12/28 17:12:57 peterg
## To RCS
##
###############################################################
## Reduce steady-state parameter file (ReactorTF_sspar.r)
## as siso_sspar ecxept that inputs/states have different meaning
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
## Solve for the steady-state concentrations
## Solve for ca - a quadratic.
a = k_3*e_3; #ca^2
b = k_1*e_1 + f_s; #ca^1
c = -c_0*f_s;
c_a = (-b + sqrt(b^2 - 4*a*c))/(2*a);
## solve for c_b
c_b = c_a*k_1*e_1/(f_s+k_2*e_2);
#States (masses)
x1 = c_a*v_r;
x2 = c_b*v_r;
#Thermal state
#x3 = c_p*t_s*v_r;
#Steady-state input q needed to achieve steady-state t_s
q_s = -( (t_0-t_s)*c_p*f_s + e_1*h_1*k_1*x1 + e_2*h_2*k_2*x2 + e_3*h_3*k_3*x1^2);
# Set the inputs
## Removed by MTT on Thu Jun 5 14:13:24 BST 2003: mttu(1) = q_s + 0.1*q_s*(t>0.01); # q (ReactorTF)
reactortf__t = q_s + 0.1*q_s*(t>0.01); # q (ReactorTF)
|
|
|
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
## Solve for the steady-state concentrations
## Solve for ca - a quadratic.
a = k_3*e_3; #ca^2
b = k_1*e_1 + f_s; #ca^1
c = -c_0*f_s;
c_a = (-b + sqrt(pow(b,2) - 4*a*c))/(2*a);
## solve for c_b
c_b = c_a*k_1*e_1/(f_s+k_2*e_2);
#States (masses)
x1 = c_a*v_r;
x2 = c_b*v_r;
#Thermal state
#x3 = c_p*t_s*v_r;
#Steady-state input q needed to achieve steady-state t_s
q_s = -( (t_0-t_s)*c_p*f_s + e_1*h_1*k_1*x1 + e_2*h_2*k_2*x2 + e_3*h_3*k_3*pow(x1,2));
# Set the inputs
## Removed by MTT on Thu Jun 5 14:13:24 BST 2003: mttu(1) = q_s + 0.1*q_s*(t>0.01); # q (ReactorTF)
reactortf__t = q_s + 0.1*q_s*(t>0.01); # q (ReactorTF)
|