#*-------------------------------------------------------------------
* 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 Hidraulic Turbine
*--------------------------------------------------------------------
*
* - Assumptions
* * Steady State
* * Only Liquid
* * Adiabatic
* * Isentropic
*
*----------------------------------------------------------------------
* Authors: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
* $Id$
*--------------------------------------------------------------------*#
using "streams";
using "pressure_changers/flux_machine_basic";
Model Hidraulic_Turbine as flux_machine_basic
PARAMETERS
ext NComp as Integer (Brief = "Number of chemical components", Lower = 1);
ext PP as CalcObject (Brief = "External Physical Properties");
Mw(NComp) as molweight (Brief = "Molar Weight");
Eff as positive (Default = 0.72, Brief = "Pump efficiency");
Meff as positive (Default = 1.0, Brief = "Brake efficiency");
Beta as positive (Default = 0, Brief = "Volumetric expansivity", Unit = "1/K");
VARIABLES
Head as head (Brief = "Head Developed");
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");
Pratio as positive (Brief = "Pressure Ratio");
Mwm as molweight (Brief = "Mixture Molar Weight");
rho as dens_mass (Brief = "Specific Mass", Unit="kg/m^3");
Cp as cp_mol (Brief = "Heat Capacity");
SET
Mw = PP.MolecularWeight();
EQUATIONS
#Mixtures Properties
"Calculate Mwm for Inlet Mixture"
Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
"Calculate rho using a External Physical Properties Routine"
rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
"Calculate Outlet Vapour Fraction"
Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);
"Calculate Cp Using a External Physical Properties Routine"
Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z);
#Mass and Energy Balance and Turbine Equations
"Calculate Outlet Stream Pressure"
Outlet.P = Inlet.P + Pdiff;
"Pratio Definition"
Outlet.P = Inlet.P * Pratio;
"Calculate Fluid Power"
FPower = Pdiff * Inlet.F / (rho/Mwm);
"Calculate Brake Power"
BPower = FPower * Eff;
"Calculate Eletric Power"
EPower = BPower * Meff;
"Calculate Outlet Temperature"
(Outlet.T - Inlet.T)*Cp = (Outlet.h - Inlet.h) - Pdiff /(rho/Mwm) * (1-Beta*Inlet.T);
"Calculate Outlet Enthalpy"
Outlet.h - Inlet.h = Pdiff / (rho/Mwm);
"Molar Balance"
Outlet.F = Inlet.F;
"Calculate Outlet Composition"
Outlet.z = Inlet.z;
"Calculate Head"
Head = Pdiff/rho;
end