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 372 2007-09-21 22:17:36Z arge $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "streams"; |
---|
21 | |
---|
22 | Model Hidraulic_Turbine |
---|
23 | ATTRIBUTES |
---|
24 | Pallete = true; |
---|
25 | Icon = "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 | 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 Eletric Power" |
---|
93 | EPower = BPower * Meff; |
---|
94 | |
---|
95 | "Calculate Outlet Temperature" |
---|
96 | (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho |
---|
97 | + Pdrop * Mwm * (1-Beta*Inlet.T); |
---|
98 | |
---|
99 | "Calculate Outlet Enthalpy" |
---|
100 | (Outlet.h - Inlet.h) * rho = -Pdrop * Mwm; |
---|
101 | |
---|
102 | "Molar Balance" |
---|
103 | Outlet.F = Inlet.F; |
---|
104 | |
---|
105 | "Calculate Outlet Composition" |
---|
106 | Outlet.z = Inlet.z; |
---|
107 | |
---|
108 | "Calculate Head" |
---|
109 | Head = Outlet.h - Inlet.h; |
---|
110 | end |
---|