next up previous contents index
Next: Reactor_odeso.ps ( -Reactor__c_a) Up: Reactor Previous: Reactor_input.tex   Contents   Index


Reactor_state.tex

MTT command:
mtt Reactor state tex
# -*-octave-*- Put Emacs into octave-mode
# State specification (Reactor_state.txt)
# Generated by MTT at Fri Mar  3 11:52:23 GMT 2000
###############################################################
## Version control history
###############################################################
## $Id: Reactor_state.txt,v 1.3 2003/06/06 06:38:31 gawthrop Exp $
## $Log: Reactor_state.txt,v $
## Revision 1.3  2003/06/06 06:38:31  gawthrop
## Made compatible with current MTT.
##
## Revision 1.2  2000/12/28 18:52:25  peterg
## Updated for new formats
##
## Revision 1.1  2000/12/28 17:09:55  peterg
## To RCS
##
###############################################################

## Reduce steady-state parameter file (Reactor_sspar.r)
## as siso_sspar ecxept that states/states have different meaning
## Steady state for constant c_a, c_b and t=t_s and f=f_s

## Unit volume Reactor:
v_r = 1;


## The exponentials.
e_1 = exp(-q_1/t_s);
e_2 = exp(-q_2/t_s);
e_3 = exp(-q_3/t_s);

## 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 state 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);

## The two inputs at steady-state
u1 = f_s;
u2 = q_s;

## Load up the states
## Removed by MTT on Thu Dec 28 18:46:20 GMT 2000: mttx(1) = x1;
## Removed by MTT on Thu Dec 28 18:46:20 GMT 2000: mttx(2) = x2;
## Removed by MTT on Thu Dec 28 18:46:20 GMT 2000: mttx(3) = x3;




## Removed by MTT on Thu Jun  5 12:47:23 BST 2003: reactor_h_r	= x3; # Added by MTT on Thu Dec 28 18:46:25 GMT 2000
## Removed by MTT on Thu Jun  5 12:47:23 BST 2003: reactor_m_a	= x1; # Added by MTT on Thu Dec 28 18:46:25 GMT 2000
## Removed by MTT on Thu Jun  5 12:47:23 BST 2003: reactor_m_b	= x2; # Added by MTT on Thu Dec 28 18:46:25 GMT 2000
reactor__h_r	= x3;
reactor__m_a	= x1;
reactor__m_b	= x2;



http://mtt.sourceforge.net