#*----------------------------------------------------------------------------
* This file is property of the author and cannot be used, copyed
* or modified without permission.
*
* Copyright (C) 2002-2006 the author
*-----------------------------------------------------------------------------
* Author: Marcos L. Alencastro Date:03/03/2006
* $Id:$ Estefane da S. Horn
*-----------------------------------------------------------------------------
* -> Steady State
* -> Only Vapour
* -> Adiabatic
*#
using "streams";
using "pressure_changers/flux_machine_basic";
Model centrifugal_compressor as flux_machine_basic_TP
PARAMETERS
ext PP as CalcObject (Brief = "External Physical Properties");
ext NComp as Integer (Brief = "Number of chemical components", Lower = 1);
Effs as positive (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 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");
k as positive (Brief = "Isentropic Coefficient");
Cp as cp_mol (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");
Cv as cv_mol (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");
Pdiff as press_delta (Brief = "Pressure Increase", Unit="kPa");
Pratio as positive (Brief = "Pressure Ratio");
Wp as energy_mol (Brief = "Politropic Head", Unit = "kJ/kmol");
Ws as energy_mol (Brief = "Isentropic Head", Unit = "kJ/kmol");
Tiso as temperature (Brief = "Isentropic Temperature");
Effp as positive (Brief = "Politropic efficiency", Lower = 0, Upper = 1);
FPower as power (Brief = "Fluid Power", Unit="kW");
Mwm as molweight (Brief = "Mixture Molar Weight");
SET
Mw = PP.MolecularWeight();
EQUATIONS
"Calculate Mwm for Inlet Mixture"
Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
"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 = Cp/Cv;
"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"
Outlet.T = Inlet.T * (Outlet.P/Inlet.P)^((n-1)/n);
"Calculate Politropic Efficiency"
Effp = (n/(n-1))/(k/(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