#*-------------------------------------------------------------------
* 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: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
* $Id: pump.mso 277 2007-06-16 20:17:45Z paula $
*--------------------------------------------------------------------*#
using "pressure_changers/flux_machine_basic";
Model centrifugal_pump as flux_machine_basic
ATTRIBUTES
Pallete = true;
Icon = "CentrifugalPump";
Brief = "Model of a centrifugal pump.";
Info =
"Assumptions:
* Steady State;
* Only Liquid;
* Adiabatic;
* Isentropic.
Specify:
* the inlet stream;
* the Pressure Increase Pdiff.
";
PARAMETERS
outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
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");
Cp as cp_mol (Brief = "Heat Capacity");
FPower as power (Brief = "Fluid Power");
BPower as power (Brief = "Brake Power");
EPower as power (Brief = "Eletrical Potency");
Pdiff as press_delta (Brief = "Pressure Increase", DisplayUnit='kPa');
Pratio as positive (Brief = "Pressure Ratio");
Head as head (Brief = "Head Developed");
Head_is as head (Brief = "Isoentripic Head");
Mwm as molweight (Brief = "Mixture Molar Weight");
pvm as pressure (Brief = "Mixture Vapour Pressure");
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");
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)
*----------------------------------------------------------------------
* Author: Paula B. Staudt
*--------------------------------------------------------------------*#
Model pump
ATTRIBUTES
Pallete = true;
Icon = "Pump";
Brief = "Model of a simplified pump, used in distillation column model.";
Info =
"Specify:
* the inlet stream;
* the pump press delta dP.
";
PARAMETERS
outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
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