1 | #*------------------------------------------------------------------------ |
---|
2 | * This file is property of the author and cannot be used, copyed |
---|
3 | * or modified without permission. |
---|
4 | * |
---|
5 | * Copyright (C) 2002-2006 the author |
---|
6 | *------------------------------------------------------------------------- |
---|
7 | * Authors: Andrey Copat Estefane da Silveira Horn |
---|
8 | * $Id: $ Marcos Lovato Alencastro |
---|
9 | * Date: 20/02/2006 |
---|
10 | *------------------------------------------------------------------------- |
---|
11 | * -> Steady State |
---|
12 | * -> Only Liquid |
---|
13 | * -> Adiabatic |
---|
14 | * -> Isentropic |
---|
15 | *-------------------------------------------------------------------------*# |
---|
16 | using "streams"; |
---|
17 | using "pressure_changers/flux_machine_basic"; |
---|
18 | |
---|
19 | Model Hidraulic_Turbine as flux_machine_basic |
---|
20 | |
---|
21 | PARAMETERS |
---|
22 | ext NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
23 | ext PP as CalcObject (Brief = "External Physical Properties"); |
---|
24 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
25 | Eff as positive (Default = 0.72, Brief = "Pump efficiency"); |
---|
26 | Meff as positive (Default = 1.0, Brief = "Brake efficiency"); |
---|
27 | Beta as positive (Default = 0, Brief = "Volumetric expansivity", Unit = "1/K"); |
---|
28 | |
---|
29 | |
---|
30 | VARIABLES |
---|
31 | Head as head (Brief = "Head Developed"); |
---|
32 | FPower as power (Brief = "Fluid Power"); |
---|
33 | BPower as power (Brief = "Brake Power"); |
---|
34 | EPower as power (Brief = "Eletrical Potency"); |
---|
35 | Pdiff as press_delta (Brief = "Pressure Increase"); |
---|
36 | Pratio as positive (Brief = "Pressure Ratio"); |
---|
37 | Mwm as molweight (Brief = "Mixture Molar Weight"); |
---|
38 | rho as dens_mass (Brief = "Specific Mass", Unit="kg/m^3"); |
---|
39 | Cp as cp_mol (Brief = "Heat Capacity"); |
---|
40 | |
---|
41 | SET |
---|
42 | Mw = PP.MolecularWeight(); |
---|
43 | |
---|
44 | EQUATIONS |
---|
45 | #Mixtures Properties |
---|
46 | "Calculate Mwm for Inlet Mixture" |
---|
47 | Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp])); |
---|
48 | |
---|
49 | "Calculate rho using a External Physical Properties Routine" |
---|
50 | rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); |
---|
51 | |
---|
52 | "Calculate Outlet Vapour Fraction" |
---|
53 | Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); |
---|
54 | |
---|
55 | "Calculate Cp Using a External Physical Properties Routine" |
---|
56 | Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); |
---|
57 | |
---|
58 | #Mass and Energy Balance and Turbine Equations |
---|
59 | "Calculate Outlet Stream Pressure" |
---|
60 | Outlet.P = Inlet.P + Pdiff; |
---|
61 | |
---|
62 | "Pratio Definition" |
---|
63 | Outlet.P = Inlet.P * Pratio; |
---|
64 | |
---|
65 | "Calculate Fluid Power" |
---|
66 | FPower = Pdiff * Inlet.F / (rho/Mwm); |
---|
67 | |
---|
68 | "Calculate Brake Power" |
---|
69 | BPower = FPower * Eff; |
---|
70 | |
---|
71 | "Calculate Eletric Power" |
---|
72 | EPower = BPower * Meff; |
---|
73 | |
---|
74 | "Calculate Outlet Temperature" |
---|
75 | (Outlet.T - Inlet.T)*Cp = (Outlet.h - Inlet.h) - Pdiff /(rho/Mwm) * (1-Beta*Inlet.T); |
---|
76 | |
---|
77 | "Calculate Outlet Enthalpy" |
---|
78 | Outlet.h - Inlet.h = Pdiff / (rho/Mwm); |
---|
79 | |
---|
80 | "Molar Balance" |
---|
81 | Outlet.F = Inlet.F; |
---|
82 | |
---|
83 | "Calculate Outlet Composition" |
---|
84 | Outlet.z = Inlet.z; |
---|
85 | |
---|
86 | "Calculate Head" |
---|
87 | Head = Pdiff/rho; |
---|
88 | |
---|
89 | end |
---|