0% found this document useful (0 votes)
25 views

Can I use Fortran with Aspen HYSYS

Uploaded by

Alex Romero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Can I use Fortran with Aspen HYSYS

Uploaded by

Alex Romero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Can I use Fortran with Aspen HYSYS?

Products: Aspen HYSYS


Last Updated: 03-Nov-2020
Versions: V14.5, V14.3, V14.2, V14.0, V12.1, V12.0, V11.0, V10.0
Article ID: 000088409
Primary Subject: Programmability/Extensibility
Converted from "109640_Default.txt"

Applicable Version(s):
Applies to all Aspen HYSYS Versions

Problem Statement:
Can I use Fortran with Aspen HYSYS?

Solution:
Aspen HYSYS uses an object model for communicating with extensions. Whether or not it is possible to call
up Aspen HYSYS physical routines from a Fortran executable depends on the capabilities of the version of
Fortran used (Object Linking and Embedding (OLE) or Component Object Model (COM) compliant or not).

There are currently two methods available for incorporating Fortran routines with Aspen HYSYS:

1. Use Visual Basic (VB) as an intermediate layer which can call the Fortran code from Aspen HYSYS.
Enclosed is an example showing how to link HYSYS to Fortran code through a Unit Operation
Extension wrapper written in Visual Basic. The files in MAY17GS1.ZIP can be extracted in a directory
such as C:\HYSYS\SAMPLES\85 (for example) while the files in MAY17GS2.ZIP can be extracted in
a directory such as C:\HYSYS\SAMPLES\85\85fort (for example). In MAY17GS1.zip, there is a file,
readme.txt, which provides more details on the example.

Visual C++ (using MFC) also allows access to COM Automation objects, but it is much harder to achieve
and we have very little information or examples for it.

1. Some versions of Fortran accommodate Automation (OLE or COM compliant). Visual Fortran, for
example, provides a wizard to simplify the use of functionality available with COM and OLE. The
wizard generates Fortran 90 modules that simplify calling COM and Automation services from Fortran
programs, automatically generating Fortran source code that simplifies invoking routines in a Dynamic
Link Library (DLL), methods of an Automation object and member functions of a COM object. The
generated code includes derived-type data declarations for data structures, procedure interface block
definitions, and procedure definitions (external jacket routines) that simplify calling conventions.
Courses are available on Aspen HYSYS Automation and Extensibility regularly throughout the year, at
various locations. We can provide a current training schedule. If you require more information on these
courses, please email training.registration@aspentech.com and ask for a course schedule or course outlines.

Keywords:
Fortran, Visual, Basic, C++, programmability, extensibility, OLE, Object Linking and Embedding,
automation, Dynamic Link Library, DLL, Component Object Model, COM, routine, sub-routine, integrate,
integration, wizard, wrapper, wrapping, example.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy