#*-------------------------------------------------------------------
* 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 277 2007-06-16 20:17:45Z paula $
*--------------------------------------------------------------------*#
using "pressure_changers/flux_machine_basic";
Model centrifugal_compressor as flux_machine_basic_PH
ATTRIBUTES
Pallete = true;
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=0);
Cp as cp_mol (Brief = "Heat Capacity");
Cv as cv_mol (Brief = "Heat Capacity");
Pdiff as press_delta (Brief = "Pressure Increase", DisplayUnit='kPa');
Pratio as positive (Brief = "Pressure Ratio");
Wp as energy_mol (Brief = "Politropic Head");
Ws as energy_mol (Brief = "Isentropic Head");
Tiso as temperature (Brief = "Isentropic Temperature");
Effp as efficiency (Brief = "Politropic efficiency");
Effs as efficiency (Brief = "Isentropic efficiency");
FPower as power (Brief = "Fluid Power");
Mwm as molweight (Brief = "Mixture Molar Weight");
SET
Mw = PP.MolecularWeight();
EQUATIONS
"Calculate Mwm for Inlet Mixture"
Mwm = sum(Mw*Inlet.z);
"Calculate Outlet Stream Pressure"
Outlet.P = Inlet.P + Pdiff;
"Pratio Definition"
Outlet.P = Inlet.P * Pratio;
"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);
"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;
"Molar Balance"
Outlet.F = Inlet.F;
Outlet.z = Inlet.z;
end