Changeset 595 for branches


Ignore:
Timestamp:
Aug 8, 2008, 6:55:17 PM (14 years ago)
Author:
gerson bicca
Message:

updated compressor model (testing)

Location:
branches/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/pressure_changers/compressor.mso

    r393 r595  
    2121
    2222Model centrifugal_compressor
    23         ATTRIBUTES
     23
     24ATTRIBUTES
    2425        Pallete         = true;
    2526        Icon            = "icon/CentrifugalCompressor";
    26         Brief           = "Model of a centrifugal compressor.";
    27         Info            =
    28 "== Assumptions ==
    29 * Steady State;
    30 * Only Vapor;
    31 * Adiabatic.
     27        Brief           = "Testing Model of a centrifugal compressor.";
     28
    3229       
    33 == Specify ==
    34 * the inlet stream;
    35 * the outlet pressure (Outlet.P);
    36 * the Isentropic efficiency (Effs).
    37 ";
    38        
    39         PARAMETERS
    40 outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
    41 outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
    42         R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K');
     30PARAMETERS
     31
     32outer PP                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
     33outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
     34        R                                       as positive             (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true);
    4335        Mw(NComp)       as molweight    (Brief = "Molar Weight");
    4436
    45         VARIABLES
    46         n                       as positive             (Brief = "Politropic Coefficient", Lower=0);
    47         k                       as positive     (Brief = "Isentropic Coefficient", Lower=1e-3);
    48         Cp              as cp_mol               (Brief = "Heat Capacity");
    49         Cv                      as cv_mol               (Brief = "Heat Capacity");
     37VARIABLES
     38
     39        n                               as positive             (Brief = "Politropic Coefficient", Lower=0);
     40        k                               as positive             (Brief = "Isentropic Coefficient", Lower=1e-3);
     41        Cp              as cp_mol                       (Brief = "Heat Capacity");
     42        Cv                      as cv_mol                       (Brief = "Heat Capacity");
    5043        Pratio          as positive             (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
    5144        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
    5245        Wp                      as energy_mol   (Brief = "Politropic Head");
    5346        Ws                      as energy_mol   (Brief = "Isentropic Head");
    54         Tiso            as temperature  (Brief = "Isentropic Temperature");
    55         Effp            as positive     (Brief = "Politropic efficiency");
    56         Effs            as efficiency   (Brief = "Isentropic efficiency");
    57         FPower          as power                (Brief = "Fluid Power");
    58         Mwm                     as molweight    (Brief = "Mixture Molar Weight");
    59 in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.5086, Symbol="_{in}");
    60 out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.5022, Symbol="_{out}");
     47        Tiso                    as temperature          (Brief = "Isentropic Temperature");
     48        Effp                    as positive             (Brief = "Politropic efficiency");
     49        Effs                    as efficiency           (Brief = "Isentropic efficiency");
     50        FPower          as power                        (Brief = "Fluid Power");
     51        Mwm                     as molweight            (Brief = "Mixture Molar Weight");
    6152
    62         SET
     53in              Inlet           as stream               (Brief = "Inlet stream", PosX=0.35, PosY=0, Symbol="_{in}");
     54out     Outlet          as streamPH     (Brief = "Outlet stream", PosX=1, PosY=0.85, Symbol="_{out}");
     55
     56in      WorkIn          as power                (Brief = "Work Inlet", PosX=0, PosY=0.55);
     57
     58SET
     59
    6360        Mw = PP.MolecularWeight();
    64        
    65         EQUATIONS
    66        
    67         "Calculate Mwm for Inlet Mixture"
     61
     62        R       = 8.31451*'kJ/kmol/K';
     63
     64EQUATIONS
     65
     66"Calculate Mwm for Inlet Mixture"
    6867        Mwm = sum(Mw*Inlet.z);
    6968
    70         "Pressure Ratio"
     69"Pressure Ratio"
    7170        Outlet.P = Inlet.P * Pratio;
    7271
    73         "Pressure Drop"
     72"Pressure Drop"
    7473        Outlet.P  = Inlet.P - Pdrop;
    7574
    76         "Calculate Cp Using a External Physical Properties Routine"
     75"Calculate Cp Using a External Physical Properties Routine"
    7776        Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z);
    7877       
    79         "Calculate Cv Using a External Physical Properties Routine"
     78"Calculate Cv Using a External Physical Properties Routine"
    8079        Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z);
    8180       
    82         "Calculate Isentropic Coeficient"
     81"Calculate Isentropic Coeficient"
    8382        k * Cv = Cp;
    8483       
    85         "Calculate Isentropic Head"
     84"Calculate Isentropic Head"
    8685        Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1);
    8786       
    88         "Calculate Isentropic Outlet Temperature"
     87"Calculate Isentropic Outlet Temperature"
    8988#       Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k);
    90         PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) =
    91                 PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z);
     89        PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) = PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z);
    9290
    93         "Calculate Real Outlet Temperature"
     91"Calculate Real Outlet Temperature"
    9492        Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T);
    9593       
    96         "Calculate Politropic Coefficient"
     94"Calculate Politropic Coefficient"
    9795        n*(ln(Outlet.T/Inlet.T)) = (n-1)*(ln(Outlet.P/Inlet.P));
    9896       
    99         "Calculate Politropic Efficiency"
     97"Calculate Politropic Efficiency"
    10098        Effp * (n-1) * k = n * (k-1);
    10199       
    102         "Calculate Politropic Head"
     100"Calculate Politropic Head"
    103101        Ws*Effp = Wp*Effs;
    104102
    105         "Calculate Fluid Power"
    106         FPower*Effs = Inlet.F*Ws;
    107        
    108         "Overall Molar Balance"
     103"Overall Molar Balance"
    109104        Outlet.F = Inlet.F;
    110105
    111         "Component Molar Balance"
     106"Component Molar Balance"
    112107        Outlet.z = Inlet.z;
     108
     109# Testing Equations
     110
     111"Fluid Power"
     112        FPower*Effs = Inlet.F*Ws;
     113
     114"Fluid Power"
     115        FPower = WorkIn;
     116
    113117end
  • branches/gui/eml/pressure_changers/icon/CentrifugalCompressor.svg

    r305 r595  
    33<svg
    44   xmlns:dc="http://purl.org/dc/elements/1.1/"
    5    xmlns:cc="http://web.resource.org/cc/"
     5   xmlns:cc="http://creativecommons.org/ns#"
    66   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    77   xmlns:svg="http://www.w3.org/2000/svg"
     
    1212   id="svg2124"
    1313   sodipodi:version="0.32"
    14    inkscape:version="0.44.1"
     14   inkscape:version="0.46"
    1515   width="210mm"
    1616   height="297mm"
    1717   sodipodi:docbase="C:\Documents and Settings\Administrador\Meus documentos\Bolsa Simulação\Desenhos Prontos 4"
    18    sodipodi:docname="compressor.svg">
     18   sodipodi:docname="CentrifugalCompressor.svg"
     19   inkscape:output_extension="org.inkscape.output.svg.inkscape"
     20   inkscape:export-filename="D:\Apps\repositorio\branches\gui\eml\pressure_changers\icon\CentrifugalCompressor.png"
     21   inkscape:export-xdpi="108"
     22   inkscape:export-ydpi="108">
    1923  <metadata
    2024     id="metadata2129">
     
    3034  <defs
    3135     id="defs2127">
     36    <marker
     37       inkscape:stockid="EmptyTriangleOutL"
     38       orient="auto"
     39       refY="0.0"
     40       refX="0.0"
     41       id="EmptyTriangleOutL"
     42       style="overflow:visible">
     43      <path
     44         id="path3328"
     45         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
     46         style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none"
     47         transform="scale(0.8) translate(-6,0)" />
     48    </marker>
     49    <marker
     50       inkscape:stockid="EmptyTriangleInL"
     51       orient="auto"
     52       refY="0.0"
     53       refX="0.0"
     54       id="EmptyTriangleInL"
     55       style="overflow:visible">
     56      <path
     57         id="path3319"
     58         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
     59         style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none"
     60         transform="scale(-0.8) translate(-6,0)" />
     61    </marker>
     62    <inkscape:perspective
     63       sodipodi:type="inkscape:persp3d"
     64       inkscape:vp_x="0 : 526.18109 : 1"
     65       inkscape:vp_y="0 : 1000 : 0"
     66       inkscape:vp_z="744.09448 : 526.18109 : 1"
     67       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
     68       id="perspective19" />
    3269    <linearGradient
    3370       id="linearGradient3913">
     
    65102       y2="390.36218"
    66103       gradientUnits="userSpaceOnUse"
    67        gradientTransform="matrix(0.704551,0,0,1.003186,100.134,-1.568554)" />
     104       gradientTransform="matrix(1.5321645,0,0,0.9953023,-261.39319,2.8065289)" />
    68105  </defs>
    69106  <sodipodi:namedview
     
    80117     id="base"
    81118     showgrid="true"
    82      inkscape:zoom="0.71648337"
     119     inkscape:zoom="2.026521"
    83120     inkscape:cx="372.04724"
    84      inkscape:cy="526.18109"
    85      inkscape:window-x="-4"
    86      inkscape:window-y="-4"
     121     inkscape:cy="595.95584"
     122     inkscape:window-x="0"
     123     inkscape:window-y="97"
    87124     inkscape:current-layer="svg2124" />
    88125  <path
    89      style="fill:url(#linearGradient3919);fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:3.36284566;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
    90      d="M 339.68142,412.10732 L 339.68142,592.68076 L 438.31858,532.48961 L 438.31858,452.23475 L 339.68142,392.0436 L 339.68142,412.10732 L 339.68142,412.10732"
     126     style="fill:url(#linearGradient3919);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:4.93958187;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     127     d="M 259.54292,413.23147 L 259.54292,592.38585 L 474.046,532.66772 L 474.046,453.04356 L 259.54292,393.32543 L 259.54292,413.23147 L 259.54292,413.23147"
    91128     id="path2131" />
    92129  <path
    93      style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
    94      d="M 260.33264,492.36218 C 340.16736,492.36218 340.16736,492.36218 340.16736,492.36218"
    95      id="path3921" />
     130     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.8903805;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     131     d="M 279.28963,369.70701 C 279.79407,397.75019 279.79407,397.75019 279.79407,397.75019"
     132     id="path2392" />
    96133  <path
    97      style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
    98      d="M 436.90786,491.05839 C 516.74258,491.05839 516.74258,491.05839 516.74258,491.05839"
    99      id="path5693" />
     134     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.8903805;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     135     d="M 462.10585,537.48222 C 462.61029,565.5254 462.61029,565.5254 462.61029,565.5254"
     136     id="path4465" />
    100137  <path
    101      style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.61016744px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
    102      d="M 252.30508,482.60285 L 252.30508,502.0571 L 282.92498,492.32998 L 252.30508,482.60285 z "
    103      id="path5695" />
    104   <path
    105      style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.61016744px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
    106      d="M 505.07502,480.66727 L 505.07502,500.12152 L 535.69492,490.3944 L 505.07502,480.66727 z "
    107      id="path6582" />
     138     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.90423274;stroke-linecap:square;stroke-linejoin:miter;marker-end:url(#EmptyTriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.90423274,2.90423274;stroke-opacity:1;stroke-dashoffset:0"
     139     d="M 188.30905,495.49505 C 259.256,495.02443 259.256,495.02443 259.256,495.02443"
     140     id="path4467" />
    108141</svg>
  • branches/gui/sample/pressure_changers/sample_compressor.mso

    r585 r595  
    2828FlowSheet compressor_C1
    2929
    30         DEVICES
    31         S1 as source;
    32         C1 as centrifugal_compressor;
    33        
    34         CONNECTIONS
    35         S1.Outlet to C1.Inlet;
    36        
    3730        PARAMETERS
    3831        PP              as Plugin       (Brief="External Physical Properties",
     
    4437        NComp   as Integer              (Default= 1);
    4538       
     39        DEVICES
     40        S1 as source;
     41        W1 as work_source;
     42        C1 as centrifugal_compressor;
     43       
     44        CONNECTIONS
     45        S1.Outlet to C1.Inlet;
     46        W1.Work to C1.WorkIn;
     47       
     48       
    4649        SET
    4750        NComp = PP.NumberOfComponents;
    4851       
    49         S1.ValidPhases = "Liquid-Only";
     52        S1.ValidPhases = "Vapour-Only";
    5053        S1.CompositionBasis = "Molar";
    5154
     
    5962        C1.Outlet.P = 3 * 'atm';
    6063end
     64
     65FlowSheet compressor_C2
     66
     67        PARAMETERS
     68        PP              as Plugin       (Brief="External Physical Properties",
     69                Type="PP",
     70                Components = ["propane"],
     71                LiquidModel = "IdealLiquid",
     72                VapourModel = "Ideal"
     73        );
     74        NComp   as Integer              (Default= 1);
     75       
     76        DEVICES
     77        S1 as source;
     78        C1 as centrifugal_compressor;
     79       
     80        CONNECTIONS
     81        S1.Outlet to C1.Inlet;
     82       
     83       
     84        SET
     85        NComp = PP.NumberOfComponents;
     86       
     87        S1.ValidPhases = "Vapour-Only";
     88        S1.CompositionBasis = "Molar";
     89
     90        SPECIFY
     91        C1.Effs = 0.75;
     92        S1.F = 41.05            * 'kmol/h';
     93        S1.P = 1                        * 'atm';
     94        S1.T = 298                      * 'K' ;
     95        S1.Composition = [01];
     96       
     97        C1.Outlet.P = 3 * 'atm';
     98end
Note: See TracChangeset for help on using the changeset viewer.