[277] | 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: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro |
---|
| 17 | * $Id: turbine.mso 277 2007-06-16 20:17:45Z paula $ |
---|
| 18 | *--------------------------------------------------------------------*# |
---|
| 19 | |
---|
| 20 | using "pressure_changers/flux_machine_basic"; |
---|
| 21 | |
---|
| 22 | Model Hidraulic_Turbine as flux_machine_basic |
---|
| 23 | ATTRIBUTES |
---|
| 24 | Pallete = true; |
---|
| 25 | Icon = "HidraulicTurbine"; |
---|
| 26 | Brief = "Model of a Hidraulic Turbine."; |
---|
| 27 | Info = |
---|
| 28 | "Assumptions: |
---|
| 29 | * Steady State; |
---|
| 30 | * Only Liquid; |
---|
| 31 | * Adiabatic; |
---|
| 32 | * Isentropic. |
---|
| 33 | |
---|
| 34 | Specify: |
---|
| 35 | * the inlet stream; |
---|
| 36 | * the Pressure Increase (Pdiff) OR the outlet pressure (Outlet.P); |
---|
| 37 | * the Turbine efficiency (Eff); |
---|
| 38 | * the Brake efficiency (Meff); |
---|
| 39 | * the Volumetric expansivity (Beta). |
---|
| 40 | "; |
---|
| 41 | |
---|
| 42 | PARAMETERS |
---|
| 43 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
| 44 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
| 45 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
| 46 | |
---|
| 47 | VARIABLES |
---|
| 48 | Eff as efficiency (Brief = "Turbine efficiency"); |
---|
| 49 | Meff as efficiency (Brief = "Brake efficiency"); |
---|
| 50 | Beta as positive (Brief = "Volumetric expansivity", Unit = '1/K'); |
---|
| 51 | Head as head (Brief = "Head Developed"); |
---|
| 52 | FPower as power (Brief = "Fluid Power"); |
---|
| 53 | BPower as power (Brief = "Brake Power"); |
---|
| 54 | EPower as power (Brief = "Eletrical Potency"); |
---|
| 55 | Pdiff as press_delta (Brief = "Pressure Increase"); |
---|
| 56 | Pratio as positive (Brief = "Pressure Ratio"); |
---|
| 57 | Mwm as molweight (Brief = "Mixture Molar Weight"); |
---|
| 58 | rho as dens_mass (Brief = "Specific Mass"); |
---|
| 59 | Cp as cp_mol (Brief = "Heat Capacity"); |
---|
| 60 | |
---|
| 61 | SET |
---|
| 62 | Mw = PP.MolecularWeight(); |
---|
| 63 | |
---|
| 64 | EQUATIONS |
---|
| 65 | #Mixtures Properties |
---|
| 66 | "Calculate Mwm for Inlet Mixture" |
---|
| 67 | Mwm = sum(Mw*Inlet.z); |
---|
| 68 | |
---|
| 69 | "Calculate rho using a External Physical Properties Routine" |
---|
| 70 | rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); |
---|
| 71 | |
---|
| 72 | "Calculate Outlet Vapour Fraction" |
---|
| 73 | Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); |
---|
| 74 | |
---|
| 75 | "Calculate Cp Using a External Physical Properties Routine" |
---|
| 76 | Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); |
---|
| 77 | |
---|
| 78 | #Mass and Energy Balance and Turbine Equations |
---|
| 79 | "Calculate Outlet Stream Pressure" |
---|
| 80 | Outlet.P = Inlet.P + Pdiff; |
---|
| 81 | |
---|
| 82 | "Pratio Definition" |
---|
| 83 | Outlet.P = Inlet.P * Pratio; |
---|
| 84 | |
---|
| 85 | "Calculate Fluid Power" |
---|
| 86 | FPower * rho = Pdiff * Inlet.F * Mwm; |
---|
| 87 | |
---|
| 88 | "Calculate Brake Power" |
---|
| 89 | BPower = FPower * Eff; |
---|
| 90 | |
---|
| 91 | "Calculate Eletric Power" |
---|
| 92 | EPower = BPower * Meff; |
---|
| 93 | |
---|
| 94 | "Calculate Outlet Temperature" |
---|
| 95 | (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho |
---|
| 96 | - Pdiff * Mwm * (1-Beta*Inlet.T); |
---|
| 97 | |
---|
| 98 | "Calculate Outlet Enthalpy" |
---|
| 99 | (Outlet.h - Inlet.h) * rho = Pdiff * Mwm; |
---|
| 100 | |
---|
| 101 | "Molar Balance" |
---|
| 102 | Outlet.F = Inlet.F; |
---|
| 103 | |
---|
| 104 | "Calculate Outlet Composition" |
---|
| 105 | Outlet.z = Inlet.z; |
---|
| 106 | |
---|
| 107 | "Calculate Head" |
---|
| 108 | Head * rho = Pdiff; |
---|
| 109 | end |
---|