[596] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
| 3 | * |
---|
| 4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
| 5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
| 6 | * http://www.enq.ufrgs.br/alsoc. |
---|
| 7 | * |
---|
| 8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
| 9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
| 10 | * All rights reserved. |
---|
| 11 | * |
---|
| 12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
| 13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
| 14 | * |
---|
| 15 | *---------------------------------------------------------------------- |
---|
| 16 | * Authors: Rafael de Pelegrini Soares |
---|
| 17 | * Andrey Copat, Estefane S. Horn, Marcos L. Alencastro |
---|
| 18 | * $Id: turbine.mso 689 2008-11-21 00:56:29Z bicca $ |
---|
| 19 | *--------------------------------------------------------------------*# |
---|
| 20 | |
---|
| 21 | using "streams"; |
---|
| 22 | |
---|
| 23 | #Needs to be reformulated |
---|
| 24 | |
---|
| 25 | Model HidraulicTurbine |
---|
| 26 | ATTRIBUTES |
---|
| 27 | Pallete = true; |
---|
| 28 | Icon = "icon/HidraulicTurbine"; |
---|
| 29 | Brief = "Testing Model of a Hidraulic Turbine."; |
---|
| 30 | |
---|
| 31 | PARAMETERS |
---|
| 32 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
| 33 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
| 34 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
| 35 | |
---|
| 36 | VARIABLES |
---|
| 37 | Eff as efficiency (Brief = "Turbine efficiency"); |
---|
| 38 | Meff as efficiency (Brief = "Brake efficiency"); |
---|
| 39 | Beta as positive (Brief = "Volumetric expansivity", Unit = '1/K'); |
---|
| 40 | Head as head (Brief = "Head Developed"); |
---|
| 41 | FPower as power (Brief = "Fluid Power"); |
---|
| 42 | BPower as power (Brief = "Brake Power"); |
---|
| 43 | Pratio as positive (Brief = "Pressure Ratio"); |
---|
| 44 | Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); |
---|
| 45 | Mwm as molweight (Brief = "Mixture Molar Weight"); |
---|
| 46 | rho as dens_mass (Brief = "Specific Mass"); |
---|
| 47 | Cp as cp_mol (Brief = "Heat Capacity"); |
---|
| 48 | in Inlet as stream (Brief = "Inlet stream", PosX=0.05, PosY=0.0, Symbol="_{in}"); |
---|
| 49 | out Outlet as stream (Brief = "Outlet stream", PosX=0.65, PosY=1, Symbol="_{out}"); |
---|
| 50 | out WorkOut as power (Brief = "Work Outlet", PosX=1, PosY=0.46); |
---|
| 51 | |
---|
| 52 | SET |
---|
| 53 | Mw = PP.MolecularWeight(); |
---|
| 54 | |
---|
| 55 | EQUATIONS |
---|
| 56 | #Mixtures Properties |
---|
| 57 | "Calculate Mwm for Inlet Mixture" |
---|
| 58 | Mwm = sum(Mw*Inlet.z); |
---|
| 59 | |
---|
| 60 | "Calculate rho using a External Physical Properties Routine" |
---|
| 61 | rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); |
---|
| 62 | |
---|
| 63 | "Calculate Outlet Vapour Fraction" |
---|
| 64 | Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); |
---|
| 65 | |
---|
| 66 | "Calculate Cp Using a External Physical Properties Routine" |
---|
| 67 | Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); |
---|
| 68 | |
---|
| 69 | "Pressure Ratio" |
---|
| 70 | Outlet.P = Inlet.P * Pratio; |
---|
| 71 | |
---|
| 72 | "Pressure Drop" |
---|
| 73 | Outlet.P = Inlet.P - Pdrop; |
---|
| 74 | |
---|
| 75 | "Calculate Fluid Power" |
---|
| 76 | FPower * rho = -Pdrop * Inlet.F * Mwm; |
---|
| 77 | |
---|
| 78 | "Calculate Brake Power" |
---|
| 79 | BPower = FPower * Eff; |
---|
| 80 | |
---|
| 81 | BPower = WorkOut; |
---|
| 82 | |
---|
| 83 | "Calculate Outlet Temperature" |
---|
| 84 | (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho |
---|
| 85 | + Pdrop * Mwm * (1-Beta*Inlet.T); |
---|
| 86 | |
---|
| 87 | "Calculate Outlet Enthalpy" |
---|
| 88 | (Outlet.h - Inlet.h) * rho = -Pdrop * Mwm; |
---|
| 89 | |
---|
| 90 | "Molar Balance" |
---|
| 91 | Outlet.F = Inlet.F; |
---|
| 92 | |
---|
| 93 | "Calculate Outlet Composition" |
---|
| 94 | Outlet.z = Inlet.z; |
---|
| 95 | |
---|
| 96 | "Calculate Head" |
---|
| 97 | Head = Outlet.h - Inlet.h; |
---|
| 98 | end |
---|
| 99 | |
---|
| 100 | Model HidraulicTurbineGenerator as HidraulicTurbine |
---|
| 101 | ATTRIBUTES |
---|
| 102 | Pallete = true; |
---|
| 103 | Icon = "icon/HidraulicTurbine"; |
---|
| 104 | Brief = "Model of a Hidraulic Turbine."; |
---|
| 105 | Info = |
---|
| 106 | "== Assumptions == |
---|
| 107 | * Steady State; |
---|
| 108 | * Only Liquid; |
---|
| 109 | * Adiabatic; |
---|
| 110 | * Isentropic. |
---|
| 111 | |
---|
| 112 | == Specify == |
---|
| 113 | * the inlet stream; |
---|
| 114 | * the Pressure Increase (Pdiff) OR the outlet pressure (Outlet.P); |
---|
| 115 | * the Turbine efficiency (Eff); |
---|
| 116 | * the Brake efficiency (Meff); |
---|
| 117 | * the Volumetric expansivity (Beta). |
---|
| 118 | "; |
---|
| 119 | |
---|
| 120 | VARIABLES |
---|
| 121 | EPower as power (Brief = "Eletrical Potency"); |
---|
| 122 | |
---|
| 123 | EQUATIONS |
---|
| 124 | "Calculate Eletric Power" |
---|
| 125 | EPower = BPower * Meff; |
---|
| 126 | end |
---|
[597] | 127 | |
---|