using "heat_exchangers/Mheatex"; FlowSheet MHeater PARAMETERS PP as Plugin (File="vrpp"); NComp as Integer (Brief="Number Components"); DEVICES Mheater as Mheatex; streamcold1 as source; streamhot1 as source; streamhot2 as source; streamcold2 as source; CONNECTIONS streamcold1.Outlet to Mheater.Inlet.Cold(1); streamhot1.Outlet to Mheater.Inlet.Hot(1); streamhot2.Outlet to Mheater.Inlet.Hot(2); streamcold2.Outlet to Mheater.Inlet.Cold(2); SET PP.LiquidModel = "PR"; PP.VapourModel = "PR"; PP.Components = ["water","methanol","benzene", "toluene"]; NComp = PP.NumberOfComponents; Mheater.Nhot = 2; Mheater.Ncold = 2; SPECIFY #===================================================================== # Cold Streams #===================================================================== streamcold1.Outlet.F = 500 * "kmol/h"; streamcold1.Outlet.P = 1 * "atm"; streamcold1.Outlet.T = 278 * "K"; streamcold1.Outlet.z = [1,0,0,0]; streamcold2.Outlet.F = 50 * "kmol/h"; streamcold2.Outlet.P = 1 * "atm"; streamcold2.Outlet.T = 298 * "K"; streamcold2.Outlet.z = [1,0,0,0]; #===================================================================== # Hot Streams #===================================================================== streamhot1.Outlet.F = 100* "kmol/h"; streamhot1.Outlet.P = 1 * "atm"; streamhot1.Outlet.T = 330 * "K"; streamhot1.Outlet.z = [0,1,0,0]; streamhot2.Outlet.F = 100* "kmol/h"; streamhot2.Outlet.P = 1 * "atm"; streamhot2.Outlet.T = 340 * "K"; streamhot2.Outlet.z = [0,0,0.75,0.25]; #===================================================================== # Temperature Outlet #===================================================================== Mheater.Outlet.Hot(1).T = 308*"K"; Mheater.Outlet.Hot(2).T = 303*"K"; Mheater.Outlet.Cold(2).T = 299*"K"; #===================================================================== # Pressure Outlet #===================================================================== Mheater.Outlet.Hot(1).P = 1 * "atm"; Mheater.Outlet.Hot(2).P = 1 * "atm"; Mheater.Outlet.Cold(1).P = 1 * "atm"; Mheater.Outlet.Cold(2).P = 1 * "atm"; OPTIONS Dynamic = false; end