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 554 2008-07-17 17:08:20Z rafael $ |
---|
19 | *--------------------------------------------------------------------*# |
---|
20 | |
---|
21 | using "streams"; |
---|
22 | |
---|
23 | Model HidraulicTurbine |
---|
24 | ATTRIBUTES |
---|
25 | Pallete = true; |
---|
26 | Icon = "icon/HidraulicTurbine"; |
---|
27 | Brief = "Model of a Hidraulic Turbine."; |
---|
28 | Info = |
---|
29 | "== Assumptions == |
---|
30 | * Steady State; |
---|
31 | * Only Liquid; |
---|
32 | * Adiabatic; |
---|
33 | * Isentropic. |
---|
34 | |
---|
35 | == Specify == |
---|
36 | * the inlet stream; |
---|
37 | * the Pressure Increase (Pdiff) OR the outlet pressure (Outlet.P); |
---|
38 | * the Turbine efficiency (Eff); |
---|
39 | * the Brake efficiency (Meff); |
---|
40 | * the Volumetric expansivity (Beta). |
---|
41 | "; |
---|
42 | |
---|
43 | PARAMETERS |
---|
44 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
45 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
46 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
47 | |
---|
48 | VARIABLES |
---|
49 | Eff as efficiency (Brief = "Turbine efficiency"); |
---|
50 | Meff as efficiency (Brief = "Brake efficiency"); |
---|
51 | Beta as positive (Brief = "Volumetric expansivity", Unit = '1/K'); |
---|
52 | Head as head (Brief = "Head Developed"); |
---|
53 | FPower as power (Brief = "Fluid Power"); |
---|
54 | BPower as power (Brief = "Brake Power"); |
---|
55 | Pratio as positive (Brief = "Pressure Ratio"); |
---|
56 | Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); |
---|
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 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5086, Symbol="_{in}"); |
---|
61 | out Outlet as stream (Brief = "Outlet stream", PosX=1, PosY=0.5022, Symbol="_{out}"); |
---|
62 | |
---|
63 | SET |
---|
64 | Mw = PP.MolecularWeight(); |
---|
65 | |
---|
66 | EQUATIONS |
---|
67 | #Mixtures Properties |
---|
68 | "Calculate Mwm for Inlet Mixture" |
---|
69 | Mwm = sum(Mw*Inlet.z); |
---|
70 | |
---|
71 | "Calculate rho using a External Physical Properties Routine" |
---|
72 | rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); |
---|
73 | |
---|
74 | "Calculate Outlet Vapour Fraction" |
---|
75 | Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); |
---|
76 | |
---|
77 | "Calculate Cp Using a External Physical Properties Routine" |
---|
78 | Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); |
---|
79 | |
---|
80 | "Pressure Ratio" |
---|
81 | Outlet.P = Inlet.P * Pratio; |
---|
82 | |
---|
83 | "Pressure Drop" |
---|
84 | Outlet.P = Inlet.P - Pdrop; |
---|
85 | |
---|
86 | "Calculate Fluid Power" |
---|
87 | FPower * rho = -Pdrop * Inlet.F * Mwm; |
---|
88 | |
---|
89 | "Calculate Brake Power" |
---|
90 | BPower = FPower * Eff; |
---|
91 | |
---|
92 | "Calculate Outlet Temperature" |
---|
93 | (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho |
---|
94 | + Pdrop * Mwm * (1-Beta*Inlet.T); |
---|
95 | |
---|
96 | "Calculate Outlet Enthalpy" |
---|
97 | (Outlet.h - Inlet.h) * rho = -Pdrop * Mwm; |
---|
98 | |
---|
99 | "Molar Balance" |
---|
100 | Outlet.F = Inlet.F; |
---|
101 | |
---|
102 | "Calculate Outlet Composition" |
---|
103 | Outlet.z = Inlet.z; |
---|
104 | |
---|
105 | "Calculate Head" |
---|
106 | Head = Outlet.h - Inlet.h; |
---|
107 | end |
---|
108 | |
---|
109 | |
---|
110 | Model HidraulicTurbineGenerator as HidraulicTurbine |
---|
111 | ATTRIBUTES |
---|
112 | Pallete = true; |
---|
113 | Icon = "icon/HidraulicTurbine"; |
---|
114 | Brief = "Model of a Hidraulic Turbine."; |
---|
115 | Info = |
---|
116 | "== Assumptions == |
---|
117 | * Steady State; |
---|
118 | * Only Liquid; |
---|
119 | * Adiabatic; |
---|
120 | * Isentropic. |
---|
121 | |
---|
122 | == Specify == |
---|
123 | * the inlet stream; |
---|
124 | * the Pressure Increase (Pdiff) OR the outlet pressure (Outlet.P); |
---|
125 | * the Turbine efficiency (Eff); |
---|
126 | * the Brake efficiency (Meff); |
---|
127 | * the Volumetric expansivity (Beta). |
---|
128 | "; |
---|
129 | |
---|
130 | VARIABLES |
---|
131 | EPower as power (Brief = "Eletrical Potency"); |
---|
132 | |
---|
133 | EQUATIONS |
---|
134 | "Calculate Eletric Power" |
---|
135 | EPower = BPower * Meff; |
---|
136 | end |
---|