Ignore:
Timestamp:
Jul 25, 2008, 11:18:50 AM (14 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Updated the models to work with some language constraints

Location:
branches/gui/eml/reactors
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/reactors/equil.mso

    r530 r574  
    9797#               + PP.IdealGasEnthalpyOfFormationAt25C()*(1 - Outlet.T/To);
    9898
    99         for j in [1:NReac]
     99        for j in [1:NReac] do
    100100        "Gibbs free energy of reaction"
    101101                sumt(G*stoic(:,j)) = -Rg*Outlet.T*ln(K(j));
     
    106106        end
    107107
    108         for i in [1:NComp]
     108        for i in [1:NComp] do
    109109        "Outlet molar fraction"
    110110                Outlet.F*Outlet.z(i) = (Inlet.F*Inlet.z(i) + sumt(stoic(i,:)*extent));
    111111        end     
    112112
    113         for i in [1:NComp]
     113        for i in [1:NComp] do
    114114          if (Outletm.z(i) > 1e-16) then
    115115            "Molar conversion"
     
    192192#       K = exp(-sumt(G*stoic)/(Rg*Outlet.T));
    193193       
    194         for j in [1:NReac]
     194        for j in [1:NReac] do
    195195        "Equilibrium constant"
    196196                K(j) = prod(activ^stoic(:,j));
    197197        end
    198198       
    199         for i in [1:NComp]
     199        for i in [1:NComp] do
    200200        "Outlet molar fraction"
    201201                Outlet.F*Outlet.z(i) = (Inlet.F*Inlet.z(i) + sumt(stoic(i,:)*extent));
    202202        end     
    203203
    204         for i in [1:NComp]
     204        for i in [1:NComp] do
    205205          if (Outletm.z(i) > 1e-16) then
    206206            "Molar conversion"
  • branches/gui/eml/reactors/gibbs.mso

    r530 r574  
    104104#               + PP.IdealGasEnthalpyOfFormationAt25C()*(1 - Outlet.T/To);
    105105
    106         for i in [1:NComp]
     106        for i in [1:NComp] do
    107107        "Lagrangian multiplier"
    108108                G(i) + sumt(lambda*na(:,i)) = -Rg*Outlet.T*ln(activ(i));
     
    191191#               + PP.IdealGasEnthalpyOfFormationAt25C()*(1 - Outlet.T/To);
    192192
    193         for i in [1:NComp]
     193        for i in [1:NComp] do
    194194        "Lagrangian multiplier"
    195195                G(i) + sumt(lambda*na(:,i)) = -Rg*Outlet.T*ln(activ(i));
  • branches/gui/eml/reactors/pfr.mso

    r354 r574  
    8282        Outlet.v = str(NDisc+1).v;
    8383       
    84         for z in [1:NDisc]
    85                 for c in [1:NComp-1]
     84        for z in [1:NDisc] do
     85                for c in [1:NComp-1] do
    8686                        "Component Molar Balance"
    8787                        diff(M(c,z)) = (str(z).F*str(z).z(c) - str(z+1).F*str(z+1).z(c))
     
    113113        end
    114114
    115         for z in [1:NDisc+1]
     115        for z in [1:NDisc+1] do
    116116                "Specific Volume"
    117117                vol(z) = PP.VapourVolume(str(z).T, str(z).P, str(z).z);
  • branches/gui/eml/reactors/stoic.mso

    r530 r574  
    7272        Outlet.F = Outletm.F;
    7373       
    74         for i in [1:NComp]
     74        for i in [1:NComp] do
    7575          if (Outletm.z(i) > 1e-16) then
    7676            "Molar conversion"
     
    123123        Outlet.F = Outletm.F;
    124124
    125         for i in [1:NComp]
     125        for i in [1:NComp] do
    126126          if (Outletm.z(i) > 1e-16) then
    127127            "Molar conversion"
  • branches/gui/eml/reactors/vol_tank.mso

    r427 r574  
    9090                                        Vt = pi/4*(D^2)*L;
    9191                                "Level tank volume"
    92                                         V = ((D^2)*acos((D - 2*Level)/D)/4/"rad" -
     92                                        V = ((D^2)*acos((D - 2*Level)/D)/4/'r' -
    9393                                        (D - 2*Level)*sqrt(D*Level - Level^2)/2)*L;
    9494                       
  • branches/gui/eml/reactors/yield.mso

    r530 r574  
    8484        Outlet.F*Outlet.h = Outletm.F*Outletm.h;
    8585       
    86         for i in [1:NComp]
     86        for i in [1:NComp] do
    8787          if (Outletm.z(i) > 1e-16) then
    8888            "Molar conversion"
     
    147147        Outlet.F*Outlet.h = Outletm.F*Outletm.h;
    148148       
    149         for i in [1:NComp]
     149        for i in [1:NComp] do
    150150          if (Outletm.z(i) > 0) then
    151151            "Molar conversion"
Note: See TracChangeset for help on using the changeset viewer.