Changeset 69 for mso/eml


Ignore:
Timestamp:
Dec 5, 2006, 2:46:19 PM (16 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Updated PFR model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mso/eml/reactors/pfr.mso

    r47 r69  
    4545        q(NDisc)    as heat_rate;
    4646        M(NComp, NDisc)    as mol (Brief = "Molar holdup");
    47         C(NComp, NDisc)  as conc_mol(Brief="Components concentration");
     47        Mt(NDisc)    as mol (Brief = "Molar holdup");
     48        C(NComp, NDisc)  as conc_mol(Brief="Components concentration", Lower=-1e-6);
    4849        E(NDisc) as energy (Brief="Total Energy Holdup on element");
    4950       
     
    7071       
    7172        for z in [1:NDisc]
    72                 for c in [1:NComp]
     73                for c in [1:NComp-1]
    7374                        "Component Molar Balance"
    7475                        diff(M(c,z)) = (str(z).F*str(z).z(c) - str(z+1).F*str(z+1).z(c))
     
    8182
    8283                "Energy Holdup"
    83                 E(z) = sum(M(:,z))*str(z+1).h - str(z+1).P*Across*L/NDisc;
     84                E(z) = Mt(z)*str(z+1).h - str(z+1).P*Across*L/NDisc;
    8485
    8586                "mass flow is considered constant"
    8687                str(z+1).F*vol(z+1) = str(z).F*vol(z); # FIXME: is this correct? No (constant velocity: only for equimolar)
    87 #               rho(z+1)*vel(z+1) = rho(z)*vel(z);  # FIXME: this is correct! But does not converge.
     88                #rho(z+1)*vel(z+1) = rho(z)*vel(z);  # FIXME: this is correct! But does not converge.
    8889       
    8990                "Molar concentration"
    9091                C(:,z) * Across*L/NDisc = M(:,z);
     92               
     93                "Sum of M"
     94                Mt(z) = sum(M(:,z));
     95               
     96                "Geometrical constraint"
     97                Across*L/NDisc = Mt(z) * vol(z);
    9198
    9299                "Molar fraction"
    93                 str(z+1).z = C(:,z) * vol(z+1);
    94         end     
     100                str(z+1).z * Mt(z) = M(:,z);
     101        end
    95102
    96103        for z in [1:NDisc+1]
     
    99106               
    100107                "Specific Mass"
    101                 rho(z) = sum(str(z).z*Mw)/vol(z);
     108                rho(z) = PP.VapourDensity(str(z).T, str(z).P, str(z).z);
    102109
    103110                "Velocity"
Note: See TracChangeset for help on using the changeset viewer.