#*-------------------------------------------------------------------
* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
*
* This LIBRARY is free software; you can distribute it and/or modify
* it under the therms of the ALSOC FREE LICENSE as available at
* http://www.enq.ufrgs.br/alsoc.
*
* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
* from http://www.rps.eng.br Copyright (C) 2002-2004.
* All rights reserved.
*
* EMSO is distributed under the therms of the ALSOC LICENSE as
* available at http://www.enq.ufrgs.br/alsoc.
*
*----------------------------------------------------------------------
* Author: Marcos L. Alencastro, Estefane S. Horn
* $Id: compressor.mso 393 2007-10-17 23:50:09Z arge $
*--------------------------------------------------------------------*#
using "streams";
Model centrifugal_compressor
ATTRIBUTES
Pallete = true;
Icon = "icon/CentrifugalCompressor";
Brief = "Model of a centrifugal compressor.";
Info =
"== Assumptions ==
* Steady State;
* Only Vapor;
* Adiabatic.
== Specify ==
* the inlet stream;
* the outlet pressure (Outlet.P);
* the Isentropic efficiency (Effs).
";
PARAMETERS
outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
R as positive (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K');
Mw(NComp) as molweight (Brief = "Molar Weight");
VARIABLES
n as positive (Brief = "Politropic Coefficient", Lower=0);
k as positive (Brief = "Isentropic Coefficient", Lower=1e-3);
Cp as cp_mol (Brief = "Heat Capacity");
Cv as cv_mol (Brief = "Heat Capacity");
Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}");
Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
Wp as energy_mol (Brief = "Politropic Head");
Ws as energy_mol (Brief = "Isentropic Head");
Tiso as temperature (Brief = "Isentropic Temperature");
Effp as positive (Brief = "Politropic efficiency");
Effs as efficiency (Brief = "Isentropic efficiency");
FPower as power (Brief = "Fluid Power");
Mwm as molweight (Brief = "Mixture Molar Weight");
in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5086, Symbol="_{in}");
out Outlet as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.5022, Symbol="_{out}");
SET
Mw = PP.MolecularWeight();
EQUATIONS
"Calculate Mwm for Inlet Mixture"
Mwm = sum(Mw*Inlet.z);
"Pressure Ratio"
Outlet.P = Inlet.P * Pratio;
"Pressure Drop"
Outlet.P = Inlet.P - Pdrop;
"Calculate Cp Using a External Physical Properties Routine"
Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z);
"Calculate Cv Using a External Physical Properties Routine"
Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z);
"Calculate Isentropic Coeficient"
k * Cv = Cp;
"Calculate Isentropic Head"
Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1);
"Calculate Isentropic Outlet Temperature"
# Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k);
PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) =
PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z);
"Calculate Real Outlet Temperature"
Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T);
"Calculate Politropic Coefficient"
n*(ln(Outlet.T/Inlet.T)) = (n-1)*(ln(Outlet.P/Inlet.P));
"Calculate Politropic Efficiency"
Effp * (n-1) * k = n * (k-1);
"Calculate Politropic Head"
Ws*Effp = Wp*Effs;
"Calculate Fluid Power"
FPower*Effs = Inlet.F*Ws;
"Overall Molar Balance"
Outlet.F = Inlet.F;
"Component Molar Balance"
Outlet.z = Inlet.z;
end