#*------------------------------------------------------------------- * Biorrefinaria Petrobras *-------------------------------------------------------------------- * Nome do arquivo: Modelo_pinch.mso * Projeto: Modelo integrado de producao de etanol 1G/2G * Conteudo: *--------------------------------------------------------------------*# #*------------------------------------------------------------------- * * Versao:2.1 * Data: 06/2019 * Autores: Andrew Elias * *-------------------------------------------------------------------- * Descricao: Integracao de correntes energeticas para otimizacao de * troca energetica entre processos da planta. *-------------------------------------------------------------------- *-------------------------------------------------------------------- *Hipoteses assumidas: 1 - operacao em estado estacionario * 2 - sem perdas de calor para o ambiente *-------------------------------------------------------------------- *-------------------------------------------------------------------- *Notas: Foi feito o flowsheet teste para averiguar o modelo. *--------------------------------------------------------------------*# using "main_stream"; using "water_stream"; using "energy_stream"; Model heat_stream_int ATTRIBUTES Pallete = false; Brief = "Heat Stream"; Color = "red"; Info = "== GENERAL == Corrente criada para ser utilizada quando o modelo possui interpolador "; VARIABLES Q as power (Upper = 1e8, Lower = -1e8); T as temperature; end Model heat_source_int ATTRIBUTES Pallete = true; Icon = "icon/heatR"; Brief = "Heat Stream Source"; Info = "== GENERAL == Source of heat. "; VARIABLES out Outlet as heat_stream_int; end Model PinchPointInt ATTRIBUTES Pallete = false; Brief = "Integracao energetica atraves do pinch em processos com interpolador"; Info = "== GENERAL == Integracao de correntes energeticas para otimizacao de troca energetica entre porcessos == ASSUMPTIONS == * No heat loss to the environment; * Steady-state; * There is no phase change. == SPECIFY == * Inlet main stream: flow rate temperature pressure stream composition heat_trans_corr * The cold water steam stream: temperature pressure heat_trans_cold; * The vapour steam stream: pressure vapourization fraction heat_trans_hot; * The heat steam stream: heat_trans_corr; * Minimum approach temperature (DTmin); * Outlet Temperature of: main stream cold water steam stream heat steam stream, == SET == * Phase of the stream feed; * Number of stream components(Ncomp/NcompS); * Define type of method for area calculation by Switcher, U or h, Default = h ; * Basic composition (mass or molar). "; PARAMETERS outer Pinch as Plugin (Type = "Pinch"); outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); propterm as Plugin (Type = "water"); method as Switcher (Brief="Type of method",Valid=["U","h"],Default="h"); NCorrentes as Integer (Default = 11); #numero de correntes de processo que necessitam trocar calor NCorrentesInt as Integer (Default = 8);#numero de correntes que entram no interpolador (normalmente, 8) NUtilQuente as Integer(Default = 3); #Numero de utilidades quentes (vapor de alta, media e baixa) NUtilFria as Integer(Default = 1); #Numero de utilidades frias , agua de resfriamento U as heat_trans_coeff (Default = 0.69445); VARIABLES in Inlet(NCorrentes) as main_stream; out Outlet(NCorrentes) as main_stream; in Inlet_Int(NCorrentesInt) as heat_stream_int; in Inlet_q(NUtilQuente) as water_stream; out Outlet_q(NUtilQuente) as water_stream; in Inlet_f(NUtilFria) as water_stream; out Outlet_f(NUtilFria) as water_stream; H(NCorrentes + NCorrentesInt) as power; Tin(NCorrentes + NCorrentesInt) as temperature; Tout(NCorrentes + NCorrentesInt) as temperature; TPinch as temperature (Lower = 1e-6); delHUtilQuente(NUtilQuente) as enth_mass ; delHUtilFria(NUtilFria) as enth_mass; QH(NUtilQuente) as power (Brief = "Heat demand for each hot utility"); QC(NUtilFria) as power (Brief = "Heat demand for each cold utility"); QH_total as power; QC_total as power; DTmin as Real (Unit = 'K', Default = 10); heat_trans_corr(NCorrentes + NCorrentesInt) as heat_trans_coeff ; heat_trans_hot(NUtilQuente) as heat_trans_coeff ; heat_trans_cold(NUtilFria) as heat_trans_coeff ; Area_HEN as positive (Unit = 'm^2'); N_Troca as positive; Area_HEN_med as positive (Unit = 'm^2'); EQUATIONS "Global molar balance (Fluid)" Inlet(1:NCorrentes).Fluid.F = Outlet(1:NCorrentes).Fluid.F; "Global molar balance (Solid)" Inlet(1:NCorrentes).Solid.F = Outlet(1:NCorrentes).Solid.F; "Composition of fluid phase" Inlet(1:NCorrentes).Fluid.z = Outlet(1:NCorrentes).Fluid.z; "Composition of solid phase" Inlet(1:NCorrentes).Solid.z = Outlet(1:NCorrentes).Solid.z; "Mechanical equilibrium 1" Inlet(1:NCorrentes).P = Outlet(1:NCorrentes).P; "Phase equilibrium 1" Inlet(1:NCorrentes).v = Outlet(1:NCorrentes).v; #"Outlet molar enthalpy" for i in 1:NCorrentes do Outlet(i).Solid.h = PPS.VapourEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Solid.z); if Outlet(i).v equal 1 then Outlet(i).Fluid.h = PP.VapourEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Fluid.z); else Outlet(i).Fluid.h = PP.LiquidEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Fluid.z); end end #"Pinch information streams" for i in 1:NCorrentes do H(i) = Inlet(i).Fluid.F * (Outlet(i).Fluid.h - Inlet(i).Fluid.h) + Inlet(i).Solid.F * (Outlet(i).Solid.h - Inlet(i).Solid.h); Tin(i) = Inlet(i).T; Tout(i) = Outlet(i).T; end #"Pinch information streams 2" for i in 1:NCorrentesInt do H(i+NCorrentes) = Inlet_Int(i).Q; if Inlet_Int(i).Q < 0 * 'kW' then Tin(i+NCorrentes) = Inlet_Int(i).T; Tout(i+NCorrentes) = Inlet_Int(i).T - 1 * 'K'; else Tin(i+NCorrentes) = Inlet_Int(i).T; Tout(i+NCorrentes) = Inlet_Int(i).T + 1 * 'K'; end end "Global mass balance (Hot utilities)" Inlet_q(1:NUtilQuente).Fw = Outlet_q(1:NUtilQuente).Fw; "Mechanical equilibrium 1" Inlet_q(1:NUtilQuente).P = Outlet_q(1:NUtilQuente).P; "Liquid saturated" Outlet_q(1:NUtilQuente).v = 0; "Global mass balance (Cold utilities)" Inlet_f(1:NUtilFria).Fw = Outlet_f(1:NUtilFria).Fw; "Mechanical equilibrium 1" Inlet_f(1:NUtilFria).P = Outlet_f(1:NUtilFria).P; "Phase equilibrium 2" Inlet_f(1:NUtilFria).v = Outlet_f(1:NUtilFria).v; #"Entropy and enthalpy of condensed hot utilities" for i in 1:NUtilQuente do Outlet_q(i).T = propterm.Tsat(Outlet_q(i).P); [Outlet_q(i).S , Outlet_q(i).H] = propterm.propPTl(Inlet_q(i).P, propterm.Tsat(Inlet_q(i).P)); end #"Entropy and enthalpy of cold utilities" for i in 1:NUtilFria do [Outlet_f(i).S , Outlet_f(i).H] = propterm.propPTl(Outlet_f(i).P, Outlet_f(i).T); end "Required enthapy 1" delHUtilQuente = Outlet_q.H - Inlet_q.H; "Required enthapy 2" delHUtilFria = Outlet_f.H - Inlet_f.H; "Hot utilities demand" QH = -delHUtilQuente * Outlet_q.Fw; "Cold utilities demand" QC = delHUtilFria * Outlet_f.Fw; #"plug-in arguments" switch method case "U": [QH,QC,TPinch,QH_total,QC_total, Area_HEN,N_Troca] = Pinch.pinch_method_U(DTmin,Tin,Tout,H,Inlet_q.T,Inlet_f.T, Outlet_f.T, U); case "h": [QH,QC,TPinch,QH_total,QC_total, Area_HEN, N_Troca] = Pinch.pinch_method_h(DTmin,Tin,Tout,H,Inlet_q.T,Inlet_f.T, Outlet_f.T, heat_trans_corr, heat_trans_hot, heat_trans_cold); end "Mean HEN area" Area_HEN_med * N_Troca = Area_HEN; end # Modelo para sistemas sem interpolador Model PinchPointN ATTRIBUTES Pallete = false; Brief = "Integracao energetica atraves do pinch sem interpolador"; Info = "== GENERAL == Integracao de correntes energeticas para otimizacao de troca energetica entre porcessos == ASSUMPTIONS == * No heat loss to the environment; * Steady-state; * There is no phase change. == SPECIFY == * Inlet main stream: flow rate temperature pressure stream composition heat_trans_corr * The cold water steam stream: temperature pressure heat_trans_cold; * The vapour steam stream: pressure vapourization fraction heat_trans_hot; * The heat steam stream: heat_trans_corr; * Minimum approach temperature (DTmin); * Outlet Temperature of: main stream cold water steam stream heat steam stream, == SET == * Phase of the stream feed; * Number of stream components(Ncomp/NcompS); * Define type of method for area calculation by Switcher, U or h, Default = h ; * Basic composition (mass or molar). "; PARAMETERS outer Pinch as Plugin (Type = "Pinch"); outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); propterm as Plugin (Type = "water"); method as Switcher (Brief="Type of method",Valid=["U","h"],Default="h"); NCorrentes as Integer (Default = 11); #numero de correntes de processo que necessitam trocar calor NUtilQuente as Integer(Default = 3); #Numero de utilidades quentes (vapor de alta, media e baixa) NUtilFria as Integer(Default = 1); #Numero de utilidades frias , agua de resfriamento U as heat_trans_coeff (Default = 0.69445); VARIABLES in Inlet(NCorrentes) as main_stream; out Outlet(NCorrentes) as main_stream; in Inlet_q(NUtilQuente) as water_stream; out Outlet_q(NUtilQuente) as water_stream; in Inlet_f(NUtilFria) as water_stream; out Outlet_f(NUtilFria) as water_stream; H(NCorrentes) as power; Tin(NCorrentes) as temperature; Tout(NCorrentes) as temperature; TPinch as temperature (Lower = 1e-6); delHUtilQuente(NUtilQuente) as enth_mass ; delHUtilFria(NUtilFria) as enth_mass; QH(NUtilQuente) as power (Brief = "Heat demand for each hot utility"); QC(NUtilFria) as power (Brief = "Heat demand for each cold utility"); QH_total as power; QC_total as power; DTmin as Real (Unit = 'K', Default = 10); heat_trans_corr(NCorrentes) as heat_trans_coeff ; heat_trans_hot(NUtilQuente) as heat_trans_coeff ; heat_trans_cold(NUtilFria) as heat_trans_coeff ; Area_HEN as positive (Unit = 'm^2'); N_Troca as positive; Area_HEN_med as positive (Unit = 'm^2'); EQUATIONS "Global molar balance (Fluid)" Inlet(1:NCorrentes).Fluid.F = Outlet(1:NCorrentes).Fluid.F; "Global molar balance (Solid)" Inlet(1:NCorrentes).Solid.F = Outlet(1:NCorrentes).Solid.F; "Composition of fluid phase" Inlet(1:NCorrentes).Fluid.z = Outlet(1:NCorrentes).Fluid.z; "Composition of solid phase" Inlet(1:NCorrentes).Solid.z = Outlet(1:NCorrentes).Solid.z; "Mechanical equilibrium 1" Inlet(1:NCorrentes).P = Outlet(1:NCorrentes).P; "Phase equilibrium 1" Inlet(1:NCorrentes).v = Outlet(1:NCorrentes).v; #"Outlet molar enthalpy" for i in 1:NCorrentes do if Outlet(i).v equal 1 then Outlet(i).Fluid.h = PP.VapourEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Fluid.z); else Outlet(i).Fluid.h = PP.LiquidEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Fluid.z); end Outlet(i).Solid.h = PPS.VapourEnthalpy(Outlet(i).T, Outlet(i).P, Outlet(i).Solid.z); end #"Pinch information streams" for i in 1:NCorrentes do H(i) = Inlet(i).Fluid.F * (Outlet(i).Fluid.h - Inlet(i).Fluid.h) + Inlet(i).Solid.F * (Outlet(i).Solid.h - Inlet(i).Solid.h); Tin(i) = Inlet(i).T; Tout(i) = Outlet(i).T; end "Global mass balance (Hot utilities)" Inlet_q(1:NUtilQuente).Fw = Outlet_q(1:NUtilQuente).Fw; "Mechanical equilibrium 1" Inlet_q(1:NUtilQuente).P = Outlet_q(1:NUtilQuente).P; "Liquid saturated" Outlet_q(1:NUtilQuente).v = 0; "Global mass balance (Cold utilities)" Inlet_f(1:NUtilFria).Fw = Outlet_f(1:NUtilFria).Fw; "Mechanical equilibrium 1" Inlet_f(1:NUtilFria).P = Outlet_f(1:NUtilFria).P; "Phase equilibrium 2" Inlet_f(1:NUtilFria).v = Outlet_f(1:NUtilFria).v; #"Entropy and enthalpy of condensed hot utilities" for i in 1:NUtilQuente do Outlet_q(i).T = propterm.Tsat(Outlet_q(i).P); [Outlet_q(i).S , Outlet_q(i).H] = propterm.propPTl(Inlet_q(i).P, propterm.Tsat(Inlet_q(i).P)); end #"Entropy and enthalpy of cold utilities" for i in 1:NUtilFria do [Outlet_f(i).S , Outlet_f(i).H] = propterm.propPTl(Outlet_f(i).P, Outlet_f(i).T); end "Required enthapy 1" delHUtilQuente = Outlet_q.H - Inlet_q.H; "Required enthapy 2" delHUtilFria = Outlet_f.H - Inlet_f.H; "Hot utilities demand" QH = -delHUtilQuente * Outlet_q.Fw; "Cold utilities demand" QC = delHUtilFria * Outlet_f.Fw; #"plug-in arguments" switch method case "U": [QH,QC,TPinch,QH_total,QC_total, Area_HEN,N_Troca] = Pinch.pinch_method_U(DTmin,Tin,Tout,H,Inlet_q.T,Inlet_f.T, Outlet_f.T, U); case "h": [QH,QC,TPinch,QH_total,QC_total, Area_HEN, N_Troca] = Pinch.pinch_method_h(DTmin,Tin,Tout,H,Inlet_q.T,Inlet_f.T, Outlet_f.T, heat_trans_corr, heat_trans_hot, heat_trans_cold); end "Mean HEN area" Area_HEN_med * N_Troca = Area_HEN; end Model TAC_HEN ATTRIBUTES Pallete = false; Brief = "HEN CAPEX"; Info = "== GENERAL == * Calculation of the annual energy demand of the pinch model == SPECIFY == * number of utilities(num_util); * Energy demand of Cold utility; * Energy demand of Hot utility; * area cost exponent. == SET == * Number of stream components(Ncomp/NcompS); * Annual fixed cost coefficient for heat exchangers; * Annual variable cost coefficient for heat exchangers; * Annualized cost of steam per energy unit(Cost_Hot_Util); * Annualized cost of steam per energy unit(Cost_Cold_Util); "; PARAMETERS a_annu as Real (Brief = "Annual fixed cost coefficient for heat exchangers", Unit = 'US$/yr'); b_annu as Real (Brief = "Annual variable cost coefficient for heat exchangers", Unit = 'US$/(m^1.56)/yr'); c_annu as Real (Brief = "area cost exponent"); Cost_Hot_Util as Real (Brief = "Annualized cost of steam per energy unit", Unit = 'US$/kW/yr'); Cost_Cold_Util as Real (Brief = "Annualized cost of steam per energy unit", Unit = 'US$/kW/yr'); VARIABLES Demand_Hot as power (Brief = "Energy demand of Hot utility"); Demand_Cold as power (Brief = "Energy demand of Cold utility"); Area_HEN as Real (Lower = 1e-6, Unit = 'm^2'); capex_HEN as Real (Brief= "Annualized installed Capital Cost of Exchanger", Unit = 'US$/yr'); Opex_Hot as Real (Brief= "Annualized operational expendure of hot utilities", Unit = 'US$/yr'); Opex_Cold as Real (Brief= "Annualized operational expendure of cold utilities", Unit = 'US$/yr'); opex_HEN as Real (Unit = 'US$/yr'); tac_HEN as Real (Brief= "Total Annualized Costs of HEN", Unit = 'US$/yr'); num_util as Integer; EQUATIONS "Installed Capital Cost of Exchanger" capex_HEN = num_util* (a_annu + b_annu * ((Area_HEN ^ 0.78)/num_util)); "Operational Expendures" Opex_Cold = Demand_Cold * Cost_Cold_Util; Opex_Hot = Demand_Hot * Cost_Hot_Util; opex_HEN = Opex_Hot + Opex_Cold ; " Total annualized Costs " tac_HEN = capex_HEN + opex_HEN; end FlowSheet Teste_PinchInt PARAMETERS PP as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" ); PPS as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" ); # o numCorrentes eh a soma das correntes de processo + correntes "do interpolador" Pinch as Plugin (Type = "Pinch", numCorrentes = 6, numUtilQuente = 3, numUtilFria = 1); NComp as Integer; NCompS as Integer; DEVICES #fonte de agua de resfriamento SS101 as water_sourceR; #fonte de vapor SS102 as water_sourceR; SS103 as water_sourceR; SS104 as water_sourceR; #fontes representando correntes de processo mS101 as main_sourceR; mS102 as main_sourceR; mS103 as main_sourceR; #Fonte representando correntes que entram ou saem do interpolador INT101 as heat_source_int; INT102 as heat_source_int; INT103 as heat_source_int; #modelo que faz a integracao energetica PinchPoint as PinchPointInt; CONNECTIONS SS101.Outlet to PinchPoint.Inlet_f(1); SS102.Outlet to PinchPoint.Inlet_q(1); SS103.Outlet to PinchPoint.Inlet_q(2); SS104.Outlet to PinchPoint.Inlet_q(3); mS101.Outlet to PinchPoint.Inlet(1); mS102.Outlet to PinchPoint.Inlet(2); mS103.Outlet to PinchPoint.Inlet(3); INT101.Outlet to PinchPoint.Inlet_Int(1); INT102.Outlet to PinchPoint.Inlet_Int(2); INT103.Outlet to PinchPoint.Inlet_Int(3); SET SS101.ValidPhases = "Liquid-Only"; SS102.ValidPhases = "Vapour-Liquid"; SS103.ValidPhases = "Vapour-Liquid"; SS104.ValidPhases = "Vapour-Liquid"; mS101.CompositionBasis = "Molar"; mS102.CompositionBasis = "Molar"; mS103.CompositionBasis = "Molar"; NComp = PP.NumberOfComponents(); NCompS = PPS.NumberOfComponents(); PinchPoint.NCorrentes = 3 ; #numero de correntes de processo que necessitam trocar calor PinchPoint.NCorrentesInt = 3; #numero de correntes que entram ou saem do interpolador PinchPoint.U = 0.69445 * 'kW/m^2/K';#coeficiente global de troca termica SPECIFY #temperatura minima de aproximacao PinchPoint.DTmin = 20 *'K'; #agua de resfriamento SS101.T = 303.15 * 'K'; SS101.P = 1 * 'bar'; PinchPoint.Outlet_f(1).T = 333.15 * 'K'; PinchPoint.heat_trans_cold(1) = 1.38 * 'kW/m^2/K'; #vapor de baixa SS102.P = 2.5 * 'bar'; SS102.v = 1; PinchPoint.heat_trans_hot(1) = 1.38 * 'kW/m^2/K' ; #vapor de media SS103.P = 6 * 'bar'; SS103.v = 1; PinchPoint.heat_trans_hot(2)= 1.38 * 'kW/m^2/K'; #vapor de alta SS104.P = 17.5 * 'bar'; SS104.v = 1; PinchPoint.heat_trans_hot(3) = 1.38 * 'kW/m^2/K'; #corrente de processo mS101.Fluid.Fw = 700 * 'kg/h'; mS101.Solid.Fw = 10 * 'kg/h'; mS101.T = 300 * 'K'; mS101.P= 1 * 'atm'; mS101.CompositionOfSolid(1) = 0.4; mS101.CompositionOfSolid(2) = 0.3; mS101.CompositionOfSolid(3) = 0.28; mS101.CompositionOfSolid(4) = 0.02; mS101.CompositionOfSolid(5:NCompS) = 0; mS101.CompositionOfFluid(1) = 0.9; mS101.CompositionOfFluid(2) = 0.08; mS101.CompositionOfFluid(3) = 0.02; mS101.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(1).T = 400 * 'K';#temperatura final da corrente PinchPoint.heat_trans_corr(1) = 1.38 * 'kW/m^2/K'; #corrente de processo mS102.Fluid.Fw = 200 * 'kg/h'; mS102.Solid.Fw = 20 * 'kg/h'; mS102.T = 350 * 'K'; mS102.P = 1 * 'atm'; mS102.CompositionOfSolid(1) = 0.4; mS102.CompositionOfSolid(2) = 0.3; mS102.CompositionOfSolid(3) = 0.28; mS102.CompositionOfSolid(4) = 0.02; mS102.CompositionOfSolid(5:NCompS) = 0; mS102.CompositionOfFluid(1) = 0.9; mS102.CompositionOfFluid(2) = 0.08; mS102.CompositionOfFluid(3) = 0.02; mS102.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(2).T = 450 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(2) = 1.38 * 'kW/m^2/K'; #corrente de processo mS103.Fluid.Fw = 500 * 'kg/h'; mS103.Solid.Fw = 50 * 'kg/h'; mS103.T = 500 * 'K'; mS103.P = 1 * 'atm'; mS103.CompositionOfSolid(1) = 0.4; mS103.CompositionOfSolid(2) = 0.3; mS103.CompositionOfSolid(3) = 0.28; mS103.CompositionOfSolid(4) = 0.02; mS103.CompositionOfSolid(5:NCompS) = 0; mS103.CompositionOfFluid(1) = 0.9; mS103.CompositionOfFluid(2) = 0.08; mS103.CompositionOfFluid(3) = 0.02; mS103.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(3).T = 350 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(3) = 1.38 * 'kW/m^2/K'; #correntes que entram ou saem do interpolador. Apenas informacoes de energia (Q e T) INT101.Outlet.T = 385.0 * 'K'; INT102.Outlet.T = 381.5 * 'K'; INT103.Outlet.T = 358.5 * 'K'; INT101.Outlet.Q = 9484.7 * 'kW'; INT102.Outlet.Q = 2280.4 * 'kW'; INT103.Outlet.Q = -1601.0 * 'kW'; PinchPoint.heat_trans_corr(4) = 1.38 * 'kW/m^2/K'; PinchPoint.heat_trans_corr(5) = 1.38 * 'kW/m^2/K'; PinchPoint.heat_trans_corr(6) = 1.38 * 'kW/m^2/K'; OPTIONS Dynamic = false; end FlowSheet Teste_PinchN PARAMETERS PP as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" ); PPS as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" ); # o numCorrentes eh a soma das correntes de processo + correntes "do interpolador" Pinch as Plugin (Type = "Pinch", numCorrentes = 3, numUtilQuente = 3, numUtilFria = 1); NComp as Integer; NCompS as Integer; DEVICES #fonte de agua de resfriamento SS101 as water_sourceR; #fonte de vapor SS102 as water_sourceR; SS103 as water_sourceR; SS104 as water_sourceR; #fontes representando correntes de processo mS101 as main_sourceR; mS102 as main_sourceR; mS103 as main_sourceR; #modelo que faz a integracao energetica PinchPoint as PinchPointN; CONNECTIONS SS101.Outlet to PinchPoint.Inlet_f(1); SS102.Outlet to PinchPoint.Inlet_q(1); SS103.Outlet to PinchPoint.Inlet_q(2); SS104.Outlet to PinchPoint.Inlet_q(3); mS101.Outlet to PinchPoint.Inlet(1); mS102.Outlet to PinchPoint.Inlet(2); mS103.Outlet to PinchPoint.Inlet(3); SET SS101.ValidPhases = "Liquid-Only"; SS102.ValidPhases = "Vapour-Liquid"; SS103.ValidPhases = "Vapour-Liquid"; SS104.ValidPhases = "Vapour-Liquid"; mS101.CompositionBasis = "Molar"; mS102.CompositionBasis = "Molar"; mS103.CompositionBasis = "Molar"; NComp = PP.NumberOfComponents(); NCompS = PPS.NumberOfComponents(); PinchPoint.NCorrentes = 3 ; #numero de correntes de processo que necessitam trocar calor PinchPoint.U = 0.69445 * 'kW/m^2/K';#coeficiente global de troca termica SPECIFY #temperatura minima de aproximacao PinchPoint.DTmin = 20 *'K'; #agua de resfriamento SS101.T = 303.15 * 'K'; SS101.P = 1 * 'bar'; PinchPoint.Outlet_f(1).T = 333.15 * 'K'; PinchPoint.heat_trans_cold(1) = 1.38 * 'kW/m^2/K'; #vapor de baixa SS102.P = 2.5 * 'bar'; SS102.v = 1; PinchPoint.heat_trans_hot(1) = 1.38 * 'kW/m^2/K' ; #vapor de media SS103.P = 6 * 'bar'; SS103.v = 1; PinchPoint.heat_trans_hot(2)= 1.38 * 'kW/m^2/K'; #vapor de alta SS104.P = 17.5 * 'bar'; SS104.v = 1; PinchPoint.heat_trans_hot(3) = 1.38 * 'kW/m^2/K'; #corrente de processo mS101.Fluid.Fw = 700 * 'kg/h'; mS101.Solid.Fw = 10 * 'kg/h'; mS101.T = 300 * 'K'; mS101.P= 1 * 'atm'; mS101.CompositionOfSolid(1) = 0.4; mS101.CompositionOfSolid(2) = 0.3; mS101.CompositionOfSolid(3) = 0.28; mS101.CompositionOfSolid(4) = 0.02; mS101.CompositionOfSolid(5:NCompS) = 0; mS101.CompositionOfFluid(1) = 0.9; mS101.CompositionOfFluid(2) = 0.08; mS101.CompositionOfFluid(3) = 0.02; mS101.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(1).T = 400 * 'K';#temperatura final da corrente PinchPoint.heat_trans_corr(1) = 1.38 * 'kW/m^2/K'; #corrente de processo mS102.Fluid.Fw = 200 * 'kg/h'; mS102.Solid.Fw = 20 * 'kg/h'; mS102.T = 350 * 'K'; mS102.P = 1 * 'atm'; mS102.CompositionOfSolid(1) = 0.4; mS102.CompositionOfSolid(2) = 0.3; mS102.CompositionOfSolid(3) = 0.28; mS102.CompositionOfSolid(4) = 0.02; mS102.CompositionOfSolid(5:NCompS) = 0; mS102.CompositionOfFluid(1) = 0.9; mS102.CompositionOfFluid(2) = 0.08; mS102.CompositionOfFluid(3) = 0.02; mS102.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(2).T = 450 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(2) = 1.38 * 'kW/m^2/K'; #corrente de processo mS103.Fluid.Fw = 500 * 'kg/h'; mS103.Solid.Fw = 50 * 'kg/h'; mS103.T = 500 * 'K'; mS103.P = 1 * 'atm'; mS103.CompositionOfSolid(1) = 0.4; mS103.CompositionOfSolid(2) = 0.3; mS103.CompositionOfSolid(3) = 0.28; mS103.CompositionOfSolid(4) = 0.02; mS103.CompositionOfSolid(5:NCompS) = 0; mS103.CompositionOfFluid(1) = 0.9; mS103.CompositionOfFluid(2) = 0.08; mS103.CompositionOfFluid(3) = 0.02; mS103.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(3).T = 350 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(3) = 1.38 * 'kW/m^2/K'; OPTIONS Dynamic = false; end FlowSheet Teste_Pinch_TAC PARAMETERS PP as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" ); PPS as Plugin (Brief = "External Physical Properties", Type="PP", Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" ); # o numCorrentes eh a soma das correntes de processo + correntes "do interpolador" Pinch as Plugin (Type = "Pinch", numCorrentes = 6, numUtilQuente = 3, numUtilFria = 1); NComp as Integer; NCompS as Integer; DEVICES #fonte de agua de resfriamento SS101 as water_sourceR; #fonte de vapor SS102 as water_sourceR; SS103 as water_sourceR; SS104 as water_sourceR; #fontes representando correntes de processo mS101 as main_sourceR; mS102 as main_sourceR; mS103 as main_sourceR; #Fonte representando correntes que entram ou saem do interpolador INT101 as heat_source_int; INT102 as heat_source_int; INT103 as heat_source_int; #modelo que faz a integracao energetica PinchPoint as PinchPointInt; #Analise economica TAC_HEN as TAC_HEN; CONNECTIONS SS101.Outlet to PinchPoint.Inlet_f(1); SS102.Outlet to PinchPoint.Inlet_q(1); SS103.Outlet to PinchPoint.Inlet_q(2); SS104.Outlet to PinchPoint.Inlet_q(3); mS101.Outlet to PinchPoint.Inlet(1); mS102.Outlet to PinchPoint.Inlet(2); mS103.Outlet to PinchPoint.Inlet(3); INT101.Outlet to PinchPoint.Inlet_Int(1); INT102.Outlet to PinchPoint.Inlet_Int(2); INT103.Outlet to PinchPoint.Inlet_Int(3); SET SS101.ValidPhases = "Liquid-Only"; SS102.ValidPhases = "Vapour-Liquid"; SS103.ValidPhases = "Vapour-Liquid"; SS104.ValidPhases = "Vapour-Liquid"; mS101.CompositionBasis = "Molar"; mS102.CompositionBasis = "Molar"; mS103.CompositionBasis = "Molar"; NComp = PP.NumberOfComponents(); NCompS = PPS.NumberOfComponents(); PinchPoint.NCorrentes = 3 ; #numero de correntes de processo que necessitam trocar calor PinchPoint.NCorrentesInt = 3; #numero de correntes que entram ou saem do interpolador PinchPoint.NUtilQuente = 3;#numero de Utilidades quentes PinchPoint.NUtilFria = 1; # Numero de utilidades frias PinchPoint.U = 0.69445 * 'kW/m^2/K';#coeficiente global de troca termica #Analise economica TAC_HEN.a_annu = 4897 * 'US$/yr'; TAC_HEN.b_annu = 33.0 * 'US$/(m^1.56)/yr'; TAC_HEN.c_annu = 0.78; TAC_HEN.Cost_Hot_Util = 96 * 'US$/kW/yr'; TAC_HEN.Cost_Cold_Util = 50 * 'US$/kW/yr'; SPECIFY PinchPoint.DTmin = 20 *'K'; #agua de resfriamento SS101.T = 303.15 * 'K'; SS101.P = 1 * 'bar'; PinchPoint.Outlet_f(1).T = 333.15 * 'K'; PinchPoint.heat_trans_cold(1) = 1.38 * 'kW/m^2/K'; #vapor de baixa SS102.P = 2.5 * 'bar'; SS102.v = 1; PinchPoint.heat_trans_hot(1) = 1.38 * 'kW/m^2/K' ; #vapor de media SS103.P = 6 * 'bar'; SS103.v = 1; PinchPoint.heat_trans_hot(2)= 1.38 * 'kW/m^2/K'; #vapor de alta SS104.P = 17.5 * 'bar'; SS104.v = 1; PinchPoint.heat_trans_hot(3) = 1.38 * 'kW/m^2/K'; #corrente de processo mS101.Fluid.Fw = 700 * 'kg/h'; mS101.Solid.Fw = 10 * 'kg/h'; mS101.T = 300 * 'K'; mS101.P= 1 * 'atm'; mS101.CompositionOfSolid(1) = 0.4; mS101.CompositionOfSolid(2) = 0.3; mS101.CompositionOfSolid(3) = 0.28; mS101.CompositionOfSolid(4) = 0.02; mS101.CompositionOfSolid(5:NCompS) = 0; mS101.CompositionOfFluid(1) = 0.9; mS101.CompositionOfFluid(2) = 0.08; mS101.CompositionOfFluid(3) = 0.02; mS101.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(1).T = 400 * 'K';#temperatura final da corrente PinchPoint.heat_trans_corr(1) = 1.38 * 'kW/m^2/K'; #corrente de processo mS102.Fluid.Fw = 200 * 'kg/h'; mS102.Solid.Fw = 20 * 'kg/h'; mS102.T = 350 * 'K'; mS102.P = 1 * 'atm'; mS102.CompositionOfSolid(1) = 0.4; mS102.CompositionOfSolid(2) = 0.3; mS102.CompositionOfSolid(3) = 0.28; mS102.CompositionOfSolid(4) = 0.02; mS102.CompositionOfSolid(5:NCompS) = 0; mS102.CompositionOfFluid(1) = 0.9; mS102.CompositionOfFluid(2) = 0.08; mS102.CompositionOfFluid(3) = 0.02; mS102.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(2).T = 450 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(2) = 1.38 * 'kW/m^2/K'; #corrente de processo mS103.Fluid.Fw = 500 * 'kg/h'; mS103.Solid.Fw = 50 * 'kg/h'; mS103.T = 500 * 'K'; mS103.P = 1 * 'atm'; mS103.CompositionOfSolid(1) = 0.4; mS103.CompositionOfSolid(2) = 0.3; mS103.CompositionOfSolid(3) = 0.28; mS103.CompositionOfSolid(4) = 0.02; mS103.CompositionOfSolid(5:NCompS) = 0; mS103.CompositionOfFluid(1) = 0.9; mS103.CompositionOfFluid(2) = 0.08; mS103.CompositionOfFluid(3) = 0.02; mS103.CompositionOfFluid(4:NComp) = 0; PinchPoint.Outlet(3).T = 350 * 'K'; #temperatura final da corrente PinchPoint.heat_trans_corr(3) = 1.38 * 'kW/m^2/K'; #correntes que entram ou saem do interpolador. Apenas informacoes de energia (Q e T) INT101.Outlet.T = 385.0 * 'K'; INT102.Outlet.T = 381.5 * 'K'; INT103.Outlet.T = 358.5 * 'K'; INT101.Outlet.Q = 9484.7 * 'kW'; INT102.Outlet.Q = 2280.4 * 'kW'; INT103.Outlet.Q = -1601.0 * 'kW'; PinchPoint.heat_trans_corr(4) = 1.38 * 'kW/m^2/K'; PinchPoint.heat_trans_corr(5) = 1.38 * 'kW/m^2/K'; PinchPoint.heat_trans_corr(6) = 1.38 * 'kW/m^2/K'; #Analise economica TAC_HEN.Area_HEN = PinchPoint.Area_HEN; TAC_HEN.Demand_Hot = 36000 * 'kW'; TAC_HEN.Demand_Cold = PinchPoint.QC_total; TAC_HEN.num_util = PinchPoint.N_Troca; OPTIONS Dynamic = false; end