using "heat_exchangers/Mheatex"; FlowSheet Discreto_A DEVICES Mheater1 as Mheatex; Mheater2 as Mheatex; streamhot1 as stream_therm; streamhot2 as stream_therm; streamcold1 as stream_therm; streamcold2 as stream_therm; PARAMETERS PP as CalcObject (File="vrpp"); NComp as Integer (Brief="Number Components"); SET PP.LiquidModel = "PR"; PP.VapourModel = "PR"; PP.Components = ["water","methanol","benzene","toluene"]; NComp = PP.NumberOfComponents; Mheater1.Nhot = 2; Mheater2.Nhot = 2; Mheater1.Ncold = 2; Mheater2.Ncold = 2; Mheater1.HE.FlowDirection = "Cocurrent"; Mheater2.HE.FlowDirection = "Cocurrent"; CONNECTIONS streamcold1 to Mheater1.Inlet.Cold(1); streamhot1 to Mheater1.Inlet.Hot(1); streamhot2 to Mheater1.Inlet.Hot(2); streamcold2 to Mheater1.Inlet.Cold(2); Mheater1.Outlet.Cold(1) to Mheater2.Inlet.Cold(1); Mheater1.Outlet.Cold(2) to Mheater2.Inlet.Cold(2); Mheater1.Outlet.Hot(1) to Mheater2.Inlet.Hot(1); Mheater1.Outlet.Hot(2) to Mheater2.Inlet.Hot(2); SPECIFY #===================================================================== # Cold Streams #===================================================================== streamcold1.F = 500 * "kmol/h"; streamcold1.P = 1 * "atm"; streamcold1.T = 278 * "K"; streamcold1.v = 0; streamcold1.z = [1,0,0,0]; streamcold2.F = 50 * "kmol/h"; streamcold2.P = 1 * "atm"; streamcold2.T = 298 * "K"; streamcold2.v = 0; streamcold2.z = [1,0,0,0]; #===================================================================== # Hot Streams #===================================================================== streamhot1.F = 100* "kmol/h"; streamhot1.P = 1 * "atm"; streamhot1.T = 330 * "K"; streamhot1.v = 0; streamhot1.z = [0,1,0,0]; streamhot2.F = 100* "kmol/h"; streamhot2.P = 1 * "atm"; streamhot2.T = 340 * "K"; streamhot2.v = 0; streamhot2.z = [0,0,0.75,0.25]; #===================================================================== # Temperature Outlet #===================================================================== Mheater2.Outlet.Hot(1).T = 308*"K"; Mheater2.Outlet.Hot(2).T = 303*"K"; Mheater2.Outlet.Cold(2).T = 299*"K"; #===================================================================== # Pressure Outlet #===================================================================== Mheater2.Outlet.Hot(1).P = 1 * "atm"; Mheater2.Outlet.Hot(2).P = 1 * "atm"; Mheater2.Outlet.Cold(1).P = 1 * "atm"; Mheater2.Outlet.Cold(2).P = 1 * "atm"; OPTIONS mode = "steady"; relativeAccuracy = 1e-8; end