AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Vba script for aspen hysys12/24/2022 If fileName "False" And simCase Is Nothing Then Set hyApp = CreateObject("HYSYS.Application")įileName = Worksheets("Sheet1").Range("c2") Public FEED1 As ProcessStream, FEED2 As ProcessStreamĭim PRESSFEED2 As Double, FLOWFEED2 As Double, TEMPFEED2 As Double MAKE SURE TO PUT CORRECT DIRECTORY ADDRESS OF HYSYS FILE IN CELL Set FEED2 = ("FEED2") PRESSFEED2 = Worksheets("Sheet1").Range("H7").Value PRESSFEED2, "PSIA" ' export pressure FLOWFEED2 = Worksheets("Sheet1").Range("H6").Value FLOWFEED2, "MMSCFD" ' export molar flowrate TEMPFEED2 = Worksheets("Sheet1").Range("H8").Value TEMPFEED2, "F" ' export temperature Set FEED1 = ("FEED1") Worksheets("Sheet1").Range("D6").Value = ("LB/HR") ' import data MASS FLOWRATE from hysys streams Worksheets("Sheet1").Range("D7").Value = ("PSIG") ' import data PRESSURE from hysys streams Worksheets("Sheet1").Range("D8").Value = ("C") ' import data TEMPERATURE from hysys streams Write down this code to export and import data from and to excel How to Import Data from Hysys Streams to Excel File? Public FEED1 As ProcessStream, FEED2 As ProcessStream Set FEED1 = ("FEED1") How to Export Data from Excel To Hysys Simulation? Put this code to make link to Hysys Streams PUT HSC FILE IN YOUR DIRECTORY, MAKE SURE YOU EDIT EDIT THE DIRECTORY ADDRESS, OR HYSYS FILE WILL NOT BE LOADED And the address is H:\BLOG\hysys\example1.hsc. Note: I put directory address of Hysys file (HSC file) in cell C2. ![]() ![]() ' LOADING HYSYS TUTORIAL FILE Set hyApp = CreateObject("HYSYS.Application") hyApp.Visible = True Set simCase = hyApp.ActiveDocument If simCase Is Nothing Then fileName = Worksheets("inputhysys").Range("c2") If fileName "False" And simCase Is Nothing Then Set simCase = GetObject(fileName, "HYSYS.SimulationCase") simCase.Visible = True End If End If Create new module in Macro VBA and put this code. Further investigation on this technology helps in providing a suitable replacement for the costly available reliquefaction systems and avoids the burning of BOG with its consequent high CO 2 emissions.Linking between Hysys Simulations and Excel using Macro VBA (Visual Basic Application). Results showed that low LNG evaporation and high BOG liquefaction pressures offer higher energy storage capacity for all types of thermal energy materials, with better performance for the latent ones. A preliminary energetic assessment for the system is carried out using Aspen HYSYS, Excel and VBA, to study the impact of the variation of the operating conditions on the choice of suitable storage material and its performance. The novel reliquefaction system utilizes latent or sensible heat storage materials that haven’t been examined before for cryogenic applications. The second is the discharging mode, in which the stored cold energy is used to condense the excess BOG at low navigation speed. The new proposed system operates on two modes the first is the charging mode in which cold energy is stored when the LNG is evaporated to supply the LNG carrier propulsion system at high speed. Existing technologies for on-board reliquefaction consume a large amount of energy and are costly, which arises the need for new concepts of reliquefaction technologies. The BOG is used normally as fuel for propulsion engines, but at low navigation speed, it is more than the engines’ fuel needs, and the excess quantity is either burnt or reliquefied. LNG is stored and transported in cryogenic storage tankers, where a part of the LNG evaporates, generating boil-off gas (BOG). Natural gas is mainly transported using pipelines or as liquefied natural gas (LNG). ![]() The increase in energy demand and the need for lower CO 2 emissions have increased the importance of natural gas as the cleanest fossil fuel in the energy market.
0 Comments
Read More
Leave a Reply. |