# Changeset 41 for mso/sample

Ignore:
Timestamp:
Oct 25, 2006, 5:48:09 PM (16 years ago)
Message:

Removed flowsheets with problems

File:
1 edited

Unmodified
Removed
• ## mso/sample/reactors/fogler/chap3/oxidation_of_so2.mso

 r28 mode = "steady"; end FlowSheet pfr_ploting PARAMETERS NComp   as Integer; stoic(NComp) as Real(Brief="Stoichiometric coefficients"); k       as Real (Brief="Specific rate of reaction", Unit="l/mol/s"); R               as Real (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); VARIABLES Inlet   as stream; # Inlet stream Outlet  as stream; # Outlet stream X               as fraction     (Brief="Molar conversion", Lower=0); r               as reaction_mol (Brief="Rate of reaction of A", Unit="mol/l/s"); T               as temperature  (Brief="Temperature", Unit="K"); P               as pressure     (Brief="Pressure", Unit="atm"); Theta(NComp)as Real     (Brief="Parameter Theta"); epsilon as Real         (Brief="Parameter epsilon"); EQUATIONS "Change time in X" X = time*"1/s"; "Outlet molar fraction" Outlet.C = Outlet.z*sum(Outlet.C); "Inlet concentration" Inlet.C = Inlet.z*P/(R*T); "Outlet concentration" Outlet.C = Inlet.C(1)*(Theta + stoic*X)/(1 + epsilon*X); "Parameter Theta" Theta = Inlet.z/Inlet.z(1); "Parameter epsilon" epsilon = Inlet.z(1)*sum(stoic); "Rate of reaction" (-r) = k*Outlet.C(1)*Outlet.C(2); SET NComp = 4; # A, B, C and I stoic = [-1.0, -0.5, 1.0, 0.0]; k = 200*"l/mol/s"; SPECIFY "Inlet molar fraction" Inlet.z = [0.28, 0.1512, 0.0, 0.5688]; "Inlet pressure" P = 1485*"kPa"; "Inlet temperature" T = (227 + 273.15)*"K"; OPTIONS time = [0:0.005:1]; end FlowSheet pfr_ploting2 PARAMETERS NComp   as Integer (Brief="Number of chemical components", Lower=1); stoic(NComp)as Real(Brief="Stoichiometric coefficients"); N       as Integer(Brief="Number of descrete points", Default=200); k   as Real(Brief="Specific rate of reaction", Unit="l/mol/s"); R       as Real(Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082); VARIABLES C(N,NComp)      as conc_mol(Brief="Outlet concentration", Unit="mol/l", Lower=0); Ct(N)   as conc_mol(Brief="Total outlet concentration", Unit="mol/l", Lower=0); z(N,NComp)      as fraction(Brief="Outlet molar fraction", Lower=0); X(N)    as fraction(Brief="Molar conversion", Lower=0, Upper=1); dX      as fraction     (Brief="Molar conversion increment"); r(N)    as reaction_mol (Brief="Rate of reaction of A", Unit="mol/l/s"); Co(NComp)       as conc_mol(Brief="Inlet concentration", Unit="mol/l", Lower=0); zo(NComp)       as fraction(Brief="Inlet molar fraction"); T       as temperature(Brief="Temperature", Unit="K"); P       as pressure(Brief="Pressure", Unit="atm"); Theta(NComp)as Real(Brief="Parameter Theta"); epsilon         as Real(Brief="Parameter epsilon"); Cto     as conc_mol(Brief="Total inlet concentration", Unit="mol/l", Lower=0); EQUATIONS "Total inlet concentration" Cto = sum(Co); "Inlet concentration" Co = zo*P/(R*T); "Parameter Theta" Theta = zo/zo(1); "Parameter epsilon" epsilon = zo(1)*sum(stoic); "Descrete interval" dX = (X(N) - X(1))/N; for i in [1:(N-2)] "Descrete molar convertion" X(i+1) = X(i) + dX; end for i in [1:N] "Outlet concentration" C(i,:) = Co(1)*(Theta + stoic*X(i))/(1 + epsilon*X(i)); "Outlet molar fraction" C(i,:) = z(i,:)*sum(C(i,:)); "Total outlet concentration" Ct(i) = sum(C(i,:)); "Rate of reaction" (-r(i)) = k*C(i,1)*C(i,2); end SET NComp = 4; # A, B, C and I stoic = [-1.0, -0.5, 1.0, 0.0]; k = 200*"l/mol/s"; #       N = 200; SPECIFY "Inlet molar fraction" zo = [0.28, 0.1512, 0.0, 0.5688]; "Inlet pressure" P = 1485*"kPa"; "Inlet temperature" T = (227 + 273.15)*"K"; "Inlet molar conversion" X(1) = 0.0; "Outlet molar conversion" X(N) = 1.0; OPTIONS mode = "steady"; end #*--------------------------------------------------------------------- * Plot using the Matlab (emso2ml.m) (below version 0.9.45) *---------------------------------------------------------------------- N=200; % Numbers of descrete points ncomp=4; % Numbers of components y=zeros(ncomp,N); % Concentration matrix [time, values, name]=emso2ml('pfr_ploting.rlt',0); for n=1:N y(:,n)=values((n-1)*ncomp+1:n*ncomp)'; end plot(values(9*N+1:10*N),y(1,:),values(9*N+1:10*N),y(2,:),... values(9*N+1:10*N),y(3,:),values(9*N+1:10*N),y(4,:)); legend('SO_2','O_2', 'SO_3', 'N_2'); xlabel('Molar conversion, X'); ylabel('Molar concentration, (mol/l)'); *--------------------------------------------------------------------*#
Note: See TracChangeset for help on using the changeset viewer.