question
stringlengths
19
6.88k
answer
stringlengths
38
33.3k
Problem Statement: When you insert text in the flowsheet and click OK, Aspen HYSYS freezes and doesn't insert the text. The same happens when you have hidden objects in the flowsheet and right click to Reveal hidden objects. Also when you right click in the flowsheet to Add Workbook table.
Solution: There are two workarounds: 1. Close and reopen the Flowsheet Main tab after making the change or select another tab and go back to the Flowsheet Main tab. To reveal hidden objects, you will have to select each hidden object and close the flowsheet and open again to reveal. You will have to repeat with every hidden object. 2. Install the Aspen HYSYS (Process Modeling) V8.4 Cumulative Patch 1 - February 2014. Please refer to link below. Keywords: Insert Text, Reveal hidden objects, add workbook table References: None
Problem Statement: HYSYS v8.4 is unable to install on Windows Server 2008 R2. The installer is getting the prerequisite validation for Microsoft SQL Server Express validation check.
Solution: This knowledge base describes how to successfully install aspenONE Engineering V8.4 on Windows Server 2008 R2. First, you must have administrative privileges to install successfully. Install the Microsoft SQL Server Express 2012 SP1 from the DVD v8.4 \ 3rd Party Redistributables. Then, run the HYSYS V8.4 installation again. Keywords: MS SQL Server 2012, AES v8.4 installation, Prerequisite validation References: None
Problem Statement: In some cases, reaction rate varies along the extent of the reaction and those changes must be accounted for. This KB article provides an example file of how you can set your dynamic simulation to change the kinetic parameters at a certain condition during the run.
Solution: The only way you can change your Power Law kinetic parameters (i.e. Activation Energy (E), the Pre-Exponential Factor (k) and the Temperature Exponent (n)) during the run of a Dynamic simulation is using tasks. To do that, you must guarantee that your syntax is correct and that your task is compile error free. Attached you will find an example file with an active task called “Change_Kinetics” showing the correct syntax to change each one of the Power Law kinetic expression parameters for your reaction at a certain condition. In Aspen Plus Dynamics, you can set the kinetic parameters by right clicking the reactor and selecting Forms│Configure│Reactions│Edit reaction set│Kinetic Once you compile the task and run the simulation, a message will appear that it is being executed at the condition set and you will be able to see the changes in the parameters. Notes: - If the message showing that the task has run successfully does not show, then you could decrease the value of the Communication /Time Control under Run Options to enable the solver communicate the results over a smaller time step. The image below shows the Run Options configuration of the attached Aspen Dynamics V10 model. - You can find the syntax for other variables by creating a script through the variable finder in Tools│Variable Finder - All files attached were created in version V10 Keywords: Kinetic Parameters; Dynamics; Power Law; Task; Syntax; References: None
Problem Statement: When should I use the SLM Configuration Wizard (64 bit)?
Solution: The 64 bit version of the SLM Tools should be used when the application that you will be launching is a true 64 bit application. Since Aspen Basic Engineering is a 64 bit application you need the license file be located in Program Files\Common Files\Hyprotech\Shared not Program Files (x86)\Common Files\Hyprotech\Shared for Standalone license or Program Files\Common Files\Safenet Sentinel\Sentinel RMS License Manager\WinNT no tProgram Files(x86)\Common Files\Safenet Sentinel\Sentinel RMS License Manager\WinNT. Keywords: configuration wizard 64 bit References: None
Problem Statement: This knowledge base article documents what the SLM numerical error codes mean.
Solution: When running an AspenTech application, the application may generate a licensing (SLM) error and error code. Below is a full list of SLM error codes and their meaning. Error # Error Description: 1 Generic error when a license is denied by SLM server. 2 Application has not been given a name. 3 Unknown host (Application is given a server name but that server name doesn?t seem to exist) 4 No file giving license server name (Application cannot figure out the license server). 5 On the specified machine, license server is not RUNNING or it is not able to reach specified SLM server. 6 This feature is node locked but the request for a key came from a machine other than the host running the SentinelLM server. 7 LSrelease called when this copy of the application had not received a valid key from the SentinelLM server. 8 Failed to return the key ian>Failed to return the key issued to this copy of the application. 9 End of clients on calling VLSgetClientInfo. 10 End of features on calling VLSgetFeatureInfo. 11 General error by vendor in calling function etc. 12 Internal error in SentinelLM. 13 Irrecoverable Internal error in SentinelLM. 14 License server is not responding. Cause - network down, wrong port number, some other application on that port etc. 15 User/machine excluded. 16 Unknown shared ID. 17 No servers responded to client broadcast. 18 No such feature recognized by server. 19 Failed to add license. 20 Failed to delete license. 21 Last update was done locally. 22 Last update was done by the SentinelLM server. 23 The vendor identification of requesting application does not match with that of the application licensed by this system. 24 The server has licenses for the same feature, version from multiple vendors, and it is not clear from the requested operation which license the requestor is interested in. 25 An error has occurred in decrypting (or decoding) a network message. Probably an incompatible or unknown server, or a version mismatch. 26 The server has found evidence of tampering of the system clock, and it cannot service the request since the license for this feature has been set to be time tamper proof. 27 The specified operation is not permitted - authorization failed. 28 The domain of server is different from that of client. 29 The server does not know of this tag type. 30 A tag's type is invalid for the operation requested. 31 The server doesn't know this tag. 32 Attempt to update a tagged key. 33 Server does not support tags. 34 Log file name not found. 35 Log file name not changed. 36 Fingerprint Mismatch. 37 Trial License Usage Exhausted or Trial License Expired. 38 No Updates have been made so far. 39 Even though the client asked VLSreleaseExt API to return a specific number of units, it returned all the issued units. 40 The LS_HANDLE is a queued handle. 41 The LS_HANDLE is an active handle. 42 The status of LS_HANDLE is ambiguous. 43 Could not queue the client because the queue is full. 44 No client as specified, found with the server. 45 Client not authorized to make the specified request. 46 Distribution Criterion given is not correct. 47 Processing not done because current leader is not known. 48 Tried to add a server to pool which is already there. 49 Tried to delete a server who is not in pool currently. 50 File cannot be open. 51 Host name is not valid or cannot be resolved. 52 Different API version. Client server version mismatch. 53 A non-redundant server contacted for redundant server related information. 54 Message forwarded to leader. It is not an error. 55 Update fail. Server contact may have died or modified. 56 IP address given cannot be resolved. 57 Hostname given is unresolved. 58 Invalid IP address Format. 59 Server is synchronizing dist table. Not an Error. 60 Pool is already having max. no. of servers it can handle. 61 Pool will not exist if this only server is removed. 62 The feature is inactive on the requested server. 63 The token cannot be issued because of majority rule failure. 64 Error related to configuration file operation. 65 A non-redundant feature given for redundant feature related operation. 66 No Trial usage info. 67 Trial usage query failed. 68 ELAN License not enabled. 69 Not linked to integrated library. 70 Client commuter code does not exist. 71 Client already exists. 72 End of features. 73 Failed to get client commuter info. 74 SLM Client Commuter registry is corrupted. 75 SLM Client Commuter registry is corrupted. 76 Server is not allowed to issue commuter code for the requested feature and version. 77 Not enough key available to check out commuter code 78 Invalid lock Info provided by client. 79 Server has already check out one commuter code for this client. 80 No commuter code exit with this feature / version. 81 Client has already had commuter code with this feature version. 82 Server synchronization in progress. Please wait... 88 Terminal server services are active. Cannot run products with Standalone license on this system. KeyWords Error, SLM, Server, Full, License Keywords: None References: None
Problem Statement: The AspenOne installation requires that the ports 5093 and 5094 (TCP and UDP) are opened so that the installer can properly connect to the SLM server to check out licenses. This Knowledge Base article shows how to make sure the required TCP / UDP ports are open.
Solution: We had a situation where a customer claimed the ports 5093 and 5094 (TCP and UDP) were open but the software couldn't find the licenses from SLM. You may use the common 'telnet' command to determine if a specific TCP port is open but it's not suitable to test UDP ports. Use the free utility iPerf.exe with the following command line parameters to determine for sure if the required UDP ports are open and listening for connections. (FYI: 5094 is deprecated and not required for new versions) https://publishing.ucf.edu/sites/itr/cst/Pages/iperf.aspx Example: Testing if port 5093 UDP is open on SLM server 10.0.0.1 C:\>iperf -u -p 5093 -c 10.0.0.1 Keywords: None References: None
Problem Statement: Why is the SLM Commute Tool unable to commute a license from the license server? This problem arises when expired licenses are still being recognized as licenses on the client and/or server machines even though they are invalid. To fix this problem, the client machine and/or license server machine needs to be "cleaned? of the expired commuted licenses.
Solution: The following steps need to be performed on the client PC to obtain the appropriate information and then send to Technical Support so that "cleaning files" can be generated for the appropriate computer(s). The following information is required from the client machine: 1. Run the SLM Configuration Wizard to generate the system information. The location is (Start | All Programs | AspenTech | Common Utilities | SLM Configuration Wizard). 2. Click on the Config button. 3. On the Configuration window, click on the Copy to Clipboard button. 4. Paste the information into an e-mail to AspenTech System Team. The following Commuted License information to identified which license key(s) needs to be removed. Please follow the steps below to generate this information: 1. Go to a command prompt (Start | Run | type in: cmd). 2. Navigate to the folder: C:\Program Files\Common Files\Hyprotech\SLM Client Tools 3. Type in the following command: lsmon no-net > commuted.txt 4. Press the <Enter> key twice. 5. This will generate a file called "commuted.txt" in the SLM Client Tools folder. 6. Send the system information and commuted.txt files to Technical Support. 7. Please open an incident at support.aspentech.com or call 888-996-7100 opt (2, 1) Keywords: Commute, error, expired, cannot commute, commclean, comm clean References: None
Problem Statement: Dielectric constant is not listed as a property set. Is there a way to report the dielectric constant for pure components and mixtures?
Solution: Attached is an example file which demonstrates how to report the dielectric constant in the stream report. The subroutine UPDIPU is used to report the dielectric constant for a pure component (UP-2) and UPDIMX is used to report the dielectric constant for a mixture (UP-1). The pure component dielectric constant is calculated from the CPDIEC property parameters. The mixture dielectric constant is simply the mass average of the pure component dielectric constants. A compiled version of these subroutines (PROPS.DLL) is provided for customers who do not have a compiler. These properties are specified on the Properties | Customize | User Properties forms: and These properties can then be accessed in a Property Set as UP-1 and UP-2: Sample code for mixture: SUBROUTINE UPDIMX (T, P, FV, FL, BETA, 2 N, IDX, FLOW, Y, X, 3 X1, X2, Z, NBOPST, KDIAG, 4 KPDIAG, XPCTLV, IPHASE, NAME, PRPVAL, 5 SF, S, ISUBS, CAT, FLOWS, 6 NSUBS, IDXSUB, ITYPE) C C this subroutine will return the mass average dielectric constant C for the mixture C IMPLICIT NONE INTEGER N, NSUBS C #include "ppexec_user.cmn" EQUIVALENCE (RMISS, USER_RUMISS) EQUIVALENCE (IMISS, USER_IUMISS) #include "dms_plex.cmn" REAL*8 B(1) EQUIVALENCE (IB(1), B(1)) INTEGER IDX(N),NBOPST(6), NAME(2), ISUBS(4), + IDXSUB(NSUBS),ITYPE(NSUBS), KDIAG, + KPDIAG,IPHASE REAL*8 Y(N), X(N), X1(N), X2(N), Z(N), + PRPVAL(1), S(N), CAT(1),FLOWS(1), T, + P, FV, FL, BETA, FLOW, + XPCTLV,SF INTEGER IMISS, I REAL*8 RMISS, XYZ, DMWPUR, DMWMIX, DIEMIX, DIEPUR DOUBLE PRECISION ADIEC, BDIEC, CDIEC INTEGER LCPDIEC INTEGER LMW INTEGER DMS_IFCMNC PRPVAL(1) = RMISS C get offset to CPDIEC LCPDIEC = DMS_IFCMNC('CPDIEC') LMW = DMS_IFCMNC('MW') DIEMIX = 0D0 DMWMIX = 0D0 DO I=1,N IF ( IPHASE .EQ. 1 ) THEN XYZ = Y(I) ELSE IF ( IPHASE .EQ. 2 ) THEN XYZ = X(I) ELSE IF ( IPHASE .EQ. 4 ) THEN XYZ = X2(I) ELSE IF ( IPHASE .EQ. 5 ) THEN XYZ = Z(I) ELSE IF ( IPHASE .EQ. 6 ) THEN XYZ = X1(I) ENDIF DMWPUR= B(LMW + IDX(I)) ADIEC= B(LCPDIEC + 3*(IDX(I)-1) + 1) BDIEC= B(LCPDIEC + 3*(IDX(I)-1) + 2) CDIEC= B(LCPDIEC + 3*(IDX(I)-1) + 3) DIEPUR = ADIEC + BDIEC*(1D0/T - 1D0/CDIEC) DIEMIX = DIEMIX + XYZ * DMWPUR * DIEPUR DMWMIX = DMWMIX + XYZ * DMWPUR ENDDO DIEMIX = DIEMIX/DMWMIX PRPVAL(1) = DIEMIX 999 RETURN END Sample code for pure component dielectric constant: SUBROUTINE UPDIPU (T, P, FV, FL, BETA, 2 N, IDX, FLOW, Y, X, 3 X1, X2, Z, NBOPST, KDIAG, 4 KPDIAG, XPCTLV, IPHASE, NAME, PRPVAL, 5 SF, S, ISUBS, CAT, FLOWS, 6 NSUBS, IDXSUB, ITYPE) C C this subroutine will return the pure component dielectric constant C IMPLICIT NONE INTEGER N, NSUBS C #include "ppexec_user.cmn" EQUIVALENCE (RMISS, USER_RUMISS) EQUIVALENCE (IMISS, USER_IUMISS) #include "dms_plex.cmn" REAL*8 B(1) EQUIVALENCE (IB(1), B(1)) INTEGER IDX(N),NBOPST(6), NAME(2), ISUBS(4), + IDXSUB(NSUBS),ITYPE(NSUBS), KDIAG, + KPDIAG,IPHASE REAL*8 Y(N), X(N), X1(N), X2(N), Z(N), + PRPVAL(1), S(N), CAT(1),FLOWS(1), T, + P, FV, FL, BETA, FLOW, + XPCTLV,SF INTEGER IMISS, I REAL*8 RMISS, XYZ, DMWPUR, DMWMIX, DIEMIX, DIEPUR DOUBLE PRECISION ADIEC, BDIEC, CDIEC INTEGER LCPDIEC INTEGER LMW INTEGER DMS_IFCMNC C get offset to CPDIEC LCPDIEC = DMS_IFCMNC('CPDIEC') LMW = DMS_IFCMNC('MW') DIEMIX = 0D0 DMWMIX = 0D0 DO I=1,N ADIEC= B(LCPDIEC + 3*(IDX(I)-1) + 1) BDIEC= B(LCPDIEC + 3*(IDX(I)-1) + 2) CDIEC= B(LCPDIEC + 3*(IDX(I)-1) + 3) PRPVAL(I) = ADIEC + BDIEC*(1D0/T - 1D0/CDIEC) ENDDO 999 RETURN END Keywords: Dielectric constant, subroutine, stream References: None
Problem Statement: Is there any example file in MS Excel to read and write in VBA?
Solution: The attached MS Excel example file contains an example of how to read and write some data in VBA for a pump. The attributes in question are: pump’s capacity and pumping temperature. There are 7 different buttons to be used for the following purposes: Open Workspace: open the ABE workspace where the information will be reading/writing from/to. Choose Case: select the case to be used. Select Object: select the object to read/write data. Create Pump: create a new pump. Write: write data. Read: read data. Close Workspace: close the ABE workspace where the information will be reading/writing from/to. Keywords: VBA, Read and Write Data, Pump. References: None
Problem Statement: How do I disable the Aspen HYSYS start page when performing memory-intensive modeling?
Solution: When HYSYS V7.3 is opened, you will see the Start Page. Navigate to Tools on the menu bar and select Preferences. Navigate to the ?Start Page? tab in Preferences views. It is the last tab. Uncheck the ?Show Start Page? box. Exit and restart HYSYS. The attached power point explains how to disable the Start Page to maximize memory usage for models. Keywords: Start Page, Aspen Hysys, maximize memory usage References: None
Problem Statement: 'New guard page for the stack cannot be created' when starting Aspen HYSYS. How do you resolve this error?
Solution: This error is given when the computer that is executing Aspen HYSYS does not have .Net Framework 4.0 installed. For Aspen software versions V8.0, V8.1, V8.2, and V8.3 this a prerequisite and the use of .Net Framework 4.5 on the computer will cause this error to be given. Removal of .Net Framework 4.5 will be required before installing .Net Framework 4.0 which can be found on the media DVDs in folder 3rd Party Redistributables. Keywords: .Net Framework 4.0 3rd Party Redistributables References: None
Problem Statement: The Aspen HYSYS Separator contains the option to model heat loss in dynamics mode, but that feature is not available in steady state.Â
Solution: The attached unit operation is an user unit operation that performs heat loss calculations in a vessel. This extension was written in C# and the source code is attached as an example of a possible way to use C# HYSYS extensions. Use the file that corresponds to your version of Aspen HYSYS. Keywords: Heat loss, Vessel, CSharp, C Sharp, .Net, ExtensionObject, ExtnUnitOperation , Extension, Initialize, InteropServices, Aspentech.HYSYS.Interop References: None
Problem Statement: Does Aspen HYSYS calculate other components' freeze out condition other than CO2?
Solution: As of Aspen HYSYS V8.3, the "CO2 freeze out" utility has been generalized, so that it can calculate the freeze out condition for more components. The utility name is still CO2 freeze Out. The following components are available in the CO2 Freeze Out utility: Carbon Dioxide, Hydrogen Sulfide, Benzene, Toluene, Pentane, Hexane, Heptane, Octane, Nonane, Decane, n-Butane, and Cyclohexane. User can access the CO2 freeze out utility from the following places. 1. Home ribbon bar | Stream Analysis | CO2 Freeze out 2. Navigation pane. 3. Stream attachment | Analysis Then user will be able to select the component from the component drop-down list. The stream components which are available in the CO2 freeze out utility will be shown in the drop down list. Aspen HYSYS selects the phase to be used in the calculations and determines the component Freeze Temperature. It automatically selects the phase based on the phases that exist at the stream conditions. Alternately, you can specify the phase to be used in the Phase field. You can change the tolerance used in the calculation if needed; for example, to overcome convergence problems. However, the default tolerance of 1e-9 should be sufficient for most applications. Keywords: Freeze out References: None
Problem Statement: How do I turn off the Start-up and Exchange pages in Aspen HYSYS V8.3? There is no way of turning off start-up page and Exchange in the Options menu.
Solution: You will need administrator privileges in the local computer to make the changes. 1. Open the register key editor in windows menu or type Regedit in the run window 2. Go to the HKEY_CURRENT_USER\Software\AspenTech location and create a folder name “Aspen Hysys” 3. Create a subfolder “29.0” 4. Add two new key of the kind DWORD (32-bit) and name each "showexchangepageonstartup" and "showstartpageonstartup" 5. Double click in each key and place zero for turn off the option and one for enable If you had Aspen HYSYS open, you will need to restart for the changes to take effect. Keywords: Start-up, Exchange, HYSYS References: None
Problem Statement: How do I install Aspen Engineering Products v9 on a client machine without the Aspen Properties Enterprise Database (APED) to connect to a remote APED Server?
Solution: Many customer environments do not allow installing any databases on a local user machine. These customers will maintain a central SQL Server hosting all the databases. To host a Aspen Properties database on a SQL Server for v9, please follow Article 000044681 Configure the client machine to disable local APED and allow Remote APED: A registry entry needs to be created before installing any Aspen Products on the client machine to all remote Aspen Properties Database. Download attached Registry file and run it on the client machine. The following entries will get created in the registry. 64- Bit Machine: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AspenTech\APED\35.0] "ASPENDB"=dword:00000002 32-bit Machine: [HKEY_LOCAL_MACHINE\SOFTWARE\AspenTech\APED\35.0] "ASPENDB"=dword:00000002 Install Aspen Engineering Products on the client machine: Please follow Aspen Engineering V9.0 Quick Install Guide to install Engineering products on user machine. Configure the client machine to register a remote Aspen Properties Database: Please go to Article 000044682 for the configuration of the client SQL remote connection. Keywords: Centralize, Central, Aspen Properties Database, APED, Share, Remote Connection, Database, Register References: None
Problem Statement: How do you obtain the status of unit operation in Aspen HYSYS using VBA?
Solution: You can use the backdoor variable to obtain the status of a specific individual unit operation. The backdoor variable “Enum.1” gives the status with integer number and “Status.1” the string. The following code segments illustrate how the status can be extracted. Public Sub test() Set hyapp = CreateObject("HYSYS.Application.V10.0", "") hyapp.Visible = True Set hycase = hyapp.SimulationCases.Open("c:\Test\example.hsc") hycase.Activate Dim op As Separator Set op = hycase.Flowsheet.Operations.Item("InletSep") Dim bdsep As BackDoor Set bdsep = op Dim statvar As RealVariable Set statvar = bdsep.BackDoorVariable("Enum.1").Variable Dim status As Integer status = statvar.Value '0 => statusOK '1 => statusMissingOptionalInformation '2 => statusWarning '3 => statusMissingRequiredInformation '4 => statusError '5 => statusLastStatus Dim statstringvar As TextVariable Set statstringvar = bdsep.BackDoorVariable("Status.1").Variable Dim statstring As String statstring = statstringvar.Value End Sub Keywords: VBA, Unit operation status References: None
Problem Statement: When user add a new property in a stream result tab, user cannot find the property in Variable explorer. Let's say user added 'Higher Heating Value' for example, user may not find this value in Variable explorer.
Solution: There is a way to add the property in variable explorer, please see the followings. 1. Move to Simulation Environment > Property Sets 2. Please create new set which includes the properties you want to specify. (For this example, 'PS-1' set is created and 'Higher Heating Value(HHV-15)' is added. 2. Please go to Setup > Report Options > Stream and please find a 'Property Sets'. 3. Click 'Property Sets' and add the set we made in step 2. (For this example, it is 'PS-1') 4. Run the simulation. 5. Open variable explorer, Move to 'Specific stream name' \stream Results\Table\. Newly added property can be identified. Keywords: Variable explorer, VBA, Matlab, added property References: None
Problem Statement: Aspen Batch Modeler Simulation fails to initialize at total reflux. The pot geometry was set big enough to hold the initial charge.
Solution: The pot could hold all the liquid at the inlet temperature, but if you heat it up for total reflux, the liquid volume will increase and may exceed the pot volume before evaporation, which will cause a problem. To make sure this does not happen, you could use Aspen Properties and run a density analysis for the charged liquid at the operating temperature. There are several other things you need to check if Aspen Batch Modeler Simulation fails to initialize. Ensure that non-condensables are absent in the initial charge. Ensure that a realistic heat duty is specified. Also you may need to change valid phases from vapor-liquid to vapor-liquid-liquid if you have two liquid phases. Please refer to “Troubleshooting Convergence Problems” in the Help menu for more details. Keywords: Batch Modeler Initialization Pot volume Change of density References: None
Problem Statement: Is your APC application compliant with industrial cybersecurity standards? Can your APC application/Monitoring Application be viewed from level 4? if so, what is the methodology
Solution: Yes, APC applications can be monitored from level 4 via a cyber secure read-only access. AspenTech has developed a Centralized Monitoring APC application in which APC information including APC parameters and KPIs are broadcasted one-way from inside the firewall (level 3/3.5) to level 4 outside the firewall. See below of the typical architecture AspenTech Support is Compliance with Cyber security Policy, through 24X7 support. Customer can raise issues related to cyber security , with technical support 24X7 and get the issue addressed on time. Key words: APC, Cybersecurity Keywords: None References: None
Problem Statement: After an Aspen InfoPlus21 upgrade on a Subscriber system the Aspen Process Explorer Graphic fields are showing an old value or ***. When the graphic is refreshed it will show the correct current value but will revert back to an old value or ****.
Solution: If the Publisher system is replicating the IP_Value, IP_Value_Time, IP_Value_Quality fields then the *Map records on the Subscriber must be modified. The CurrentValue fields in AtMapDef records are typically set to the IP_Input fields that are not updating on the Subscriber. Therefore; the CurrentValue fields in the map records must be set to the IP_Value fields. IP_AnalogMap example; Map_CurrentValue IP_Value Map_CurrentTimeStamp IP_Value_Time Map_CurrentQuality IP_Value_Quality KeyWords: old past Keywords: None References: None
Problem Statement: How do I enable Case Runner in Platinum?
Solution: Whenever a Platinum flowsheet is generated from Aspen PIMS (Auto-generated), Case Runner is automatically configured. However if a flowsheet is imported to Platinum, this flowsheet has to be linked to the right PIMS model for Platinum to work correctly. The following example illustrates this procedure The Platinum_Sample Access file that comes with Platinum is not auto-generated; therefore this has to be linked to the right PIMS model. The steps follow: 1. From File, click on Edit Flowsheet, then click Next on this dialog 2. Double click on the flow sheet name Platinum_Sample Access. This will create a row under this name asking for Model connection 3. Click in the pencil icon, which results in the following dialog 4. Select the appropriate Aspen PIMS model (.pimx) file, in this case the Gulf Coast sample model 5. Now the link is established and you will be able to see the case runner icons for BUY, SELL, CAPS and PROCLIM Step three might result in the following dialog and it will not let users to link the model Steps to fix this problem a) Go to services and make sure the AspenTech PIMS Case Runner Service and AspenTech PIMS Case Runner Web Services are started b) Open AspenTech PIMS Case Runner Service and select "Local System account" radio button in the Log On tab c) Open and AspenTech PIMS Case Runner Web Service and select "This account" radio button in the Log On tab d) After making these changes you will be able to link the model as described from Step 4 and use Case Runner Keywords: Caserunner Caserunner not active Caserunner not working Enable caserunner Platinum References: None
Problem Statement: Application example of the Event Scheduler
Solution: The Event Scheduler performs a set of given tasks while a dynamic simulation is running. The tasks can be triggered by a predetermined simulation time, a logical expression, or a variable stabilizing to within a given range for a set amount of time. The Event Scheduler Manager contains all the Event Schedules. Each Schedule is comprised of Sequences, which in turn are made up of Events. An Event must have a Condition, which determines when the event will occur, and at least one action to be fully defined. The enclosed simulation case illustrates the implementation of the Event Scheduler. Figure 1 shows the sequence of activities comprising the Event Scheduler for this particular example. Open the enclosed simulation case, run it for a few minutes to ensure the model is stable, then start the Event Scheduler. Figure 1. Schedule of Events Keywords: Dynamics, Dynamics features References: None
Problem Statement: How do you model a simplified Bayer Process Digestion Circuit?
Solution: Example Files This example is delivered with Aspen Plus in the the Aspen Plus GUI directory in a sub-directory called app. Before running this application, you must copy the user-properties Fortran subroutine usrbay.f from the application directory to your working directory on the host machine. You must also compile this subroutine on the working directory of your host machine. To compile the routine, enter the following command in the Aspen Plus Simulation Engine Window: aspcomp usrbay Process Overview Alumina (Al2O3) is the precursor to aluminum. Alumina is made primarily by digestion of gibbsite (Al[OH]3) from bauxite ore using the Bayer process. This example simulates the highly integrated digestion section,including preheat/flash trains and digestor. The objective is to examine how heat exchanger fouling affects plant performance. In this simplified representation of the Bayer digestion circuit,ground bauxite feed (Bauxite) is mixed with a slip stream of heated liquor (Slipliq) to produce a pumpable slurry. This slurry (Slurry) and additional hot strong liquor feed are then fed to a high pressure digestor (Digestor). In the digestor, caustic dissolves the gibbsite to produce sodium aluminate. The desired aluminate/caustic ratio is achieved by adjusting the bauxite feed rate for a given liquor flow rate. Live steam is injected into the digestor to control the digestor temperature. The hot slurry from the digestor is concentrated and depressured in a series of three flashes to remove water vapor. The water vapor heats the caustic liquor stream in a series of three preheat heat exchangers. The fourth and final heat exchanger uses steam to bring the hot liquor up to the target temperature before feeding to the digestor. The feed liquor to this simplified flowsheet is recycled (or spent) liquor from a later part of the Bayer process. Caustic must be added to this stream to bring it to the target caustic concentration. Model Approach This process has several target concentrations and temperatures which are achieved through the use of Aspen Plus design specifications. You can review the design specifications by selecting Flowsheeting Options then Design Spec from the Data pulldown menu. This flowsheet model includes these design specifications: CAUSTIC Manipulate caustic makeup to achieve desired caustic concentration DIGSTEAM Manipulate steam to digestor to achieve desired temperature FT1 Determine flash-1 temperature based on heat exchanger UA FT2 Determine flash-2 temperature based on heat exchanger UA FT3 Determine flash-3 temperature based on heat exchanger UA LIQSTEAM Determine steam required to heat hot liquor to desired temperature RATIO Set the aluminate/caustic ratio for the digestor product The flowsheet also contains these Calculator blocks: BAUXHUM Sets the moisture content of the Bauxite feed stream LIQSLM Sets the slip liquor flow rate to achieve the desired solids content for the Slurry stream SETPARAM Sets values for various flowsheet parameters. Some of these parameters are used by design specifications or calculator blocks. The SENSUA sensitivity study block also varies some of these parameters. See the SETPARAM calculator block for details. The flowsheet contains a sensitivity block SENSUA to show how the performance of the Bayer digestion circuit depends on the UA value of the first and largest heat exchanger. Use this study for making capital versus operating cost tradeoffs during plant design, and for evaluating when to clean the heat exchangers in a plant. Bayer-specific Stream Reports To get customized stream reports for this application copy the BAYER.TFF and H2O-ONLY.TFF Table Format Files from the application directory to your working directory. On the Format field of the stream summary form, select these Table format files to display stream results in the desired custom format. Select: To display: BAYER Custom stream report format for BAYER application H2O_ONLY Custom stream report for water only streams in BAYER application If you do not alter the stream format selection, all streams will be reported using the hydrometallurgy standard Table Format File HYDRO. KeyWords application, bauxite, alumina, liquor, gibbsite, bayer process, TFF, hydrometallurgy Keywords: None References: None
Problem Statement: One of the tasks almost every industry has to deal with is saturating a stream with water. This can, of course, be done manually on your Aspen HYSYS flowsheet by using a separator and adjusting the amount of water added to your stream until a very small amount of excess water is produced. Alternately, you can download and install one of our Sample Extensions, called Saturate presented in this solution.
Solution: The attached unit operation extension is an example which demonstrates how to saturate a process stream with water. Extension code has been modified to eliminate a consistency error. Saturate Extension consistency error: Extension file available in "Saturate Extension for HYSYS 2.4.1 to v2006.zip" will try to solve even if the feed stream has ?empty? for composition. After adding the extension to the flowsheet, connect the inlet and outlet streams, specify Feed stream Temperature and Pressure and the extension will start solving and write some values in the output, then once you have composition available and the extension will solve again and issue consistency errors sometimes. This has been changed in extension file "Saturate extension for HYSYS V2006.5 and up.zip", when there is no composition available for feed, it will not solve and solves when the composition of feed stream is available. Thus eliminates the consistency error Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords saturate extension Keywords: None References: None
Problem Statement: User Variable to Calculate Analytical and Numerical Joule-Thomson coefficients
Solution: In the attached HYSYS 2.2 case the stream has two user variables to calculate the Joule Thomson coefficient. The Joule Thomson Coefficient (Alpha) can be expressed in two forms Alpha = dT/dP at constant H [Termed as Numerical in this example] or Alpha = [T (dV/dT at constant P) - v]/Cp [Termed as Analytical in this example] ' This User Variable calculates Alpha using both methods Also attached is an huv file that will allow this user variable to be imported into any other case. (See Solution #109210 for details on how to import the huv file.) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords User Variable, Joule Thomson Keywords: None References: None
Problem Statement: Dynamic (& Steady State) Water and Hydrocarbon Dew Point User Variable
Solution: From HYSYS 3.1 onwards the Water and Hydrocarbon dew point temperatures are calculated as part of the core HYSYS code. See the Simulation Tools \ Correlation Manager \ Gas Properties Correlation section of the HYSYS User Guide pdf manual for more details. The Gasprops extension (Solution #110060) also calculates these values. In the attached HYSYS 2.4.1 case the mixer operation has a User Variable (Steady State and Dynamic) that calculates the water and hydrocarbon dew point temperatures at the mixer product stream pressure. The dew point temperature is the temperature at a given pressure at which liquid starts to form. Water and Hydrocarbon dew points indicate the type of liquid formed. The dew point calculations use the following method. Initially a flash is performed to find the temperature at which the vapour fraction is 1.0, at the stream pressure (i.e. when the vapour is saturated). If the case does not contain water this is reported as the hydrocarbon dew point. If the case does contain water the type of liquid phase formed is determined, and the value reported appropriately. The temperature is then decreased until a second liquid phase forms, the temperature at which this occurs is reported as the other dew point. To see this user variable working in Steady State Mode: ? Force the mixer to recalculate (e.g. by ignoring and un-ignoring it or by changing the conditions in the feed stream) ? Go to the Design ... User Variables page of the mixer (Ensure the green tick button is pressed) To see this in operation in Dynamics: ? Switch to Dynamics mode ? Start the Integrator ? Go to the Design ... User Variables page of the mixer (Ensure the green tick button is pressed) The water and hydrocarbon dew point temperatures calculated by the "Dew Point Calculations" user variable, and the results are written to the "Water Dew Point T" and HC Dew Point T" user variables respectively. In steady state the user variable is only calculated when the mixer solves, in dynamics the code runs every time the mixer performs a composition step, by default the Execution Rate settings (Options page on Simulation ... Integrator menu option) mean this is once every 10 time steps. The user variable is attached to a mixer since stream user variables do not run in dynamics mode, whereas operation user variables do. Similar code could be attached to any other operation, or if necessary a dummy mixer could be added to a case. Also attached is an huv file that will allow this user variable to be imported into any other case. See Solution #109210 for details on how to import the huv file. Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Dynamic User Variable, Dew Point, Water, Hydrocarbon, DynCompositionPreStep, PostExecute Keywords: None References: None
Problem Statement: How do you determine the solubility of a gas in a liquid mixture?
Solution: Often you need to determine the solubility of a gas such as Nitrogen (N2) in a liquid mixture at a certain temperature and pressure. This can be easily accomplished using a FLASH2 block and a Design-Spec in Aspen Plus. The steps to build the simulation are... 1. Build a flowsheet with a FLASH2 block, two feeds (one for the gas feed and one for the liquid mixture feed) and a vapor and liquid exit the FLASH2 block. 2. Enter the appropriate components for the gas and liquid mixture. 3. Select an appropriate property method that can accurately predict solubility of gases in liquids such as RK-SOAVE or a property method using HENRY-COMPS. Make sure that component data to support the property method used for solubility calculations is available. 4. Enter the stream compositions with the gas component only in the gas feed stream and the liquid components in the liquid feed stream with an arbitrary flow rate, temperature and pressure. 5. Enter the two inputs of the FLASH2 block as VFRAC=0 and Temperature at the desired temperature of gas solubility. A specification of VFRAC=0 is required to prevent any of the liquid components from flashing and changing the liquid composition. 6. Enter a Design-Spec that varies the flow rate of the gas feed to achieve a calculated pressure of the FLASH2 equal to the desired solubility pressure. 7. The gas solubility will be the resulting mass-fraction (or mole-fraction) of the gas in the liquid stream from the FLASH2 block. Note: In the above example, the vapor fraction of the FLASH2 block was set instead of pressure as the second specification. With PRES as the Design-Spec Spec, the convergence of the Design-Spec is more robust. With VFRAC as the Spec, there are many vapor flows that will yield a vapor fraction of 0, which will result in a problem with Design-Spec convergence. A BKP file of an example of this approach is included for N2 in a liquid mixture of pentane, hexane and heptane. Keywords: gas solubility References: None
Problem Statement: Binary/Ternary Plot Unit Operation Extension
Solution: Generates binary plots (XY, Txy, Pxy) and ternary plots (VLE, LLE) using the 2-D plotting capability in HYSYS This contains an option to export data to a text file. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords binary plot; ternary plot Keywords: None References: None
Problem Statement: Atom Balance User Variable
Solution: Attached is a case that uses User Variables to keep track of the number of each type of atom in each stream (moles 'C' per mole, etc). The streams in this case have one "Code Only" user var ("AtomCounter") that does the work. The counts for each element are put into "Real" user vars which are created by AtomCounter. You can edit the "Element" array (and nElements) if you want to add/remove different elements. This example is provided as a proof of concept, and has not been designed to work for hypos. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords atom balance user variable Keywords: None References: None
Problem Statement: Is there a way to model a condenser using a Heater or HeatX block connected to a RadFrac block using a Heat Stream? When I try to do this, the duty has the wrong sign.
Solution: The problem with using a Heat Stream connected to the RadFrac block is that the Heat Stream is calculated to balance the condensing duty. For example, if RadFrac needs -10 MMBTU/hr of cooling duty, the Heat Stream would have a positive value of 10 MMBTU/Hr. If you connect the Heat Stream directly to the Heater block that represents the condenser, this Heater block will actually heat the process fluid. The work around is to either use a Transfer block to transfer the heat from RadFrac block to the Heater block, or if you prefer to use a Heat Stream (it might prevent some convergence issues in large flowsheets), run the Heat Stream through a Heat (Q) Multiplier (Mult) block and set the factor in the multiplier to -1. Be sure to select a heat Mult block by clicking the down arrow to the right of the the Mult block icon in the model library: Please see the attached example. Keywords: heat stream, mult block, multiplier, external condenser, radfrac References: None
Problem Statement: How do I generate Steam Properties using automation?
Solution: The attached Excel spreadsheet example illustrates how HYSYS can be used as a calculation engine to calculate physical properties of water/steam. To use the example, load the spreadsheet and press the Steam Properties button. You are then required to specify steam conditions. Once all of the information has been provided click the Calculate button and HYSYS will start in the background and use the NBS Steam property package to calculate the properties. The enthalpy calculation uses the same reference basis as used by HYSYS - For details on what enthalpy reference basis is used in HYSYS see Knowledge base Solution #108907. The spreadsheet includes a HYSYS 3.0 Type Library reference - For troubleshooting advice on common HYSYS / OLE Automation errors see Knowledge base Solution #112361. Note If HYSYS is already open, then this Excel file will close HYSYS after calculations are complete. Therefore, save the open HYSYS files before running this Excel file, otherwise changes in the opened HYSYS file will be lost. The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. Keywords: Automation, Steam Properties References: None
Problem Statement: Flowsheet user variable to ignore/unignore all the utilities in a case.
Solution: The enclosed HYSYS case (saved in version 2.2 but also readable in any subsequent version) features a flowsheet user variable that allows all the utilities in the case to be quickly ignored / unignored. To use the user variable go to the Flowsheet User Variables window (Flowsheet menu/Flowsheet User Variables). Ensure the green arrow is checked and type 1 to ignore all the utilities in the case, or 0 to unignore them. This could be useful since in a large case with many recycles, ignoring all the utilities before making changes can speed up the solution time considerably. Also attached is a huv file that will allow this user variable to be imported into any other case. (See Techtip #109210 for details on how to import the huv file) Since not all the utilities in a case are available via the HYSYS object library, this user variable uses a "Backdoor" method to access the utilities. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Ignore/unignore Utility Utilities Keywords: None References: None
Problem Statement: How may I get a 3-Phase Distillation Column running in Dynamics?
Solution: See attached. Keywords: 3-Phase, Distillation, Column, Dynamics. References: None
Problem Statement: How may I model a Liquid-Liquid Amine Absorber?
Solution: See attached. Keywords: Liquid-Liquid, Amine, Absorber, Example, Model References: None
Problem Statement: Generic Unit Operation Extension template
Solution: The attached file contains a generic template from which to create unit operation extensions. This example demonstrates how to set the outlet stream temperature and pressure. Note This Automation application has been created by AspenTech as an example of what can be achieved through the object architecture of HYSYS. This application is provided for academic purposes only and as such is not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading and using, agree to assume all risk related to the use of this example. We invite any feedback through the normal support channel at [email protected] KeyWords Unit Operation Extension Keywords: None References: None
Problem Statement: How can I use a User Variable to display density in API Gravity units?
Solution: In the attached HYSYS 3.0.1 case there are two stream user variables that calculate the API Gravity of a stream; one at the stream conditions and one at standard liquid conditions (i.e. equivalent to the Aspen HYSYS 'Mass Density' and 'Liq. Mass Density (Std Cond)' properties. They use the same conversion formula as the Aspen HYSYS Mass Density unit 'API' [i.e. API Gravity = 141.5 * 998 / (Mass Density in kg/m3) - 131.5] The advantage of using a user variable rather than simply changing the mass density or standard density units (Variables tab in the preferences window) is that mass densities in non-API units can be viewed at the same time. Also attached is an huv file that will allow these user variables to be imported into any other case. (See Solution #109210 for details on how to import the huv file.) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords User Variable, API Gravity Keywords: None References: None
Problem Statement: Is it possible to easily calculate water content for a stream in lb of water per MMSCF?
Solution: The attached macro language editor example calculates the water content in a stream in lb of water per MMSCF. The Macro Language Editor is an interactive design environment for developing and executing macros written using WinWrap Basic, a syntax similar to Microsoft Visual Basic. For instructions on how to run an MLE macro refer to the Readme files included with this example. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. Keywords: stream, water, content References: None
Problem Statement: MPC used to control separator T & P
Solution: Attached is an example of the MPC controller. The process has a separator unit operation in which it is desired to control both the vessel temperature and vessel pressure by manipulating the heat input (Q-100) and the vapour flow through valve VLV-101. Setting up the problem: Since model predictive control (MPC) implemented in HYSYS is strictly based on a model of the process the first step in setting up the problem is to determine how many inputs and outputs there are in the control problem. In most problems the number of inputs will be equal to the number of outputs, i.e., a square system. You can also do non-square systems, however, always try and make the control problem as simple as possible. Once you have made a decision on the number of inputs and outputs some basic modelling is required. In this case a step response model can be used to represent the models between the inputs and the outputs. Since we have a 2x2 multi-variable process, there will be four process models to be determined. These model are based on percent changes in input PVs and percent changes in the corresponding OPs. In the example supplied the models are as follows: G11 = [-0.6132, 1.5, 0] Kp, Tau, Delay G21 = [-0185, 5.0, 0] Kp, Tau, Delay G12 = [0.267, 3.33, 0] Kp, Tau, Delay G22 = [0.9259, 5.6, 0] Kp, Tau, Delay To enter the models go to the Process Model tab. If the Model Step Response matrix has only zeros, press the "Update Step Response" button. Once the data is displayed on the models page you will not have to hit the update response button unless you change the model. Next turn to the MPC Setup tab. Here is where the main parameters for the controller are entered - typically this tab would be configured before moving to the Process Models tab. If you go to the Advanced page on the MPC Setup tab you will see a number of options in addition to the control interval and number of inputs and outputs. Among these are: Step response length: This is the length of the step response that will be used in the controller calculation. The default is 50 and the maximum is 100. Prediction horizon: This value determines how far into the future the predictions are made when calculating the controller output. It is bounded by the length of the step response. Control horizon: This value represents the number of controller moves into the future that will be made to achieve the final setpoint. Small numbers generally mean a less aggressive controller. In practice this number is chosen to be less than 5. The value is bounded by the prediction horizon. Gamm_U and Gamma_Y: These are weighting functions associated with the optimization problem that is solve to produce the controller output every control interval. Keywords: : References: Trajectory: On setpoint changes this value represents the time constant of a filter that acts on the setpoint, i.e., a filtered setpoint can be used for the control. When the value is small the controller essentially sees a pure step as the setpoint is changed. Notes: When the controller is in the Off mode you must go to manual before going to the automatic mode. When the controller is switched from manual to automatic a major part of the MPC calculations are done. As such, for very large problems you may see a small delay when the controller is switched from manual to automatic.
Problem Statement: Gibbs Reactor
Solution: Attached is a simple case with a sample Gibbs reactor. In this case, an equimolar feed of C1, C2, C3, and i-C4 at 500 C and 1200 kPa is fed to a Gibbs reactor. A duty stream is connected to the reactor, with duty flow specified as zero. If you wish to fix the outlet temperature and have the duty calculated, delete the Heat Flow value in the energy stream and enter a temperature in one of the product streams. On the Reactions tab, Details ply, select the Atom Matrix radio button to view the atomic makeup of each component. If you have included hypothetical components in your fluid package, you may be required to fill in this information. On the Reactions tab, Details ply, select the Flow Specs radio button to allow the specification of product component flow rates. The Gibbs reactor will attempt to observe your given specification, and solve the rest of the outlet conditions to satisfy the criteria of minimizing Gibbs energy. If the Gibbs reactor is unable to solve (one case being where you supply conflicting or impossible target specs), it will solve as a separator. Keywords: Gibbs reactor References: None
Problem Statement: Virtual Stream Extension Unit Operation version 1.1.3
Solution: This example HYSYS unit operation extension allows the user to transfer information from one stream to another creating a "Live Link" between them. It removes the need to use a Balance operation in conjunction with SET operations. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Virtual Stream Extension Keywords: None References: None
Problem Statement: Stream User Variable that retrieves User Property values, and could be used to implement a custom mixing rule.
Solution: The stream user variable in the attached HYSYS 2.2 case accesses the User Property data in the basis and illustrates how this can be combined to duplicate the mixing rules already present within HYSYS. This could easily be extended to implement a custom mixing rule. Also attached is an huv file that will allow this user variable to be imported into any other case. (See Solution #109210 for details on how to import the huv file.) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Stream User Variable, User Property, Mixing Rule Keywords: None References: None
Problem Statement: Vinyl Acetate reaction and side reaction, extension kinetic reaction examples
Solution: These example extensions illustrate how reaction unit operation extensions can be created. The Vinyl Acetate example is taken from the HYSYS Customisation Guide manual. (Section 3.8.3 in the HYSYS 2004 Documentation). Also attached is a HYSYS 2.2 example case where the extensions have been setup and linked to a separator vessel. Note This Automation application has been created by AspenTech as an example of what can be achieved through the object architecture of HYSYS. This application is provided for academic purposes only and as such is not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading and using, agree to assume all risk related to the use of this example. We invite any feedback through the normal support channel at [email protected] KeyWords vinyl acetate reaction extension, vinyl acetate side reaction, extension kinetic reaction Keywords: None References: None
Problem Statement: How do I model entrainment in a separator?
Solution: Treatment plants that receive oil & gas through a two-phase pipeline face the problem of slugs of liquid coming through the pipeline. Slug-catchers are installed to avoid flooding the downstream equipment. One of the problems that may occur is massive entrainment of liquid with the gas phase. The control scheme and surge volumes of the plant must take this entrainment into account to avoid problems. The HYSYS separator currently doesn't have a built in entrainment, so the simulation uses another way to emulate this entrainment. (NOTE: An entrainment option is available starting with HYSYS v3.1.) Keywords: Example; Entrainment; Separator References: None
Problem Statement: In this example, a warm vapor stream containing steam, air and other components is fed into a tower and is "quenched" with a cooler stream containing water, acrylic acid and smaller amounts of other components. The reflux is this example comes from the bottom of the tower. The bottoms product stream is split in a tee and a portion is cooled, the return to the tower as the top stage feed stream. The vapor product from the tower is primarily a mixture of N2 and water vapor, and the bottoms product is a mixture of water and acrylic acid, with smaller amounts of other components.
Solution: Quench Tower case, saved in 3797 (HYSYS 2.2). Keywords: Quench Tower, acrylic acid References: None
Problem Statement: </u></b> Mach number for a number of pipe sizes <b><u>
Solution: </u></b> This Macro Language Editor example calculates and displays the Mach number for a user-selected stream for a number of pipe sizes. The Macro Language Editor is an interactive design environment for developing and executing macros written using WinWrap Basic, a syntax similar to Microsoft Visual Basic. For instructions on how to run an example macro refer to the Readme files included with this example. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. <b><u>KeyWords</u></b> Mach Number, Pipe Mach number Keywords: None References: None
Problem Statement: Is there a KB example to change the class of heat exchanger after it has been created?
Solution: You can use attached KB to change the class of heat exchanger after it has been created. To use this KB: -Save it under KBs folder and compile it using Rules editor - Add this KB under KBScripts in your configuration file. - Reload the workspace. - You can run this method from Aspen Basic Engineering Explorer by highlighting the heat exchanger of interest. Pick "Run=>local method" and run "ChangeHTEquipmentClass" method. Keywords: References: None
Problem Statement: Is it possible to model the incineration of polymer carpet fibers?
Solution: Users can model the incineration of polymer carpet fibers made from polypropylene (PP), nylon (NYLON6) or polyvinylchloride (PVC) using Aspen Polymers. Carpets cannot be chemically recycled. Instead, they are usually burned to recover heat - the heating value of polymers is nearly as good as the oil from which they were made. The attached example (created in Aspen Plus V7.1) is designed to give a good mass and energy balance for an incinerator fired by ground carpet fiber. It ignores the co-firing fuel (likely natural gas is used to start up the unit) but this could be added to extend the model. For simplicity, the polymers are treated as "oligomers" in the model, and the properties are calculated using the POLYNRTL property method. This keeps the model simple - users only need to enter the mass fraction of each type of polymer in the feed to model their own process. This example includes PVC, PP, NYLON6 but it could be extended to include PET or other common carpet materials. This model ignores the limestone, titanium dioxide, and other stabilizers in the product. Hypothetically these could be added but it is more difficult to fully define property parameters defined for these components. The model uses the RGIBBS reactor model (which uses Gibbs energy minimization to determine component concentrations) to model the combustion. This model can predict the NOx formation, HCl formation, and air requirements for the combustion. The hot gas stream from the furnace could be used to generate steam. For the RGIBBS to do an atom balance in the energy minimization calculation, it is necessary to enter the atomic composition (C,H,O,N,Cl) for each type of polymer on the Properties | Molecular Structure | Formula sheet for these components. Keywords: None References: None
Problem Statement: How in HYSYS dynamics can you create flow integrators, counters or other applications that require knowing information from a previous time step (or time steps)?
Solution: Since in HYSYS dynamics all operations and streams are calculated simultaneously once per time step a loop can be created between two spreadsheet which will allow pevious time step data to be used. The trick is to export the desired variable from the first spreadsheet to the second, use the imported variable in a simple equation (i.e. =A1) then export the result from the second spreadsheet back to the first spreadsheet. The variable going back to the first spreadsheet will be the previous time step data. There are three simple simulations attached each showing a different application. KeyWords flow integrators counters dynamics spreadsheet time step Keywords: None References: None
Problem Statement: User Variable to change flowsheet Topology based on pump on/off status
Solution: In the attached Aspen HYSYS 3.0.1 case there is a user variable attached to the pumps that disconnects the pump product stream from the mixer specified in the uservariable "MixerName" based on the pump's on/off status. To see this working toggle either of the pumps on and off and watch the product stream connecting and disconnecting from "Mix-100". If the "MixerName" parameter user variable does not exist then it is automatically created, Also attached is an huv file that will allow this user variable to be imported into any other case. (See Solution #109210 for details on how to import the huv file.) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords User Variable, Pump, Topology Keywords: None References: None
Problem Statement: How to model a Hydrogen Plant - Steam Reforming?
Solution: Introduction Hydrogen production is an important part of a modern refinery. Hydro desulfurisation and Hydrocracking are major Hydrogen consumers. Disturbances in the Hydrogen production plant affect the whole refinery. A shutdown of the hydrogen plant will force the shutdown of most of the refinery. A Hydrogen plant is fairly complex with a lot of heat integration that affects the controllability of the plant. The hart of the plant is a steam-reforming furnace that presents challenges in terms of control and modeling. To study improved control schemes or multivariable control schemes, one needs a dynamic model of the plant. In the past, simplified models based upon plant step test have been used for this. Companies have also built custom made simulation programs to model this type of plant. HYSYS.Plant can be used to create such a dynamic model and has several advantages over previous solutions. The HYSYS model The model uses the building blocks that are available in HYSYS to construct a realistic representation of a steam reforming furnace. The reactor tubes themselves have been divided into 5 separate PFR reactors to allow an uneven distribution of the heat input along the length of the reactor tubes. The firebox side of the model is built out of several items. A Gibbs reactor represents the burners. A cooler with a fixed duty represents the radiation heat. To improve realism, the duty of the cooler is scaled with the outlet temperature of this cooler. The third power of the ratio between a reference temperature and the current temperature expressed in Kelvin is used for scaling. To mimic the delay that will be caused by the heating of the furnace refractory bricks, a transfer function is used between the value calculated through a spreadsheet and the actual value for the cooler (and hence the reactor tubes). The convection section is built out of a series of heat exchangers with a fixed UA. KeyWords Hydrogen; Steam Reforming; Example; HYSYS Keywords: None References: None
Problem Statement: Produce a list of components and their properties for a selected fluid package.
Solution: The attached Excel spreadsheet illustrates a simple Excel - HYSYS link using OLE Automation. The spreadsheet allows the user to select a fluid package in the currently open case and then will list all the components in that fluid package along with various properties (Formula, NBP, MW, Liquid Density, Tc, Pc, Vc and Accentricity). For hypothetical components the properties are displayed in the usual HYSYS colour scheme (blue = user specified, red = estimated by HYSYS). When linking Excel to HYSYS, the HYSYS type library must be correctly "referenced" to allow Excel to access HYSYS' functions. As supplied the spreadsheet is set up with a link to HYSYS version 3.0.1. If a different version of HYSYS is in use then Excel may report errors like: "Method or Data Member not found," "Type Mismatch," or RPC errors. These can often be solved by re-referencing the HYSYS type library. The procedure to do this is as follows: Close all HYSYS and Excel instances, Open HYSYS and Excel. Go to the VBA editor. (Tools ... Macro ... Visual Basic Editor, or press Alt + F11). In the VBA editor go to Tools ... Keywords: None References: s. If "HYSYS #.# Type Library" (where #.# is the version of HYSYS being used) is checked uncheck it and press OK, then go to Tools ... References again Find "HYSYS #.# Type Library" in the list, check it, press OK and close the VBA editor. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Automation, Fluid Package, Component
Problem Statement: Dynamic (& Steady State) Dew Point / Bubble Point User Variable
Solution: In the attached HYSYS 2.2 case the mixer operation has two user variables: ProdTatGivenVapFrac : a User Variable (Steady State and Dynamic) that calculates the temperature of the stream if it were flashed at the stream pressure to have a vapour fraction as specified in the Vapour Fraction user variable. ProdPatGivenVapFrac : a User Variable (Steady State and Dynamic) that calculates the pressure of the stream if it were flashed at the stream temperature to have a vapour fraction as specified in the Vapour Fraction user variable. To see this in operation in Steady State Mode Force the mixer to recalculate (e.g. by ignoring and un-ignoring it or by changing the conditions in the feed stream) Go to the Design ... User Variables page of the mixer (Ensure the green tick button is pressed) To see this in operation in Dynamics: Switch to Dynamics mode Start the Integrator Go to the Design ... User Variables page of the mixer (Ensure the green tick button is pressed) A new user variable called Vapour Fraction is created in the mixer - by default this is set to 1 to give a dew point temperature / pressure. Adjusting this value sets the vapour fraction in the flash (e.g. changing it to 0 would give a bubble point temperature / pressure). In steady state the user variables are only calculated when the mixer solves, in dynamics the code runs every time the mixer performs a composition step, by default the Execution Rate settings (Options page on Simulation ... Integrator menu option) mean this is once every 10 time steps. The user variables are attached to a mixer since stream user variables do not run in dynamics mode, whereas operation user variables do. Similar code could be attached to any other operation, or if necessary a dummy mixer could be added to a case. Within the code, the mixer product stream is duplicated into a Fluid object which is then flashed to a different vapour fraction. The temperature or pressure of the resultant fluid is then reported. This code is contained in a sub procedure which is called by both the PostExecute() [Steady State] and DynCompositionPreStep() [Dynamic] user variable events. The example case also includes user variables on the streams that do the same calculation. This works in steady state only. Also attached is an huv file that will allow these user variables to be imported into any other case. (See Solution #109210 for details on how to import the huv file) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Dynamic User Variable, Dew Point, Bubble Point, DynCompositionPreStep, PostExecute Keywords: None References: None
Problem Statement: Reformate Stabiliser
Solution: This application illustrates the use of a dynamic model to improve the control of a reformate stabiliser distillation column. The PowerPoint slideshow contains a process/problem description. The final page of the slide show contains a button which when pressed will launch Aspen HYSYS, load the case and start the integrator. The Aspen HYSYS case contains notes which explain how to use the Autotuner and apply the new tuning parameters. Note: The slideshow and the Aspen HYSYS case should be saved in the same location. Keywords: dynamics, Event Scheduler References: None
Problem Statement: Automation Example - Transfer Assay and Blend data from Excel into HYSYS then write out Oil Manager results
Solution: The attached spreadsheet allows the user to enter Assay and Blend data into an Excel spreadsheet. Automation code is then used to create a new case in HYSYS, take the entered data from Excel and submit it into the HYSYS Oil Manager and create a new stream on the flowsheet. The Oil Manager results are then reported back into Excel. Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Oil Manager, Assay, Blend, Automation Keywords: None References: None
Problem Statement: Carbon Split Unit Operation Extension
Solution: The Carbon Split Unit Operation Extension analyzes a specified inlet stream, checks for hypothetical solid components with a valid coal analysis (i.e. at least one of the coal analysis points is greater than zero) and lists these solids on the input form. The user can choose to break down the hypothetical solid component(s) based on the coal analysis. If the model does not contain the required constituent components (C, H2, O2, N2, S, Cl2), they are automatically added to the simulation. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage-Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords carbon coal analysis split splitting Keywords: None References: None
Problem Statement: Stream Multiplier Dynamic Extension Unit Operation
Solution: The attached dynamic unit operation extension allows the flow rate of a stream to be multiplied. This extension will work in both steady state and dynamics modes. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Stream Multiplier Keywords: None References: None
Problem Statement: How to Model Branched Polyesters in Polymers Plus
Solution: Adhesives, powder coatings, and other high-value polyester materials are produced by reacting bifunctional monomers with polyfunctional monomers. A wide range of materials can be produced from a few simple monomers. By manipulating the ratio of polyfunctional groups to monofunctional groups it is possible to produce everything from branched polymers to continuous polymer networks. The purpose of this document is to demonstrate how Polymers Plus can be used to simulate the polymerization process to manufacture these materials. Specifically, this paper examines how to adapt the step-growth reaction model to account for reactions between a bifunctional monomer and a trifunctional monomer. Details are found in the attached document "Branched Polyesters in Polymers Plus.doc". Example files containing relevant Aspen Plus files for a simulation with representative branched polyester created in both 10.2 and 11.1 are also attached. A description of the files is contained in the aforementioned MS Word document. KeyWords polymer branched polyester Keywords: None References: None
Problem Statement: How to model the caustic tower for CO2 scrubbing (sometimes called CO2 scrubber) in an ethylene process?
Solution: Attached is a backup (.bkp) file illustrating how to model CO2 scrubber in an ethylene plant A RadFrac Column is used to model the scrubber. Usually very few equilibrium stages are needed for these columns. Here 3 stages are specified. No Condenser or Reboiler is specified. The gas stream enters on the bottom of the column. This is specified as above stage N+1, in this case above stage 4. The liquid stream enters on the top stage. Temperature estimates are added to improve convergence. The temperature of the column will be close to the temperature of the liquid stream. The gas stream has a much smaller heat capacity so its temperature has very little affect on the column temperature. In this example the gas stream has water, 0.1% CO2, H2S, C2H4, C2H6, C3H8, and C3H6. Electrolyte chemistry is used. KeyWords CO2 NAOH Scrubbing Ethylene Radfrac Caustic Keywords: None References: None
Problem Statement: This is a very simple example of using electrolytes in Aspen Custom Modeler.
Solution: First create the Aspen Properties Plus Definition File (.appdf) using Aspen Plus. In this file select the runtype to be Properties Plus and select the components. Use the Electrolyte Wizard and/or the appropriate inserts to automatically generate the global Chemistry and Henrys Components paragraphs. Run the simulation and using File Export you can create the appdf file by saving the file in the APW format. Note that the component approach selected in Aspen Plus on the Properties\Specifications\Global sheet select ELECNRTL (i.e. the box "Use True-Components") is not propagated in Aspen Custom Modeler. The default value in Aspen Custom Modeler is "No" i.e. apparent components. True components approach is currently not supported in Aspen Custom Modeler. If you switch the option "TRUE-COMPS" to yes, then severe problems will occur in the physical properties system. The attached example shows a call to the true component conversion procedure (pTrueComp) so you can see the feed specified with apparent components, and the results in the block showing the true components (ions, salt) as well. This approach to Electrolytes simulations in Aspen Custom Modeler is good for Steady State simulations and modeling complex systems such as heater, mixers and so on. Use the Flash procedure to perform equilibrium calculations (with the chemistry, but apparent components). Call the pTrueComp procedure to report the true composition. For dynamic simulations we recommend that you consider using Aspen Dynamics. Aspen Dynamics supports only the apparent component approach. KeyWords: Keywords: None References: None
Problem Statement: How is it possible to simulate the quench tower in an ethylene process which involves water and organic components in a liquid-liquid-vapor column?
Solution: An example file that can be opened in Aspen Plus 10.2 and higher is provided. KeyWords: Quench Ethylene Radfrac Keywords: None References: None
Problem Statement: How do I write a query that performs a specific action based on the record that activates it?
Solution: Configure a QueryDef record to activate on a change of state. Then, using Aspen SQLplus, modify the following sample query to fit your needs. -- This script will be activated by a COS tag from IP.21. The script -- will set one flag, from a list of flags, based on information -- received for the COS tag that activated it. begin -- Set the output to the activation record. All messages will be -- sent to the output lines of the activation records. if activation_record is not null then set output activation_record; end; -- Output the activiation time for debugging write 'Activated at: ' || getdbtime; -- Output information about the triggering record for debugging. write 'Activated by COS record: ' || activation_record; write 'Activated by COS field: ' || activation_field; write 'Activated by field: ' || *activation_field; -- Perform action based on which record and field activated this query. case when *activation_field = FIELD'Product1Name IP_Value' then write 'Setting Product1LabSwitch to ' || 0; Product1LabSwitch.ip_input_value = 0; when *activation_field = FIELD'Product1Value1 IP_Value' then write 'Setting Product1LabSwitch to ' || 1; Product1LabSwitch.ip_input_value = 1; end; -- end program write 'Activation complete at: ' || getdbtime; end; Keywords: None References: None
Problem Statement: When getting results from the Aspen Plus Graphica User Interface (GUI) or setting some process variables using ActiveX automation, is it possible to perform a unit conversion or set the unit in which the process variables are set?
Solution: Yes it is possible using several properties and methods available for objects of type IHNode. There are three properties and one method than can be used to view, set and convert a node value: Value property: returns the node value UnitString property : returns the unit in which the data is stored in Aspen Plus. ValuesForUnit property: will convert the existing value into a specific unit. SetValueAndUnit : this method will set the node value and its unit. The physical type and unit are referenced by integer. The full table of physical types and units is available in the variable explorer (Tools menu -> Variable Explorer), under Root\Data\Unit Table. For each physical type (AREA, MASS-FLOW, MOL-FLOW, etc.), there will be one folder. In each folder, there will be a list of valid units for the physical type. For example, the valid units for physical type TEMPERATURE are K, C, F, R. When using the property ValueForUnit or the method SetValueAndUnit, the user will have to reference a physical type and a unit, using integers. Those integers correspond to the position in the list of physical type under Root\Data\Unit Table. For a given physical type, the integer for a unit is its poison in the physical type folder. For example, physical quantity LENGTH will be refereed with integer 17 (see the Value filed under \Tree\Unit Table\LENGTH. The index to reference meter would be 3 (see the Value field for node \Tree\Unit Table\LENGTH\meter). In the attached example (Mch.bkp), the reboiler duty for the column is stored under \Data\Blocks\B1\Output\REB_DUTY. Going to this node in the variable explorer, one can see the value in the Physical Quantity Field ( = 13) and in the Unit of Measure field ( = 2). This means the node contains a variable of type 'ENTHALPY-FLO' using unit 'Btu/hr'. The attached Excel file contains a Visual Basic for Application example which includes one routine DisplayResults where the usage of ValurForUnit is illustrated. The routine SetFeedTemperature use the SetValueAndUnit method to set the feed temperature in a specific unit. Both routines are available in Module1 of the VBA code stored in the attached Excel file. KeyWords Unit Conversion ActiveX COM Automation VB VBA Visual Basic Visual Basic for Applications Keywords: None References: None
Problem Statement: How to modify the DocumetManagement KB so that the comparison between issued values and current values is based on the display value/format and not the internally stored value?
Solution: You need to do the below modification in DocumentMangement KB. The IsNumberChanged function does a string compare on the current and issued value - if the strings are different at all, the value is shown red. The following code, placed before the comparison modifies the current and issued strings based on the known format. It currently only supports the decimal format. Some additional work is required to support engineeering, scientific and default formats. The complete modified DocumentManagement.azkbs is also attached LastChar = Right(strFormat,1) if LastChar = "f" Then pos = InStr(strFormat,".") strFormat2 = Mid(strFormat,pos+1,1) intFormat = CInt(strFormat2) strValue = FormatNumber(current, intFormat, False, False, False) strIssuedValue = FormatNumber(issued, intFormat, False, False, False) End If Keywords: References: None
Problem Statement: Do you have a model of an Amines Plant in Dynamics?
Solution: See attached. Keywords: Amines, Dynamics, Simulation References: None
Problem Statement: How do you scale all of the feeds of your flowsheet by the same multiple? I know that I can add a Multiplier (Mult) block to every stream, but I want to enter the scale factor in only one place.
Solution: A single Calculator block can be used to write the scale factor to all of the Multiplier blocks at once. The Calculator block's arithmetic expressions can either equate each MULT block's scale factor to a specific value or to a defined parameter's value. The advantage of using a parameter type variable in the arithmetic expressions is that if a parameter is defined to set this scale factor, it can be varied in a Sensitivity or Design Spec. The attached example file can be opened in Aspen Plus 12.1 and higher. In this example Calculator block SETSCALE is used to enter the feed scale factor for the base case as parameter FACT. Calculator block SCALE is used to equate the factor in all of the Mult blocks to parameter FACT. Sensitivity VARSCALE is used to vary the parameter FACT from 1.0 to 1.5. Keywords: parameter, scale, calculator References: None
Problem Statement: May I use parameters in domain declaration to encapsulate some custom logics about number of sections and the spacing preferences for each section?
Solution: Yes. By default, in Aspen Custom Modeler (ACM) code, domain declaration takes parameters directly for number of sections and individual spacing preferences. Then on model's instances forms, user can reassign them with custom values. However, if there is a pattern for the spacing preferences on each continuous sections, the pattern can be captured in ACM code with default assignment syntax using ":" operator. For example, the following code n as integerparameter (5); L as realparameter; nsec as integerparameter (2); z as LengthDomain(length:L, NumSections:nsec); SecLoc([2:Nsec]) as realparameter(L/nsec); SecSpacing([1:Nsec]) as realparameter(L/n/nsec); for isec in [1: Nsec] do z.Section(isec).SpacingPreference: SecSpacing(isec); endfor for isec in [2: Nsec] do z.Section(isec).Location: SecLoc(isec); endfor places the locations of sections in parameter SecLoc, the spacing preferences of each section in parameter SecSpacing. Then in the defaults assignment section of the code, the spacings and locations of sections on the domain are initialized with possible user logics. Here the user logic is trivial, but it can be substantially more complex. The full example model is attached. To play the model, pull up the all variables' table of the block, play parameters nsec, SecLoc and SecSoacing with different values, watching how ACM propagate the changes across whole model. Next, try to revise the defaults assignment logic with more meaningful custom formula, and observe ACM goes by the custom logic on the all variables' form. To conclude, the parameter defaults assignment capability provides ACM powerful mechanism to implement custom initialization logics. Keywords: Initialization, parameter, domain, spacing, section References: None
Problem Statement: What is the Visual Basic syntax for entering the three types of pressure drop specifications and retrieving the pressure profile in a RadFrac block? How do you access: 1. Pressure drop for the entire column 2. Pressure drop per stage 3. Pressure profile (referenced by stage number)
Solution: In the attached example, please review the cmd_RunSimulation subroutine for all of the code needed to enter the 3 types of pressure drop specifications. 1. The column pressure drop specification for block B6: go_simulation.Tree.FindNode("\Data\Blocks\B6\Input\DP_COL").value = 5.0 where: go_simulation is the defined name for the Aspen Plus application inside Aspen Plus 2. The column's pressure drop per stage for block B6-DP: go_simulation.Tree.FindNode("\Data\Blocks\B6-DP\Input\DP_STAGE").value = 0.1 3. The column's pressure profile for stage 15 in block B6-PROF: go_simulation.Tree.FindNode("\Data\Blocks\B6-ROF\Input\ STAGE_PRES\15").Value = 205 The syntax for retrieving the calculated pressue of stage 1 in the Radfrac block is: go_simulation.Tree.Data.Blocks.B6.Output.B_PRES.elements("1").value where "1" is the stage number KeyWords: VBA, ActiveX, Pressure drop, RADFRAC Keywords: None References: None
Problem Statement: How can we vary the mole or mass fraction of the inlet feed stream while holding the feed flow constant in a sensitivity analysis?
Solution: Varying a mole or mass fraction is not recommended, as no single mole or mass fraction is in fact an independent variable (the total must always add up to unity). For this reason component fraction has not been made accessible as a manipulated variable in a Sensitivity block. However, you can use the following "trick" to get around this restriction. To illustrate this trick, a Sensitivity block MOLEFRAC which manipulates the mole fraction of MCH in Feed Stream 1 from 0.5 to 0.6 has been created in the attached example file. This feed stream only has two components in it MCH and TOLUENE. A calculator block C-1 is used to calculate the new values for the flows every time the mole fraction is changed by the Sensitivity block. A similar calculation can be done when manipulating a mass fraction. The inlet stream must have the component flow defined, that will be modified by the Calculator block, as only variables input to the flowsheet can be manipulated. If your Calculator block calculates a component mass flow, ensure that you have entered the component mass flows in the input stream. Likewise for mole flows. Create Calculator block C-1 that uses a Parameter, which is changed by the Sensitivity block (the molar fraction), to calculate and export the component flows to the inlet feed stream. In the Calculator block define two variables for mole flows of MCH and TOLUENE respectively (F1MCH and F1TOL). These variables are Export variables. Define a variable of type Parameter (FRAC) for the mole fraction. This is an Import variable. Write the code to calculate the component flow as a function of the stream flow (in this case 400) and the FRAC parameter. F1MCH = FRAC * 400.0 F1TOL = (1.0-FRAC)*400.0 Create a Sensitivity Analysis (called MOLEFRAC in the example) where you Vary the value of Parameter 1 from 0.5 to 0.6. Define the variables you need to tabulate and the example is ready to run. This trick can be extended to more than one component using the FORTRAN to define how the ratios of the components are maintained. KeyWords Keywords: None References: None
Problem Statement: McCabe-Thiele Plot Unit Operation Extension
Solution: The attached example demonstrates how to generate a McCabe Thiele plot for a specified column, between specified stages, and for specified light and heavy key components. Note: This Automation application has been created by AspenTech as an example of what can be achieved through the object architecture of HYSYS. This application is provided for academic purposes only and as such is not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading and using, agree to assume all risk related to the use of this example. We invite any feedback through the normal support channel at [email protected] KeyWords McCabe-Thiele Keywords: None References: None
Problem Statement: How to recreate identical workspace on different Aspen Basic Engineering server?
Solution: Please refer to attached word document for step by step procedure. Notes: 1. This procedure only applies to same version of Aspen Basic Engineering, Please DO NOT use this example to upgrade from older version to newer version. 2. Make sure your version number and cumulative patch are same on both the system.(from one which you are copying data and to one on which you are copying these data) Keywords: Workspace backup, recreating test environment, test environment, simulate same environment, replicate References: None
Problem Statement: How can you model a heat exchanger (HEATX) where the inlets could be either hot or cold?
Solution: If the heat exchanger specification is an outlet temperature or vapor fraction, you can simply model the exchanger by two HEATER blocks connected by a HEAT stream. However, if you need to use an area specification, you need to use the HEATX block. The ports on the HEATX are fixed as either hot or cold. There are a number of possible methods for handling this limitation: Method 1: It is possible to use a flow splitter (FSPLIT) and a Calculator block on either end of the heat exchanger to make the hot stream go to the hot port and the cold stream go to the cold port. See the attached example. Method 2: In the hierarchy block, we use a regular HEATX block. However, the mixed substream is copied into the block input streams to satisfy HEATX requirement that the hot stream temperature is higher than the cold stream temperature. Note: this solution has been kindly contributed by Henk van Winkel. KeyWords Keywords: None References: None
Problem Statement: What is Qualifier? Is there an example explaining how it can be used?
Solution: Qualifier is type of field in datasheet definer which can be used to show two or more alternative attributes in a single field depending on user's selection. Refer to the example datasheet, attached herewith, to explain the qualifier. Please include example.azci in your library which includes the class view used by the datasheet pump with qualifier.xls. This datasheet demonstrate use of Qualifier. Using Qualifier, a single field is used to display two or more alternatives. Whichever qualifier, user will select, it will display value of that. In attached datasheet, two fields for NPSH calculated and NPSH available are defined. With the help of Qualifier, you can use only one field NPSH in place of two of them to represent calculated NPSH and available NPSH. Below procedure will explain how the Qualifier for NPSH is defined in datasheet pump with qualifer.xls: 1) Select the cell E14 and add a Qualifier field from toolbar. 2) Select New Group in the dialog and supply a random Group Name and the Strikethrough radio button. 3) Type Calculated in the Qualifier Label window. Click OK. 4) Add another qualifier field to I14 and select the group created previously and type Available as the Qualifier Label. 5) Select another cell in parallel and add a value field from toolbar. 6) Select the 2 qualifier fields and the value field and click Link on the toolbar. 7) Add a name in Field Name box and after selecting each qualifier click Browse to specify the attributes for Calculated and Available NPSH as required. 8) Click OK to complete linking the fields. 9) Generate the template. After reloading the workspace, open this datasheet in Datasheet editor. 10) Enter values for calcualted NPSH and available NPSH. 11) For field NPSH, if you will click qualifier calculated, it will display calculated NPSH and if you select qualifier available, it will display available NPSH. Keywords: Qualifier References: None
Problem Statement: How to use property submodels of Aspen Dynamics in ACM?
Solution: The submodels are documented in the Aspen Dynamics on-line help. You simply need to attach the Dynamics library in ACM. The examples attached are provided to help working out how to use the property submodels (the code of these models is private). Submodel name Description Example Props_liquid Enthalpy and density for given T p x for liquid phase liquid_ss Props_vapor Enthalpy and density for given T p x for vapor phase vapor_ss Props_flash2 Liquid-vapor flash (T p x y vf h) with efficiency liquid_vapor_ss Props_flash3 Liquid-liquid-vapor flash (T p x y vf h) with efficiency liquid_liquid_vapor_ss Props_lle Liquid-liquid flash (T p x y vf h) with efficiency liquid_liquid_ss The following models are available, but no example is provided. Submodel name Description In 12.1 and later? Props_liq_entr Liquid phase entropy (single phase) Yes Props_vap_entr Vapor phase entropy (single phase) Yes Props_entr Entropy (1-2-3 phases) No Props_bub2 Bubble point for liquid-vapor No Props_dew2 Dew point for liquid-vapor No Props_flash2_entr Liquid-vapor flash (with entropy evaluation and without enthalpy evaluation) Yes Props_flash3_entr liquid-liquid-vapor flash (with entropy evaluation and without enthalpy evaluation) Yes The models props_entr, props_bub2 and props_dew2 are not available in version 12. Bubble point and dew point specifications are available from props_flash2 and props_flash3. The example flash.dynf included in the attachement shows how to use the property submodels for a dynamic liquid-vapor separator. Note that to use local properties, you must switch tearing to "Update" and you can only use Variable Step Implicit Euler or fixed step Implicit Euler. Gear does not support tearing, which is used for the local property update. You can use "Rigorous" property mode and procedure flash with Gear. KeyWords: Keywords: None References: None
Problem Statement: Can I use infinite dilution activity coefficient data in Aspen Plus to determine activity coefficient binary parameters for the NRTL, UNIQUAC or WILSON model? Is there an example?
Solution: Yes, you can use this data to determine activity coefficient binary parameters. This can be performed using the Property Constant Estimation System (PCES). Following is an outline of the procedure: 1. Go to the Properties\Data form. Specify the Mixture data type and accept the default data group name (e.g. D-1). The Mixture data form appears. 2. On the Setup sheet of the Mixture Data form, in the Data Type field of the Mixture data form, specify GAMINF. Then, move two components to the Selected Components field. 3. On the Data sheet, enter the first temperature and the infinite dilution activity coefficient in the TEMP1 and GAMINF1 field. Enter the second temperature and the infinite dilution activity coefficient in the TEMP2 and GAMINF2 fields. TEMP1 and TEMP2 can be the same value. You can enter more than one set of GAMINF1, GAMINF2 data. 4. Go to the Properties\Estimation form. Select Estimate all missing parameters. 5. Click on the Binary sheet of the Estimation form. Click on the New button to specify the activity coefficient binary parameter you want to estimate in the Parameter field (NRTL, UNIQ or WILSON). If you are estimating using a Flowsheet, Property Analysis or Data Regression run type, you must specify a property method that uses that activity coeficient model for the flowsheet or a block. Specify DATA in the Method field and the component IDs in the CompID1 and CompID2 fields. You can now run the simulation. 6. Add Property Analysis or a Flowsheet and run the simulation. The estimation results will be on the Properties\Estimation\Results\Binary sheet. These results are then copied to the Properties\Parameters\Binary Interaction forms. In the attached example NRTL parameters are estimated for an n-Pentane-Propionaldehyde system. The results of the estimation can be compared to actual experimental data as shown in the attached plot. Of course, regressing the actual PXY data will result in a better fit. Keywords: None References: None
Problem Statement: How to model reverse flow with ACM?
Solution: The attached examples illustrate a technique that can be used to model reverse flow. Note: see attached file for complete code To model reverse flow, we define forward and reverse stream's intensive variables. The sign of the flowrate is used to select which intensive variables are used in the material and energy balances. Example of a port with forward and reverse variables: Port FTport_rev F as flow_mass_rev; p as pressure; T as temperature; T_f as temperature; T_r as temperature; End Example of a stream type which selects intensive variables on flowrate sign: Stream FTstream_rev in_f as input FTport_rev; out_p as output FTport_rev; F as flow_mass_rev; T as temperature; T_f as temperature; T_r as temperature; p as pressure; in_f.F = F; in_f.T = T; in_f.T_f = T_f; in_f.T_r = T_r; in_f.p = p; out_p.F = F; out_p.T = T; out_p.T_f = T_f; out_p.T_r = T_r; out_p.p = p; if F > 0 then T = T_f; else T = T_r; endif End The blocks are responsible for setting the intensive variables of material leaving it: output port: forward variables (as usual) intput port: reverse variables The pressure drops have to change sign with flowrate sign. Expressions with non-zero derivative at flowrate change may help avoiding convergence issue. Example of a valve model: Model ValveRev in_f as input FTport_rev; out_p as output FTport_rev; in_f.F = out_p.F; F = in_f.F; out_p.T_f = in_f.T_f; out_p.T_r = in_f.T_r; pdrop = in_f.p - out_p.p; F*(abs(F)+eps)/C0max^2 = Pdrop * (Pos/100)^2; End Finally, in the material and energy balances you simply need to use the effective intensive variable, which is set to the forward or reverse intensive variable, depending on flowrate sign. Example of a tank model: Model TankRev ... in_f as input FTport_rev; out_p as output FTport_rev; $M = in_f.F - out_p.F; $MT = in_f.F*in_f.T - out_p.F*out_p.T; MT = M*T; out_p.T_f = T; in_f.T_r = T; ... KeyWords: stream model Keywords: None References: None
Problem Statement: How to create a new model for the calculation of a physical property when there is no existing user model interface.
Solution: See the attached Microsoft Word document. The idea is to create a new in-house model using the customization described in the System Management Keywords: None References: guide. In this case, a new model for the calculation of the low pressure gas viscosity is added to replace existing models. KeyWords: tbs sdf mmcustom custinst ppcnvpmd ppsublst mdmon9 ppuser lcd_cust mdl_cust prop-replace sp-route muvlp
Problem Statement: How to get ActiveX/VBA interface to report all run-status errors (for each unit operation, etc) during the simulation - as opposed to one run-status message that gives the overall completion status for the simulation
Solution: See the attached example. It uses the collection variable: go_Simulation.Tree.Data.elements("Results Summary").elements("Run-Status") to read each error statement: go_Simulation.Tree.Data.elements("Results Summary").elements("Run-Status")Output.PER_ERROR.elements In this example, it retrieves errors for each unit in error, & property warnings/errors: The following Unit Operation blocks were completed with warnings: B4 B2 The following Unit Operation blocks were completed with errors: B6 The following Convergence blocks were completed with warnings: C-1 C-2 The following messages were issued during Input Translation: INFORMATION BINARY PARAMETERS RKSKIJ (DATA SET 1) FOR MODEL ESRKSTD ARE RETRIEVED FROM SDF TABLE. TABLE NAME = ESRKSTD KeyWords Keywords: None References: None
Problem Statement: Is it possible to automatically vary the total number of trays in a distillation column using ActiveX automation?
Solution: The attached example shows how to run multiple cases with different feed tray location and total number of theoretical stages in a RadFrac block. As those parameters are changed for a given column, it is important to account for any possible change in pumparound, heater, or other feed locations within the column as they might change as well. It is possible, though somewhat difficult, to use a Sensitivity analysis within Aspen Plus to vary the feed tray location and the number of trays in a column model. (See document 3615 for an example.) Using ActiveX automation will make it possible to also do so from a Visual Basic, C++ or Java application. Steps: Open the attached Excel spreadsheet Open the Visual Basic Editor in Excel (Tools -> Macro - Visual Basic Editor) Select Sheet1 in VB Editor - Modify the path to your Aspen Plus simulation in line : Set my_sim = Getobject ("D:\work\mch.bkp") Go back to the Excel spreadsheet and click on the Run button. The Aspen Plus simulation will be opened and the three cases will be run, reporting for each case the distillate composition, temperature and pressure. Comments about the Visual Basic Code: For Tray Sizing and Tray Rating, the location for the last tray is modified for every case using a For Each structure. This is quite efficient as it will handle cases where no tray sizing or rating is specified but also if multiple cases (like here) are specified to compare different tray configurations. In this example a pseudo stream from the last equilibrium stage before the reboiler is specified. As the total number of trays change, it is obviously necessary to change the specification for the pseudo stream. The same thing will need to be done for columns where heaters and pumparounds are specified. To use this example with other Aspen Plus simulation, the following would need to be changed in the code: path to the Aspen plus file column name (here 'C1') pseudo stream name (here 'PSEUDO') stream report (make sure mass fraction is selected under Report Options in Aspen Plus) distillate stream name (here 'TOP') This example can actually handle more than three cases as it is using a While ... Wend Structure to browse through the various cases. KeyWords: ActiveX, COM, VBA, VB, Visual Basic,RADFRAC, Feed tray, Number of Trays,Visual Basic automation Keywords: None References: None
Problem Statement: Is it possible to model supercritical extraction using an Extract block?
Solution: Yes. It is possible. Attached is an example file using an Extract block to model supercritical extraction. In this simple example, supercritical CO2 is used to extract MTBE from water. An Equation of State (EOS) that has FLEXIBLE mixing rules (allows multiple binary parameters to be regressed) should be used for the Property Method. In this case PSRK (Redlich-Kwong-Suave with a mixing rule derived from UNIFAC) was used. The physical properties need to be correct for the results to be quantitative. Any parameters in the Aspen Plus binary databanks or from UNIFAC are not accurate for these high pressure operating conditions. Solubility data at these conditions should be used to regress the parameters. KeyWords Keywords: None References: None
Problem Statement: How to specify an air stream with a known humidity?
Solution: Relative Humidity of a vapor is defined as partial pressure of water vapor in a given vapor divided by vapor pressure of water at the given temperature. A Prop-set property named "Relative Humidity (RELHUMID)" is available in Aspen Plus for vapor-water system. This example demonstrates how to use this property to specify an air stream with a known relative humidity. 1. A feed stream contains air and water is defined, with an initial estimation for the water mole flow. 2. A Prop Set is defined for "Relative Humidity". 3. A design spec is defined to calculate the exact mole flow of water in the feed stream to meet the "Relative Humidity" target . In this example, the Design Spec varies the water component flow rate in the air feed stream until a relative humidity value of 0.2 (Please see the below Note) 4. A Multiplier (MULT) block can be used to obtain a desired outlet total mole flow of the air stream. The multiplier block is used to normalize the air flowrate back to its original rate after the Design Spec executes. 5. In this example, a Calculator block is defined to calculate the multiplication factor of the MULT block. The Calculator block compensates for the total air flow rate changes made by the Design Spec, DS-1. The Design Spec adds or removes water from the air flow to achieve the humidity specification - this also changes the total air flow. The equations calculate a normalization factor for the Multiplier Block - which returns the total air flow back to its original value while maintaining the air/water ratio calculated by the Design Spec. Note: RELHUMID prop-set is changed from Aspen Plus 2004.1. Up to ver. 2004, RELHUMID is in fraction. In 2004.1 and higher it is in percentage. If you are using ver. 2004.1 and above you should specify 20 instead of 0.2 for the design spec target in this example. The reason behind the change is: after the change, the new result is in agreement with convention in the psychrometric chart in which relative humidity lines are in percentage. KeyWords: Relative humidity Keywords: None References: None
Problem Statement: Are the extension files detailed in the Transition Object Extension Developers Guide also available on-line?
Solution: The requisite extension files have been attached to this solution. Keywords: RefSYS, extension References: None
Problem Statement: How do I define overspill for an Out Of the Box AZ nozzle sheet?
Solution: See the attached document. Summary: Overspilling can be compared to association of one datasheet to another datasheet. When there is no room left for the additional objects in a datasheet, Overspilling allows the automatic spilling of objects onto an overspill sheet. In datasheet definer, you will define where the current datasheet will overspill onto. In datasheet editor, when you perform overspill action, a sheet will be automatically created, and the objects that don't fit onto first datasheet will overspill onto this newly created datasheet If you want to create an overspill for AZ Nozzle Sheet i.e. when the nozzles will not fit onto first page, they should automatically overspill to new AZ Nozzle datasheet, then you can follow the 2 step procedure. Step 1: Defining Overspill Associations in Datasheet Definer Step 2: Apply the overspill from Datasheet editor. See the attached document for the details. Keywords: Overspill, Nozzle sheet References: None
Problem Statement: The user does not want to have to answer all the server/license manager dialogue boxes when a new Aspen Plus session is opened. Is there any way to suppress this?
Solution: Yes, use the Visual Basic Create Object function and the Aspen Plus InitFromArchive2 IHapp method to supply all of the dialogue box information. The only message box that will appear is a brief message box (no controls) that says a connection was established with the named server. The box automatically disappears as Aspen Plus continues to load. THIS SOLUTION REQUIRES THE FOLLOWING ATTACHED FILES: ActiveX.bkp Companion Aspen Plus model for this demo. ClientHost.xls Excel spreadsheet that uses the Create Object method clienthostVBobjBrowser Screen snapshot of VBA''s object browser showing the InitForm method Please find the following code fragment in the attached example. In the cmd_OpenSimulation routine, a CreateObject call opens an empty Aspen Plus User Interface (IHapp) object. The InitFromArchive2 method loadd a simulation into the Aspen Plus object. Set go_Simulation = CreateObject("Apwn.Document") Call go_Simulation.InitFormArchive2(ls_Filename,ls_hostType,ls_NodeName, ls_UserName,ls_Password, _ ls_WorkingDir) Please see the attached screen snapshot for the object browser representation of the above. go_Simulation is a global object variable that is based on the Aspen Plus IHapp Visual Basic type. Chapter 38 of the Aspen Plus User Guide (Volume 3) provides more details in using the Aspen Plus ActiveX interface with Visual Basic. The ActiveX interface provides a way to automate Aspen Plus User Interface tasks. These applications can be based on standalone Visual Basic (VB) or other software that supports Microsoft''s Visual Basic for Applications (VBA) such as Excel. KeyWords Visual Basic, VBA, ActiveX, Client Server, dialog box Keywords: None References: None
Problem Statement: This is an example of how to model vacuum stills that are not dedicated to a single atmospheric unit in PIMS. The solution involves defining the vacuum gas oils in the ASSAY table and the construction of an external submodel to represent the vacuum tower.
Solution: This example demonstrates a solution found in Tech Tip number 103903, available in this knowledge base. We started with a PIMS weight-based sample model and altered the model in the following ways: Removed references to the vacuum units in Table CRDDISTL. In Table CRDCUTS, changed the atmospheric resid to a type 1 (straight-run) cut and changed the vacuum cuts to deferred, or type 9 cuts. In Table ASSAYS, changed the WBAL rows for the vacuum cuts to DBAL rows. Also in Table ASSAYS, set up structure ("I" rows) to recurse the vacuum yields as properties of the atmospheric resid. In this example, the property names are LV1, HV1, and VR1. In Table PGUESS, provided initial guesses for the vacuum cut "properties" of the atmospheric resid. Since this model is weight-based, we included the pseudo-properties SV1, HV1, and VR1 in Table WSPECS. Added a submodel for each vacuum unit. There are three vacuum units modeled in the example: SVD1, SVD2, and SVD3. The VDU submodels depool the atmospheric resid into vacuum cuts. Because we modeled the vacuum cuts as deferred cuts, then the properties of the vacuum cuts are already calculated by PIMS. KeyWords VDU vacuum crude still tower applications Applications submodel distributive recursion Keywords: None References: None
Problem Statement: How to model a holding tank in Aspen Plus?
Solution: There is no one block in Aspen Plus that will model a holding tank. You may use a MIXER as the first block (if you have more than one feed stream feeding into the tank) and the FSPLLIT together with In-line-Fortran to model the holding tanks function. HFLOW STREAM THAT REPRESENTS TANK-HOLDUP /--------> / |---------| |------------| ------->| MIXER |------------>| FSPLIT | FEEDS |_________| TOTAL FEED |____________| \ \--------> PRODUCT The example file that has been put together assumes you know the diameter of the tank to be 6 FT and the desired level of the contents in the tank to be 10 FT. ++++++++++++++++++EXAMPLE INPUT FILE FOLLOWS+++++++++++++++++++++++++++++++++ IN-UNITS ENG DEF-STREAMS CONVEN ALL DATABANKS PURECOMP / AQUEOUS / SOLIDS / INORGANIC / & NOASPENPCD PROP-SOURCES PURECOMP / AQUEOUS / SOLIDS / INORGANIC COMPONENTS H2O H2O H2O / ETHANOL C2H6O-2 ETHANOL FLOWSHEET BLOCK SPLIT IN=TOTFEED OUT=HOLDUP PRODUCT BLOCK MIX-1 IN=FEED-1 OUT=TOTFEED PROPERTIES NRTL PROP-DATA NRTL-1 IN-UNITS ENG PROP-LIST NRTL BPVAL H2O ETHANOL 3.457800 -1054.946 .3000000 0.0 0.0 0.0 & 76.98200 212.0000 BPVAL ETHANOL H2O -.8009000 443.1240 .3000000 0.0 0.0 0.0 & 76.98200 212.0000 STREAM FEED-1 SUBSTREAM MIXED TEMP=60 PRES=1 <ATM> & VOLUME-FLOW=180 <CUFT/MIN> MOLE-FRAC H2O 0.5 / ETHANOL 0.5 BLOCK MIX-1 MIXER BLOCK SPLIT FSPLIT MASS-FLOW HOLDUP 100 FORTRAN F-1 F REAL*8 TAU, HMASS, V, PI, H, D DEFINE RHO STREAM-VAR STREAM=TOTFEED SUBSTREAM=MIXED & VARIABLE=MASS-DENSITY DEFINE HFLOW BLOCK-VAR BLOCK=SPLIT SENTENCE=MASS-FLOW & VARIABLE=FLOW ID1=HOLDUP C THIS FORTRAN BLOCK IS USED TO CALCULATE THE HOLDUP IN A TANK C BASED ON AN ASSUMED HOLDUP TIME (TAU) AND GEOMETRY (CYLINDRICAL) C C ASSUME CYLINDRICAL, VOLUME (V)= PI*D^2*H/4 C WHERE PI=22/7, D=DIAMETER, H=DESIRED LEVEL C C MASS OF FLUID IN TANK, HMASS = DENSITY (RHO) * VOLUME (V) C EQUIVALENT MASS FLOW OF HOLDUP, HFLOW = HMASS/TAU C C SET HOLD-UP TIME, TAU (HOURS) F TAU=3D0/60D0 F WRITE (NHSTRY,*) ' ' F WRITE (NHSTRY,*) 'TAU=', TAU F WRITE (NTERM,*) 'TAU=', TAU F WRITE (NHSTRY,*) ' ' C SET DESIRED CONTROL LEVEL, H (FT.) F H = 10 F WRITE (NHSTRY,*) 'DESIRED LEVEL= ',H F WRITE (NHSTRY,*) ' ' C SET TANK DIAMETER, D (FT.) F D = 6 F WRITE (NHSTRY,*) 'TANK DIAMETER= ',D F WRITE (NHSTRY,*) ' ' C SET PI F PI=22D0/7D0 C CALCULATE VOLUME, V (CUFT) F V = PI*(D**2)*H/4 F WRITE (NHSTRY,*) 'TANK VOLUME= ',V F WRITE (NHSTRY,*) ' ' C CALCULATE MASS HOLDUP IN TANK, HMASS (LBS) F HMASS = RHO*V F WRITE (NHSTRY,*) 'TANK MASS HOLDUP ', HMASS F WRITE (NHSTRY,*) ' ' C CALCULATE THE EQUIVALENT MASS FLOW OF HOLDUP, HFLOW (LBS/HR) C BASED ON HOLDUP TIME, TAU F HFLOW = HMASS/TAU F WRITE (NHSTRY,*) 'EQUIVALENT HOLDUP FLOW ',HFLOW F WRITE (NTERM,*) 'EQUIVALENT HOLDUP FLOW ',HFLOW F WRITE (NHSTRY,*) ' ' F READ-VARS RHO WRITE-VARS HFLOW Keywords: None References: None
Problem Statement: Do we have an example of GPP (General physical properties) interface to Aspen Custom Modeler?
Solution: The attached file contains a simple example showing how to use the Componentlists in Aspen Custom Modeler with physical properties. The subroutine gpp_ini initializes the common blocks (I could probably have used a block data as well). The subroutine gpp_query returns the component names and options to populate the componentlist form when the user creates the first component list. Note that you have to select a properties file, even if you don't use it at all (in which case, it can be just any file, such as the readme.txt). This file can reside in the GUI folder, which can be a useful feature for you. The gpp_setup.dll is called before, so that it can setup the Windows search path. If you don't need to do this, you can simply create a dummy gpp_setup.dll (this is what I've done in this example). You should find a description of the routines in the comments, and more details in the on-line help of Aspen Custom Modeler, under Physical Properties Keywords: None References: , Overview of Interfacing Your Own Physical Properties. KeyWords:
Problem Statement: Is it possible to model kerosene/gas oil hydro-desulfurization reactor?
Solution: Solution #102664 solves a similar problem; however, the example method in this Solution gives more flexible problem specifications for certain cases. A more complete example file is also included. The attached example file can be opened in Aspen Plus 10.2 and higher. Note that there is a Model Library (.apm) file that has the hydro-desulphurization reactor in it. The backup (.bkp) file can still be opened and run, but the icon for the reactor will be a square. To see the model library, it needs to be recognized by Aspen Plus. This is accomplished by executing the following steps: Open a blank simulation. Select Keywords: None References: s from the Library menu. Click on the Browse button. Find where the .apm file is located. The model library will then be present when the example file is opened. There are basically two ways to model petroleum reactors where both reactor feed and effluent are defined by Assay data; Simple way to model only mass-balance using Aspen Plus One possible way is to use RYIELD, which is described in
Problem Statement: How do you set up a user-defined pseudocomponent?
Solution: A pseudocomponent is a component that does not exist in the built-in databanks but for which you have two or more parameters that can be used to estimate a full set of properties. (A component structure is not required as this is not Property Estimation.) This is typically related to refining applications and is therefore coupled with the Petro Characterization object manager. The procedure for setting up user-defined pseudocomponents is outlined below. See the attached file for an example. 1. In the Component Specifications form, supply a name for the Component ID and choose Pseudocomponent from the Type drop-down list. 2. On the Pseudocomponents form, enter values for at least two of the three parameters: normal boiling point, molecular weight, and gravity (as density, API gravity, or specific gravity). If you have all three parameters, supply them all as the estimation will be more accurate. 3. Choose a Property method for estimating the physical properties from the one of the eight built-in options: API-Meth American Petroleum Institute (API) recommended procedures Coal-Liq Procedures developed for coal liquids Aspen API-recommended procedures plus Aspen Physical Property System modifications LK Lee-Kesler correlations API-TWU API-recommended procedures plus the Twu correlations for critical properties EXTTWU API procedures with AspenTech modifications and extended Twu correlations for critical properties (for NBP > 1200 C) EXTAPI API procedures and extended Twu correlations for critical properties (for NBP > 1200 C) EXTCAV Extended Cavett and extended Edmister correlations for critical properties (for NBP > 1200 C) 4. Run the file and review results within the Components Petro Chararacterization Results form. Additional properties can be viewed by selecting Retrieve Parameter Results... from the Tools menu. Keywords: Pseudocomponents, API, oils, petroleum, hypotheticals References: None
Problem Statement: How can I write the values of the input and output variables in a Calculator block to the Control Panel?
Solution: It is possible to write the values of all of the defined variables in a Calculator block (previously called a Fortran block) to the Control Panel or the History file, simply by increasing the diagnostics. It does not matter whether Fortran or Excel is used to do the calculations. The procedure for increasing the diagnostic output is as follows: Go to the Calculator blocks Input / Sequence sheet. Click on the Diagnostics button. Increase the Diagnostics for the Calculator Defined Variables to 5 or higher for the Control Panel, the History file or both using the sliders. When the Calculator block is executed, the variables will be written to the Control Panel and the History file. The units of a variable are the units of the set defined for the block. Below is an example of the output: Calculator Block F-1 VALUES OF ACCESSED VARIABLES VARIABLE VALUE ======== ===== DP -2.032782930000 FLOW 5428.501858128 DENS 0.1204020367004 RETURNED VALUES OF VARIABLES VARIABLE VALUE ======== ===== DP -2.032790410000 KeyWords: Fortran Excel Keywords: None References: None
Problem Statement: How do I report the vapor pressure for a liquid mixture?
Solution: The mixture vapor pressure can be reported by two possible ways: A) Use property PBUB in a a Property-Set and include it in the stream report. PBUB gives the mixture bubble point pressure. To implement this: 1 - Go to Properties in the Data browser. 2 - Select Prop-Sets. 3 - Click New button. 4 - Click OK for default name or enter your own choice of name, e.g. PLMIX. 5 - In Properties tab select PBUB as the property and optionally select the units. 6 - In Qualifiers tab optionally select a temperature or more to calculate this property. If no temperature is selected the property will be calculated at the System temperature. 7 - Now go to Setup, Report Options, Stream tab and click Property Sets button. 8 - Move the propety set you have just created to the Selected property sets field. 9 - Run the simulaiton and see the propety PBUB reported in the stream report. B) Use a Flash2 block and use the stream for which you want the vapor pressure as an input to the block. 1 - Place a Flash2 block in the flowsheet. 2 - Connect the Stream to its input port. 3 - Connect outlet streams as usual. 4 - Specify the flash at the desired temperature and a vapor fraction of zero. This will give the bubble point pressure for the specified temperature as a result in the liquid outlet stream. Note: The example attached was generated in 12.1 and can be loaded in more recent versions. It illustrates the use of both options above. Option B is illustrated by flash block B7. KeyWords bubble point dew point vapor pressure Keywords: None References: None
Problem Statement: How do I create a dynamic simulation of a compressor using the Compressor Loop Demo?
Solution: This case demonstrates dynamic simulation of a compressor. It includes the suction pot, the high pressure receiver, and the surge control system. An intercooler and water wash is also modeled. Note that data has been entered on the dynamics/pipe tab for valve VLV-100. This enables modeling of the volume effects associated with the recycle line. Other pipe volumes could be modeled similarly. With default step sizes, the model is fast, and gives reasonably accurate results. If the user wished to examine very fast transient responses, such as the surge controller action, the following settings could be selected: Step size: 0.1 s Energy and Composition Frequencies: 1 Strip chart sampling frequency: 0.05 s It may also be easier to put the integration control in manual and step a fixed number of steps to avoid the interesting information scrolling off the chart too quickly. Keywords: Dynamic, compressor, curve, stonewall, surge, performance, extrapolation, negative References: None
Problem Statement: </u></b> How may I automate switching HYSYS Steady State spreadsheet cells to unitless? <b><u>
Solution: </u></b> HYSYS Spreadsheets will keep the unit type for calculated cells the same as the cells they are dependant upon. Sometimes this is useful, but most of the time you would want to change the variable types to what you really want. This prevents your calculations from becoming erroneous if a different unit set is selected. One way of shielding your calculations is by making them unitless, which keeps them the same with different unit sets. This can be easily done from the spreadsheet window for each cell. If you have a significant number of cells you want to make unitless, changing them manually becomes extremely inefficient. The attached excel spreadsheet automates the procedure for you, so you only select which cells of which spreadsheet you want converted to unitless and it does the conversion for you. Procedures: 1- Download the attached excel file to your computer. 2- Open the file and select "Enable Macros" when prompted. 3- Make sure you have your HYSYS case open. 4- Press the big button on the first sheet of the Excel Spreadsheet. 5- From the window that pops, select the HYSYS spreadsheet you want. 6- From the Cells List, select the cells you want converted to unitless. 7- Press the <Make Unitless> button. 8- Go back to your HYSYS Spreadsheet and make sure the cells were actually converted. Note: These examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released heritage Hyprotech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use these examples. We invite any feedback through the normal support channel at [email protected]. <b><u>KeyWords</u></b> HYSYS, automation, spreadsheet, units Keywords: None References: None
Problem Statement: How does the Production Allocation utility work and do you have an example?
Solution: Note: You must have the HYSYS Upstream license in order to use this utility. Select multiple feeds to a unit on the Setup tab - see feeds A, B and C in the attached case. Press Run. On the results tab, select which product stream you want to analyze - in this case, select the Methane Product stream. Select the basis (molar flow, mass flow, LV flow, or Flow %) and the results will show you which feed stream contributes what amount to the selected product. This is useful in analyzing cases where there are disparate feeds to a plant, or where multiple parties have feeds to a joint venture plant. KeyWords Production Allocation Keywords: None References: None
Problem Statement: How to evaluate an existing refrigeration loop with different cooling temperatures of condenser (hot day and cold day).
Solution: In this example, user's will explore how hot day and cold day will impact the compressor duty. Here, the simulation case file is setup to design a refrigeration loop with the known evaporator duty, condenser outlet and compressor inlet conditions (as the attached case study). Keywords: varying, temperature, weather, condition References: None
Problem Statement: User Variable to show when a case has been changed
Solution: In the attached HYSYS 3.2 case there is a flowsheet user variable to provide an indication when the case changes. Find the user variable on the Flowsheet ... Flowsheet User Variables menu option. Double click on the variable to see the VB code that drives it. This user variable fires every time the case solves, it does two jobs: Looks for a stream called "Master Version" and if it finds it, changes its name to "No longer the Master Version". Increments the user variable value by one hence giving an indication of the number of times the flowsheet has solved. Also attached is an huv file that will allow these user variables to be imported into any other case. (See Solution #109210 for details on how to import the huv file) Note The Knowledge Base examples are provided for academic purposes only and as such are not subject to the quality and support procedures of officially released AspenTech products. Users are strongly encouraged to check performance and results carefully and, by downloading, agree to assume all risk related to the use of these examples. We invite any feedback through the normal support channel at [email protected]. KeyWords Flowsheet, PostSolve, User Variable Keywords: None References: None
Problem Statement: Is there a good way to change the value of a constant in a Calculator Block's Fortran?
Solution: There are two ways to accomplish this. One is to use VBA code to read the entire line of code from the Fortran code of the Calculator block into a string variable, modify the string and write the string back to the calculator block. The problem with this approach is that it can be short-circuited whenever a user modifies the Fortran code in the Calculator block. The other, better approach is to define a PARAMETER type variable on the Calculator Block's DEFINE form and modify the value of the parameter via VBA code. This is especially useful when the constant is used in more than one Calculator / Design-Spec and/or Sensitivity Analysis. The attached example to demonstrate this. There are a few steps. First, when you define the variables for the calculator block (in Aspen Plus), declare the variable type as PARAMETER, and be sure to enter an initial value at the bottom of the form . Also, be sure to set the Information Flow setting to EXPORT variable - this will prevent other calculator blocks from trying to overwrite this value, if they should get sequenced improperly at run time. Both of these features are illustrated in the attached GIF file. Second, you will need VBA code to modify this variable: go_Simulation.Tree.Data.Elements("Flowsheeting Options").Calculator. _ Elements("C-1").Input.FVN_INIT_VAL.IDPARM.Value = MyValue where: go_Simulation is the defined name for the Aspen Plus application in Excel. MyValue would be the user input value from the spreadsheet. To try this example, please download the spreadsheet and Aspen Plus Bkp files to your hard drive. Open the spreadsheet, click on the OPEN SIMULATION command button and navigate to open the attached bkp file. Enter a new value for the multiplier factor (> 0). Click on the RUN SIMULATION button and watch the results update in the yellow highlighted boxes. The attached bkp file has one multipler block on product stream 10 (M2), and another multiplier block on product stream 9 (M1). The factor for each multiplier block is changed by a VBA link from the spreadsheet to the intial value field for the defined variable, IDPARM in the calculator block C-1. The setup for IDPARM is shown below, in Figure 1. FIGURE 1: IDPARM is a "PARAMETER" type variable that can be shared with other blocks in the flowsheet. Parameter variable are shared by their unique index number, in this case, parameter 1. Calculator block GASMFP reads PARAMETER 1 through its defined parameter variable, IDPARM and sets the factor in the Multiplier block M2 equal to PARAMETER 1. You can change the multiplier factor in the spreadsheet, and then you should see the product streasm M9 and M10 multiplied by the same factor. KeyWords VBA, ActiveX, modify FORTRAN, indirect parameter Keywords: None References: None
Problem Statement: How can I read from and write to an external data file using an Aspen Plus Fortran Calculator block? Is it also possible to write to an external file?
Solution: Attached is an example that both reads from and writes to external files using the Fortran of a Calculator block. When reading or writing using a user-defined file, use a Fortran unit number between 50 and 100. The Calculator block INPUTDEF reads the input data from the file EXAMPLE.DAT. The Fortran code used to read is as follows: C C OPEN DATA FILE WITH COMPONENT FLOWS F OPEN (UNIT=90, FILE='EXAMPLE.DAT',STATUS='UNKNOWN') C F READ(90,25) X1C2,X1C3,X1C4, X2C2, X2C3, X2C4 C F 25 FORMAT(9X,F7.2,T20,F7.2,T30,F7.2,T40,F7.2,T50,F7.2,T60,F7.2) F S1C2=X1C2 F S1C3=X1C3 F S1C4=X1C4 F S2C2=X2C2 F S2C3=X2C3 F S2C4=X2C4 F CLOSE (UNIT=90) The Calculator block OUTPUTDEF writes the outnput data to the file RESULT.DAT. The Fortran code used to write is as follows: F WRITE(NTERM,*) ' ' F WRITE(NTERM,105) YS3C2,YS3C3,YS3C4 F 105 FORMAT(1X, 'PRODUCT COMP ' , 3F10.3) C F PAUSE C F WRITE (6,*) 'Press RETURN or ENTER to continue ...' F WRITE(NTERM,*) ' ' C Open file to write results to F OPEN (UNIT=91, FILE='RESULT.DAT',STATUS='UNKNOWN') F WRITE(91,*) ' ' F WRITE (91,35) F WRITE(91,*) ' ' F WRITE(91,*) ' ' F WRITE (91,40) F WRITE (91,45) F WRITE(91,*) ' ' F WRITE (91,30) YS3C2,YS3C3,YS3C4 F WRITE(91,*) ' ' F WRITE (91,35) F WRITE(91,*) ' ' F 30 FORMAT(T20,F7.2,T40,F7.2,T60,F7.2) F 35 FORMAT (T20, '***********************************************') F 40 FORMAT (T20, 'Ethane',T40,'Propane',T60,'Butane') F 45 FORMAT (T20, '-------',T40,'--------',T60,'-------') F CLOSE (UNIT=91) The data file EXAMPLE.DAT is: 1 100.00 200.00 300.00 400.00 500.00 600.00 Note: A Fortran compiler is needed to run this example. KeyWords: fortran Keywords: None References: None
Problem Statement: Solids, elution of fines from a catalyst
Solution: The application shows what is happening in many fluidized bed catalytic reactors. The most interesting part is the streams around mixer MIX2. In the mixer view the particle size distributions of the reactor feed, the fresh catalyst and the catalyst that returns from the cyclone can be compared. Keywords: Solid, Catalyst, Fluidized bed Reactors References: None
Problem Statement: How can I use the column flowsheet to simulate three classical air separation columns in a single simultaneous solution?
Solution: This application illustrates the use of the column flowsheet to simulate the three classical air separation columns in a single simultaneous solution. Altough this may take a little more effort to reach a first solution, subsequent solutions are obtained faster in this way. On the downside, it is not possible to include equipment like LNG exchangers in the column subflowsheet. Keywords: air separation, example library References: None
Problem Statement: Is is possible to obtain a water dew-point temperature for a mixture from AspenPlus?
Solution: The water dew-point temperature for a mixture can be accessed using the Property Set PH2OTDEW in Aspen Plus 11.1 and higher. How the Water Dew Point is Calculated: The dew temperature of pure water at the pressure equivalent to the partial pressure of water in the mixture. If that temperature is greater than the stream temperature, it indicates that there should be a a free water phase. The partial pressure of water is simply the total pressure times the molar fraction of water in the vapor phase. The Flash routine is then called to evaluate the dew temperature at that pressure, using the property method that has been selected for the Free Water phase. KeyWords: petroleum water dew free water refining petrofrac fortran Keywords: None References: None