How to simulate a counter current fixed Bed Reactor
Show older comments
Hey,
my actual Code ist below
% Iterationsschleife im Zersetzer
for i=2:length(t)
nNa(i)=nNa(i-1)-r(i-1);
cNa(i)=nNa(i)/(nHg+nNa(i));
mNa(i)=nNa(i)*MNa/1000;
nEtOH(i)=nEtOH(i-1)-r(i-1)-nvEtOH(i-1);
mEtOH(i)=nEtOH(i)*MEtOH/1000;
nNaEt(i)=nNaEt(i-1)+r(i-1);
mNaEt(i)=nNaEt(i)*MNaEt/1000;
cNaEt(i)=nNaEt(i)/(nEtOH(i)+nNaEt(i));
wNaEt(i)=mNaEt(i)/(mEtOH(i)+mNaEt(i));
y(i)=fun_Leitfaehigkeit(cNaEt(i),T(i-1)); %elektr. Leitfähigkeit in 1/Ohm oder S/m
eta(i)=fun_NatriumethylatViskositaet(wNaEt(i),TK(i-1))/1000; %Viskosität in kg/(m*s)
rho(i)=fun_EthylatDichte(wNaEt(i),TK(i-1)); % Dichte in kg/m³
cel(i)=wNaEt(i)/MNaEt*rho(i)/1000; %Elektrolytkonzentration in mol/m³
D(i)=y(i)*R*TK(i-1)/F^2; %Diffusionskoeffizient in m²/s
Sc(i)=eta(i-1)/rho(i-1)/D(i-1); %Schmidt-Zahl
Re(i)=1/(1-Epsilon)*rho(i)*vl/eta(i)*dKat; %Reynolds-Zahl Kurzweil S.289
Sh(i)=A*Re(i)^B*Sc(i)^C; %Sherwood-Zahl
j(i)=Sh(i)*F*D(i)/dh; %Stromdichte in A/m²
I(i)=j(i)*AKat; %Stromstärke in A
rk(i)=I(i)/F; % Reaktionsgeschwindigkeit in mol/s
k(i)=k0*exp(-EA/(R*TK(i-1)));
rr(i)=k(i)*cNa(i)^0.5; %Reaktionsgeschwindigkeit in mol/s
if rk(i)>rr(i);
r(i)=rr(i);
else r(i)=rk(i);
end
H2(i)=r(i)*0.5;
nvEtOH(i)=H2(i)/(1-x);
HvEtOH(i)=dHvEtOH*nvEtOH(i);
Gr(i)=Hr-Sr*TK(i-1)/1000+Hsolv;
cpEt(i)=fun_Waermekapazitaet(cNaEt(i),TK(i-1)); % in J/mol
dGr(i)=r(1)*Gr(i)+HvEtOH(i); %in kJ/mol
dTK(i)=abs((dGr(i)*1000-QHgdt)/(cpEt(i)*((nNaEt(i)+nEtOH(i)+nvEtOH(i)))));
TK(i)=TK(i-1)+dTK(i);
T(i)=TK(i)-273.15;
end
goal=(nNa(1)-nNa(end))==3527
This Code runs my fixed Bed Reactor as a cocurrent Reactor with variables nEtOH and nNa. I want to write this code as a countercurrent Reactor, nEtOH(1) meets nNa(end) and nEtOH(end) meets nNa(1) and i have absolutly no idea how to do this. A classic logarithmic mean concentration difference is not accurate enough.
I have build this model on the Data from my Reactor. In this example nNa(1) and nEtOH(1) is given, but i also want to let this loop calculate nNa(1) itself, by defining my "goal". Help is higly welcome.
Accepted Answer
More Answers (0)
Categories
Find more on Chemistry in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!