#*-------------------------------------------------------------------
* 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.
*
*--------------------------------------------------------------------
* Model of a centrifugal pump
*--------------------------------------------------------------------
* - Assumptions
* * Steady State
* * Only Liquid
* * Adiabatic
* * Isentropic
*
*----------------------------------------------------------------------
* Author: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
* $Id: pump.mso 125 2007-01-22 19:57:16Z rafael $
*--------------------------------------------------------------------*#
using "streams";
using "pressure_changers/flux_machine_basic";
Model centrifugal_pump as flux_machine_basic
PARAMETERS
outer PP as Plugin (Brief = "External Physical Properties");
outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
Mw(NComp) as molweight (Brief = "Molar Weight");
Eff as positive (Default = 0.72, Brief = "Pump Efficiency");
Meff as positive (Default = 0.95, Brief = "Brake Efficiency");
Beta as positive (Default = 0, Brief = "Volumetric Expansivity", Unit = "1/K");
g as acceleration (Brief = "Gravity Acceleration", Default = 9.81);
N as vel_angular (Brief = "Rotation", Default = 100);
Lev as length (Brief = "Loss Friction", Default = 0);
VARIABLES
rho as dens_mass (Brief = "Specific Mass", Unit="kg/m^3");
Cp as cp_mol (Brief = "Heat Capacity", Unit="kJ/kmol/K");
FPower as power (Brief = "Fluid Power", Unit="kW");
BPower as power (Brief = "Brake Power",Unit="kW");
EPower as power (Brief = "Eletrical Potency", Unit="kW");
Pdiff as press_delta (Brief = "Pressure Increase", Unit="kPa");
Pratio as positive (Brief = "Pressure Ratio");
Head as head (Brief = "Head Developed", Unit="kJ/kmol");
Head_is as head (Brief = "Isoentripic Head", Unit="kJ/kmol");
Mwm as molweight (Brief = "Mixture Molar Weight");
pvm as pressure (Brief = "Mixture Vapour Pressure", Unit = "kPa");
NPSHa as length (Brief = "Available Net Positive Suction Head");
NS as positive (Brief = "Specific Speed", Unit = "(rpm*(gal/min)^0.5)/(m^3/4)");
Q as flow_vol (Brief = "Volumetric Flow Rate");
vm as vol_mol (Brief = "Mixture Molar Volume", Unit = "m^3/kmol");
SET
Mw = PP.MolecularWeight();
EQUATIONS
#Mixtures Properties
"Calculate Mwm for Inlet Mixture"
Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
"Calculate Cp Using a External Physical Properties Routine"
Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z);
"Calculate rho using a External Physical Properties Routine"
rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
"Calculate Mixture Vapour Pressure"
[pvm] = PP.BubbleP(Inlet.T,Inlet.z);
"Calculate Outlet Vapour Fraction"
Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);
"Calculate Liquid Molar Volume"
vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z);
#Mass and Energy Balance and Pump Equations
"Calculate Outlet Stream Pressure"
Outlet.P = Inlet.P + Pdiff;
"Pratio Definition"
Outlet.P = Inlet.P * Pratio;
"Calculate Isentropic Head"
Head_is = Pdiff * Mwm/rho;
"Calculate Real Head"
Head = Head_is/(Eff*Meff);
"Calculate Outlet Enthalpy"
Outlet.h - Inlet.h = Head;
"Calculate Fluid Power"
FPower = Head_is * Inlet.F;
"Calculate Brake Power"
BPower * Eff = FPower;
"Calculate Eletric Power"
BPower = EPower * Meff;
"Calculate Outlet Temperature"
(Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) - Pdiff * Mwm / rho * (1 - Beta * Inlet.T);
"Molar Balance"
Outlet.F = Inlet.F;
"Calculate Outlet Composition"
Outlet.z = Inlet.z;
"Calculate Net Positive Suction Head"
NPSHa = - Lev + (Inlet.P - pvm)/(g*rho); #If Inlet.P is the suction pump pressure, Lev is 0.
"Calculate Volumetric Flow Rate"
Q = Inlet.F*vm;
"Calculate Specific Speed"
NS = N*(Q^0.5)/(Head^3/4);
end
#*-------------------------------------------------------------------
* Model of a pump (simplified, used in distillation column model)
*--------------------------------------------------------------------
*
* Streams:
* * an inlet stream
* * an outlet stream
*
* Specify:
* * the inlet stream
* * the pump press delta
*
*----------------------------------------------------------------------
* Author: Paula B. Staudt
*--------------------------------------------------------------------*#
Model pump
PARAMETERS
outer PP as Plugin;
outer NComp as Integer;
VARIABLES
in Inlet as stream;
out Outlet as streamPH;
dP as press_delta (Brief="Pump head");
EQUATIONS
"Molar Balance"
Inlet.F = Outlet.F;
Inlet.z = Outlet.z;
"Pump head"
Outlet.P = Inlet.P + dP;
"FIXME: pump potency"
Outlet.h = Inlet.h;
end