This is a easy Simulink mannequin I created at the moment. This mannequin simulates the focus in three Steady Stirred-Tank Reactor (CSTR) in a row and the way these focus values affected by the influent focus. Typically the CSTR can also be referred to as properly-combined steady stream via reactor.
The S-perform of this CSTR mannequin is proven under.
perform [sys, x0 str, ts]=cstr_sfcn(t,x,u,flag,Cinit)
change flag
case zero %initialize
str=[];
ts=[0 0];
x0=Cinit;
s=simsizes;
s.NumContStates=1;
s.NumDiscStates=zero;
s.NumOutputs=1;
s.NumInputs=1;
s.DirFeedthrough=zero;
s.NumSampleTimes=1;
sys=simsizes(s);
case 1 % derivatives
sys=cstr(t,x,u);
case three %output
sys=x;
case 2 four 9
sys=[];
in any other case
error(['unhandled flag=', num2str(flag)])
finish
And under is the perform of the reactor.
perform dx=cstr(t, x, u)
Ca=x;
dCa=zero.2*(u-Ca);
dx=dCa;
The Simulink mannequin seems like this:
All the three tanks has the identical traits, besides the preliminary concentrations have been totally different.
C1(zero)=5, C2(zero)=three, and C3(zero)=1. And the influent focus was simulated by the heart beat generator. The simulation outcomes is proven under.
No comments:
Post a Comment