AspenAdsim 2004.1 LibraryReferenceGuide
AspenAdsim 2004.1 LibraryReferenceGuide
2004.1
Library Reference Guide
General Information 1
Who Should Read this Guide
This guide contains reference information for use by experienced users of the
Aspen Adsim application and describes the models, streams, procedures and
submodels available in Aspen Adsim.
This section provides Copyright details and lists any other documentation
related to the Aspen Adsim 2004.1 release.
Copyright
Version: 2004.1
April 2005
Copyright © 1991-2005 Aspen Technology, Inc, and its applicable
subsidiaries, affiliates, and suppliers. All rights reserved. This Software is a
proprietary product of Aspen Technology, Inc., its applicable subsidiaries,
affiliates and suppliers and may be used only under agreement with
AspenTech.
Aspen ACOL™, Aspen Adsim®, Aspen Advisor™, Aspen Aerotran®, Aspen
Alarm & Event™, Aspen APLE™, Aspen Apollo Desktop™, Aspen Apollo
Online™, Aspen AssetBuilder™, Aspen ATOMS™, Aspen Automated Stock
Replenishment™, Aspen Batch Plus®, Aspen Batch.21™, Aspen BatchCAD™,
Aspen BatchSep™, Aspen Calc™, Aspen Capable-to-Promise®, Aspen
CatRef®, Aspen Chromatography®, Aspen Cim-IO for ACS™, Aspen Cim-IO
for Csi VXL™, Aspen Cim-IO for Dow MIF™, Aspen Cim-IO for G2™, Aspen
Cim-IO for GSE D/3™, Aspen Cim-IO for Hewlett-Packard RTAP™, Aspen Cim-
IO for Hitachi PLC (H04E)™, Aspen Cim-IO for Intellution Fix™, Aspen Cim-IO
for Melsec™, Aspen Cim-IO for WonderWare InTouch™, Aspen Cim-IO for
Yokogawa Centum CS™, Aspen Cim-IO for Yokogawa Centum XL™, Aspen
Cim-IO for Yokogawa EW3™, Aspen Cim-IO Interfaces™, Aspen Cim-IO
Monitor™, Aspen Cim-IO™, Aspen Collaborative Demand Management™,
Aspen Collaborative Forecasting™, Aspen Compliance.21™, Aspen
COMThermo TRC Database™, Aspen COMThermo®, Aspen Cost Factor
Manual™, Aspen Crude Manager™, Aspen Crude Margin Evaluation™, Aspen
Custom Modeler®, Aspen Data Source Architecture™, Aspen Decision
Analyzer™, Aspen Demand Manager™, Aspen DISTIL™, Aspen Distribution
Scheduler™, Aspen DMCplus® Composite, Aspen DMCplus® Desktop, Aspen
DMCplus® Online, Aspen DPO™, Aspen Dynamics®, Aspen eBRS™, Aspen
Enterprise Model™, Aspen ERP Connect™, Aspen FCC®, Aspen FIHR™, Aspen
FLARENET™, Aspen Fleet Operations Management™, Aspen Framework™,
Aspen FRAN™, Aspen Fuel Gas Optimizer Desktop™, Aspen Fuel Gas
Optimizer Online™, Aspen General Construction Standards™, Aspen Hetran®,
Aspen HX-Net®, Aspen Hydrocracker®, Aspen Hydrotreater™, Aspen HYSYS
General Information 3
Amines™, Aspen HYSYS Crude™, Aspen HYSYS Dynamics™, Aspen HYSYS
OLGAS 3-Phase™, Aspen HYSYS OLGAS™, Aspen HYSYS OLI Interface™,
Aspen HYSYS Tacite™, Aspen HYSYS Upstream Dynamics™, Aspen HYSYS
Upstream™, Aspen HYSYS®, Aspen Icarus Process Evaluator®, Aspen Icarus
Project Manager®, Aspen InfoPlus.21®, Aspen Inventory Balancing™, Aspen
IQ Desktop™, Aspen IQ Online™, Aspen IQmodel Powertools™, Aspen
Kbase®, Aspen LIMS Interface™, Aspen Local Security™, Aspen LPIMS™,
Aspen MBO™, Aspen MIMI®, Aspen MPIMS™, Aspen Multivariate Server™,
Aspen MUSE™, Aspen NPIMS™, Aspen OnLine®, Aspen Operations Manager -
Event Management™, Aspen Operations Manager - Integration
Infrastructure™, Aspen Operations Manager - Peformance Scorecarding™,
Aspen Operations Manager - Role Based Visualization™, Aspen Order Credit
Management™, Aspen Orion Planning™, Aspen Orion™, Aspen PEP Process
Library™, Aspen PIMS Blend Model Library™, Aspen PIMS Distributed
Processing™, Aspen PIMS Enterprise Edition™, Aspen PIMS Mixed Integer
Programming™, Aspen PIMS Simulator Interface™, Aspen PIMS Solution
Ranging™, Aspen PIMS Submodel Calculator™, Aspen PIMS XNLP
Optimizer™, Aspen PIMS™, Aspen PIPESYS™, Aspen PIPE™, Aspen Planning
Accuracy™, Aspen Plant Planner & Scheduler™, Aspen Plant Scheduler Lite™,
Aspen Plant Scheduler™, Aspen Plus OLI Interface™, Aspen Plus®, Aspen
Polymers Plus®, Aspen PPIMS™, Aspen Process Data™, Aspen Process
Explorer™, Aspen Process Manual™, Aspen Process Order™, Aspen Process
Plant Construction Standards™, Aspen Process Recipe®, Aspen Process
Tools™, Aspen Product Margin & Blending Evaluation™, Aspen Production
Control Web Server™, Aspen ProFES® 2P Tran, Aspen ProFES® 2P Wax,
Aspen ProFES® 3P Tran, Aspen ProFES® Tranflo, Aspen Properties®, Aspen
Pumper Log™, Aspen Q Server™, Aspen RateSep™, Aspen RefSYS
CatCracker™, Aspen RefSYS Spiral™, Aspen RefSYS™, Aspen Report Writer™,
Aspen Resource Scheduling Optimization™, Aspen RTO Watch Cim-IO
Server™, Aspen RTO Watch Server™, Aspen Scheduling & Inventory
Management™, Aspen SmartStep Desktop™, Aspen SmartStep Online™,
Aspen SQLplus™, Aspen Supply Chain Analytics™, Aspen Supply Chain
Connect™, Aspen Supply Planner™, Aspen Tank Management™, Aspen TASC-
Mechanical™, Aspen TASC™, Aspen Teams®, Aspen Terminals
Management™, Aspen TICP™, Aspen Transition Manager™, Aspen Turbo
PIMS™, Aspen Utilities™, Aspen Voice Fulfillment Management™, Aspen
Watch Desktop™, Aspen Watch Server™, Aspen Water™, Aspen Web
Fulfillment Management™, Aspen WinRace Database™, Aspen XPIMS™,
Aspen Zyqad Development Version™, Aspen Zyqad™, SLM™, SLM
Commute™, SLM Config Wizard™, the aspen leaf logo, and Plantelligence are
trademarks or registered trademarks of Aspen Technology, Inc., Cambridge,
MA.
All other brand and product names are trademarks or registered trademarks
of their respective companies.
This document is intended as a guide to using AspenTech's software. This
documentation contains AspenTech proprietary and confidential information
and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license.
Corporate
Aspen Technology, Inc. Phone: (1) (617) 949-1000
General Information 4
Ten Canal Park Toll Free: (1) (888) 996-7001
Cambridge, MA 02141-2201 Fax: (1) (617) 949-1030
USA URL: http://www.aspentech.com
General Information 5
Related Documentation
In addition to this document, the following documents are provided to help
users learn and use the Aspen Adsim applications.
Title Content
Aspen Adsim 2004.1 Adsorption Reference Contains information on how the
Guide product handles gas, liquid and ion-
exchange processes and also
describes: numerical methods for
solving partial differential equations;
the estimation module; the cyclic
organizer and flowsheeting strategies.
Aspen Engineering Suite 2004.1 Installation Full installation procedures for both
Guide server and client.
Aspen Engineering Suite 2004.1 What's New An overview of new features and
Guide functionality within this release.
General Information 6
Technical Support
Technical Support 7
Phone and E-mail
Customer support is also available by phone, fax, and e-mail for customers
who have a current support contract for their product(s). Toll-free charges are
listed where available; otherwise local and international rates apply.
For the most up-to-date phone listings; please see the Online Technical
Support Center at:
http://support.aspentech.com
Technical Support 8
Contents
GENERAL INFORMATION................................................................................. 3
Related Documentation............................................................................................. 6
TECHNICAL SUPPORT...................................................................................... 7
Online Technical Support Center ................................................................................ 7
Phone and E-mail..................................................................................................... 8
Contents 9
Liquid Models ........................................................................................................ 53
liq_bed Model ................................................................................................... 54
liq_feed Model .................................................................................................. 55
liq_feed_distrib Model ........................................................................................ 57
liq_interaction Model ......................................................................................... 58
liq_mix_multi Model .......................................................................................... 60
liq_prod_distrib Model........................................................................................ 60
liq_product Model.............................................................................................. 62
liq_split Model .................................................................................................. 64
liq_tank Model .................................................................................................. 65
liq_valve Model ................................................................................................. 66
Miscellaneous Models.............................................................................................. 67
Dynamics_Inlet_ Connect Model.......................................................................... 68
Dynamics_Outlet_ Connect Model........................................................................ 70
p_control model................................................................................................ 72
PID Model ........................................................................................................ 74
ratio Model....................................................................................................... 74
Static_Isotherm Model ....................................................................................... 75
universal_block Model........................................................................................ 77
4 USER PROCEDURES.................................................................................... 87
About the Procedure Organizer ................................................................................ 87
Launching the Procedure Organizer...................................................................... 87
Adding Procedures ............................................................................................ 88
Editing Procedures ............................................................................................ 88
Building the Procedure Library ............................................................................ 88
Gas Procedures...................................................................................................... 90
Procedure pUser_Act_Coeff ................................................................................ 91
Contents 10
Procedure pUser_g_Avg_Mole_Weight.................................................................. 92
Procedure pUser_g_Cat_RX_Heat ........................................................................ 92
Procedure pUser_g_Cat_RX_Rate_C .................................................................... 93
Procedure pUser_g_Cat_RX_ Rate_C_Sol ............................................................. 94
Procedure pUser_g_Cat_RX_Rate_Pp ................................................................... 95
Procedure pUser_g_Cat_RX_Rate_Pp_Sol ............................................................. 96
Procedure pUser_g_Compressibility ..................................................................... 97
Procedure pUser_g_Cpa ..................................................................................... 97
Procedure pUser_g_De ...................................................................................... 98
Procedure pUser_g_DH ...................................................................................... 99
Procedure pUser_g_Diffusivity ...........................................................................100
Procedure pUser_g_Dispersion ...........................................................................100
Procedure pUser_g_Enthalpy_Mol.......................................................................101
Procedure pUser_g_Entropy_Mol ........................................................................102
Procedure pUser_g_Gas_RX_Heat ......................................................................102
Procedure pUser_g_Gas_RX_Rate_C ...................................................................103
Procedure pUser_g_Gas_RX_Rate_Pp .................................................................104
Procedure pUser_g_Gibbs .................................................................................105
Procedure pUser_g_Heat_Capacity_Cv ................................................................106
Procedure pUser_g_Heat_Capacity_Mol ...............................................................106
Procedure pUser_g_Henry .................................................................................107
Procedure pUser_g_HTC....................................................................................108
Procedure pUser_g_Isotherm_C .........................................................................109
Procedure pUser_g_Isotherm_P .........................................................................110
Procedure pUser_g_Isotherm_Poi .......................................................................110
Procedure pUser_g_Isotherm_W ........................................................................111
Procedure pUser_g_Kg......................................................................................112
Procedure pUser_g_Kinetic ................................................................................113
Procedure pUser_g_KmacKmic ...........................................................................114
Procedure pUser_g_Mole_Weights ......................................................................115
Procedure pUser_g_MTC ...................................................................................115
Procedure pUser_g_Pump_Performance ..............................................................116
Procedure pUser_g_Viscosity .............................................................................117
Ion-Exchange Procedures .......................................................................................118
Procedure pUser_i_Dispersion ............................................................................118
Procedure pUser_i_Isotherm_C ..........................................................................119
Procedure pUser_i_Isotherm_W .........................................................................119
Procedure pUser_i_Kinetic .................................................................................120
Procedure pUser_i_MTC ....................................................................................121
Liquid Procedures..................................................................................................122
Procedure pUser_l_Avg_Mole_Weight..................................................................123
Procedure pUser_l_Density_Mass .......................................................................123
Contents 11
Procedure pUser_l_DH ......................................................................................124
Procedure pUser_l_Dispersion ............................................................................125
Procedure pUser_l_Enthalpy_Mol........................................................................126
Procedure pUser_l_Gibbs ..................................................................................126
Procedure pUser_l_Heat_Capacity_Mol ................................................................127
Procedure pUser_l_HTC.....................................................................................128
Procedure pUser_l_Isotherm_C ..........................................................................129
Procedure pUser_l_Isotherm_W .........................................................................129
Procedure pUser_l_Kinetic .................................................................................130
Procedure pUser_l_Kl........................................................................................131
Procedure pUser_l_KmacKmic ............................................................................132
Procedure pUser_l_Mole_Weights .......................................................................133
Procedure pUser_l_MTC ....................................................................................133
Procedure pUser_l_Viscosity ..............................................................................134
Miscellaneous Procedures .......................................................................................135
Procedure pUser_Flash......................................................................................135
Procedure pUser_KValues..................................................................................136
Contents 12
User Submodel iUserDispersion ..........................................................................152
User Submodel iUserIsotherm............................................................................153
User Submodel iUserKinetic ...............................................................................153
User Submodel iUserMTC ..................................................................................153
Liquid User Submodels...........................................................................................154
User Submodel lUserDH ....................................................................................154
User Submodel lUserDispersion ..........................................................................155
User Submodel lUserGibbs ................................................................................155
User Submodel lUserHTC...................................................................................156
User Submodel lUserIsotherm............................................................................156
User Submodel lUserKinetic ...............................................................................157
User Submodel lUserKl......................................................................................157
User Submodel lUserKmacKmic ..........................................................................158
User Submodel lUserMTC ..................................................................................158
INDEX ..........................................................................................................161
Contents 13
Introducing Aspen Adsim
This chapter describes the five main groups of library models in the Aspen
Adsim library. These are:
Group Description
Adsim_Gas Gas phase flowsheet models.
Gas Models
The table lists the gas phase models available in Aspen Adsim. You connect
these models using the gas_Material Connection stream.
Model Description
gas_bed Adsorbent bed layers.
1 Model Library 15
gas_bed Model
The gas_bed model simulates an adsorption bed unit in a gas flowsheet. It
acts like a container model for the bed layers and their interconnections.
Variable Description
MFlow Mass flowrate of heating/cooling medium.
1 Model Library 16
Tcw_In Inlet temperature of cooling water.
Note: Each adsorbent layer within the bed has its own
specifications.
Variable Description
E Total energy transferred to the environment.
EHxCyc Total heat exchanged to single phase medium for the last
cycle.
EcwCyc Total heat exchanged to cooling water for the last cycle.
gas_buffer_interaction Model
The gas_buffer_interaction model simulates a void or tank where material can
accumulate. Use the model as part of the single bed modeling approach to
1 Model Library 17
simulate, for example, material recovered from a pseudo-bed whilst the
actual modeled bed undergoes a regenerative step.
Variable Description
Tank_Volume Total volume of the tank/void.
1 Model Library 18
Diameter Diameter of cylinder/sphere/cap/hemisphere.
To run the initialization script contained within the model, click the Initialize
button or select Check & Initial from the Flowsheet menu. This calculates the
appropriate molar holdup for the conditions provided.
1 Model Library 19
gas_buffer_interaction Model: User Procedures Used
Depending on how the gas_buffer_interaction model is configured, the user
procedures available are:
Variable Description
Y Internal holdup composition.
T Internal temperature.
P Internal pressure.
H Internal enthalpy.
gas_feed Model
The gas_feed model terminates an inlet/feed flowsheet boundary. Use it to
specify the material composition, temperature and pressure. If configured as
reversible, the model acts as a product sink should the flow reverse.
1 Model Library 20
Non-Reversible
1 Model Library 21
Total_Material_Rev Total material received at boundary. Reversible model
Cycle_Total_Material Total material fed into boundary for last Non-reversible model
cycle.
Cycle_Total_Material_Fwd Total material fed into boundary for last Reversible model
cycle.
Cycle_Total_Energy Total energy fed into boundary for last Non-reversible model
cycle.
Cycle_Total_Energy_Fwd Total energy fed into boundary for last Reversible model
cycle.
1 Model Library 22
gas_heat_exchanger Model
The gas_heat_exchanger model modifies the temperature of an inlet stream.
By default, it operates at a constant outlet temperature. You can change the
model operation to either constant duty or constant temperature rise/drop.
The model is of type non-reversible.
Variable Description
Heat_Exchange_Area Composition of stream (non-reversible
model).
1 Model Library 23
pUser_Flash Instantaneous flash calculation enthalpy.
Variable Description
T_Out Outlet temperature.
gas_interaction Model
Use the gas_interaction model as part of the single bed modeling approach,
to record the profile of material received, then later replay this profile to
simulate returned material. The following are recorded over time:
• Molar flowrate
• Mole fraction composition
• Temperature
• Upstream (bed) pressure
• Specific enthalpy
By acting as a pseudo-adsorbent bed, the model can behave as a bed at
either constant or varying pressure. Use the Cycle Organizer to define the
steps between which an interaction occurs.
You can define any type of bed interaction with the model:
• Top-to-top
• Top-to-bottom
• Bottom-to-bottom
• Bottom-to-top
These are defined by the connectivity, that is where material is accepted from
and returned to. Interactions cannot be redefined during a run as connectivity
is structural, so if you want more than one type of interaction, use additonal
interaction models.
In the first cycle, during cyclic operation, the model uses an approximation
based on an assumed effective volume, to simulate the pressure of the
interacting bed. For subsequent cycles, the recorded pressure profile of the
rigorously modeled bed provides an accurate response for the pseudo bed.
1 Model Library 24
Port name Type Valid connection
Process_In g_material_port (single) gas_Material_Connection
Variable Description
Notional_Volume Estimated effective volume of the real
bed/s.
1 Model Library 25
User procedure Description
pUser_g_Enthalpy_Mol Molar enthalpy (user Fortran physical
properties, optional liquid port not
connected).
Variable Description
P Internal pressure.
1 Model Library 26
• XFac may need modifying from step to step. To do this, use the Cycle
Organizer.
• To simulate a constant pressure interaction, set XFac to a high value, such
as 100. This increases the volume to such an extent that it acts like a void
of near infinite capacity.
gas_node Model
The gas_node model joins one or more inlet streams to one or more outlet
streams. The model is an alternative method to the gas_tank_void model for
joining multiple streams, but without an internal volume.
Variable Description
1 Model Library 27
Y Average composition of outlet material.
gas_pipe Model
Use the gas_pipe model to simulate a simple, flowing isothermal gas pipe.
The pipe is assumed to have negligible hold-up volume so that it responds
instantaneously to any change in the inflowing stream. The model acts as a
flow setter. The constant density assumption is generally acceptable for short
pipes whose pressure drop is less than 10% of the total inlet pressure.
Variable Description
Dia Pipe dimeter
L Length of pipe
1 Model Library 28
FF Friction factor
Variable Description
AMW Average molecular weight of gas.
gas_product Model
The gas_product model terminates an outlet/product flowsheet boundary. It
receives material from the flowsheet. If configured as a reversible model, the
model acts as a feed unit should the flow reverse. The material composition
and temperature for this material can be defined.
1 Model Library 29
Port name Type Valid connection
Process_In g_material_port (single) gas_Material_Connection
1 Model Library 30
Variable Description Reversible/No
n-reversible
model
F_In Molar flowrate. Non-reversible
model
Cycle_Total_Material_Rev Total material fed into boundary for last Reversible model
cycle.
Cycle_Total_Component_Rev Total component fed into boundary for last Reversible model
cycle.
1 Model Library 31
Cycle_Total_Energy_Fwd Total energy received at boundary for last Reversible model
cycle.
Cycle_Total_Energy_Rev Total energy fed into boundary for last Reversible model
cycle.
gas_pump Model
The gas_pump model simulates a single-stage pump for compressible
(gaseous) fluids. The unit is considered as a non-reversible model.
Variable Description
Polytropic_Efficiency Polytropic efficiency of pump (polytropic
pump).
1 Model Library 32
Np Polytropic index.
Variable Description
Work Actual work required.
gas_ramp Model
The gas_ramp model drives a gas phase adsorbent bed through a series of
pressure profiles. This is useful when there is no information on valve opening
1 Model Library 33
coefficients, in which case the model acts as an in-situ replacement for a
gas_valve.
Variable Description
Active_Specification Specification to control the model:
0 = Fully off (zero flow).
1 = Fully open (responds as high Cv
valve).
2 = Defined pressure regime (from start to
end pressure, makes use of Xstart, Xend,
Notional_Volume and Xfac variables).
3 = Constant flowrate (uses the value for
Flowrate).
1 Model Library 34
Dstart Interacting bed start pressure.
Results:
Typical variables in the Results table for the gas_ramp model are:
Variable Description
P_Change Pressure drop across the unit.
gas_tank_void Model
The gas_tank_void is a general purpose model for simulating adsorbent bed
deadspaces (voids), tanks, pressure receivers or piping nodes.
1 Model Library 35
gas_tank_void Model: Connectivity
These are the available connections for the gas_tank_void model:
Variable Description
Tank_Volume Total volume of the tank/void.
1 Model Library 36
Mass_Shell Mass of void/tank wall.
To run the initialization script for the model, click the Initialize button or
select Check & Initial from the Flowsheet menu. This calculates an
approximate molar holdup for the conditions provided.
Variable Description
Y Internal holdup composition.
T Internal temperature.
P Internal pressure.
H Internal enthalpy.
1 Model Library 37
gas_tank_void Model: Additional Notes
Note the following information when using the gas_tank_void model:
• By default, the model behaves as a reversible pressure setter.
• Ideally, a flow setter or adsorption bed must be connected on each
stream.
• The model accepts any number of inlet and outlet streams.
• With the model as a node or junction, we recommend you use a minimum
volume of 1E-5 m3.
• With the model as a column void, we recommended you switch off the
heat of compression term as the unit is not assumed to be well mixed.
• Switching off the heat of compression term makes the model perform
similarly to Adsim 6.x and Aspen Adsim 10.0.
gas_valve Model
The gas_valve model simulates a simple linear valve, an ISA valve, or a
choked flow valve.
1 Model Library 38
Apply stop action No For a reversible
model, does the
Yes unit also act as a
non-return/check
valve?
Variable Description
Active_Specification For linear valves, depending on your choice for
Specifications Made Available, the following
specifications can be used:
0 = Valve fully off.
1 = Valve fully on (acts as a valve with high Cv).
2 = Make use of the value specified for Cv
(constant Cv).
3 = Make use of the value specified for Flowrate
(constant flowrate).
The specification can be changed during runtime.
1 Model Library 39
pUser_g_Heat_Capacity_Cv Gas heat capacity at constant
volume.
Variable Description
Cv_Calculated Equivalent linear valve Cv.
Ion-Exchange Models
The table lists the ion-exchange models available in Aspen Adsim. You
connect these models using the ionx_Material Connection stream.
Model Description
1 Model Library 40
ionx_bed Resin bed layers.
ionx_bed Model
The ionx_bed model simulates an ion-exchange unit in an ion-exchange
flowsheet. It acts as a container model for the ion-exchange resin layers and
their interconnections.
1 Model Library 41
ionx_bed Model: Results
There are no recommended results for the ionx_bed model.
ionx_feed Model
The ionx_feed model terminates an inlet/feed flowsheet boundary. Use it to
specify the ion concentration and bulk molar density of the stream. If
configured as a reversible model, the model acts as a product sink should the
flow reverse.
1 Model Library 42
Rhol_Fwd Bulk molar density Reversible model
ionx_feed_distrib Model
Use the ionx_feed_distrib model as a four-way valve within an ion-exchange
flowsheet. The model is reversible and contains two inlet and two outlet ports.
1 Model Library 43
ionx_feed_distrib Model: Specifications
Depending on how the ionx_feed_distrib model has been configured, you
need to specify one or more of these variables in the Specify table:
Variable Description
Mode Distribution setting:
1 = Process_In1 and Process_Out1 connected and flowrate
set to Flow. Zero flow for other streams.
2 = Process_Out1 and Process_Out2 connected and
flowrate set to Flow. Process_In1 set to zero flow.
3 = Process_In2 and Process_Out1 connected.
Process_In1 and Process_Out2 set to zero flow.
4 = Process_In1 set to Flow, Process_Out1 equal to the
sum of Process_In1 and Process_In2. Process_Out2 set to
zero flow.
Variable Description
Process_In1.F Volumetric flowrate of inlet stream 1.
ionx_interaction Model
Use the ionx_interaction model as part of the single bed modeling approach,
to record the profile of material received, then later replay this profile to
simulate returned material. The following information is recorded over time:
• Volumetric flowrate
• Ion concentration
1 Model Library 44
• Bulk molar density
Any type of bed interaction can be defined:
• Top-to-top
• Top-to-bottom
• Bottom-to-bottom
• Bottom-to-top
You specify the type of interaction through the connectivity (where material is
accepted from and returned to). During a run, interaction cannot be redefined
as connectivity is structural, so if you want more than one type of interaction,
use additional interaction models.
By acting as a pseudo-adsorbent bed, it is possible for the model to behave as
a bed at either constant or varying pressure. Use the Cycle Organizer to
define the steps between interactions.
Variable Description
F_Initial Average flowrate of returned material during a reverse
interaction.
1 Model Library 45
ionx_interaction Model: Results
There are no recommended results for the ionx_interaction model.
ionx_mix_multi_nr Model
The ionx_mix_multi_nr is a non-reversible model that combines any number
of input streams into a single output stream.
1 Model Library 46
Variable Description
Process_Out.F Volumetric flowrate of outlet.
ionx_mix_nr2 Model
ionx_mix_nr2 Model: Connectivity
These are the available connections for the ionx_mix_nr2 model:
Variable Description
Mode Input stream selection:
1 = Process_In1
2 = Process_In2
Variable Description
Process_In1.F Inlet 1 volumetric flowrate.
1 Model Library 47
Process_Out1.F Outlet volumetric flowrate.
ionx_mix_nr3 Model
The ionx_mix_nr2 model is a non-reversible model that selects an output
stream from one of three input streams.
Variable Description
Mode Input stream selection:
1 = Process_In1
2 = Process_In2
3 = Process_In3
Variable Description
Process_In1.F Inlet 1 volumetric flowrate.
1 Model Library 48
Process_In2.F Inlet 2 volumetric flowrate.
ionx_prod_distrib Model
Use the ionx_prod_distrib model as a four-way valve within an ion-exchange
flowsheet. The model is reversible and contains two inlet and two outlet ports.
Variable Description
Mode Distribution setting:
1 = Process_In1 and Process_Out1 connected and flowrate
set to Flow. Zero flow for other streams.
2 = Process_In1 and Process_In2 connected.
Process_Out1 and Process_Out2 set to zero flow.
3 = Process_In1 and Process_Out2 connected.
Process_In2 and Process_Out1 set to zero flow.
1 Model Library 49
ionx_prod_distrib Model: Results
Typical variables in the Results table for the ionx_prod_distrib model are:
Variable Description
Process_In1.F Volumetric flowrate of inlet stream 1.
ionx_product Model
Use the ionx_product model to terminate an outlet/product flowsheet
boundary. If configured as a reversible model, and should the flow reverse, it
acts as a feed unit, providing information on ion concentration and bulk molar
density.
1 Model Library 50
Variable Description Reversible/Non-reversible
model
C_Rev Ion concentration in Reversible model
reverse direction
ionx_split_nr2 Model
The ionx_split_nr2 is a non-reversible model that diverts an input stream to
one of two output streams.
1 Model Library 51
ionx_split_nr2 Model: Specifications
Depending on how the ionx_split_nr2 model has been configured, you need to
specify this variable in the Specify table:
Variable Description
Mode Output stream selection:
1 = Process_Out1
2 = Process_Out2
Variable Description
Process_In1.F Inlet 1 volumetric flowrate.
ionx_valve_nr Model
The ionx_valve_nr is a non-reversible model that controls the flowrate of an
inlet stream.
1 Model Library 52
Variable Description
Action_Specification Valve operation setting:
0 = Fully off.
1 = Used defined volumetric flowrate.
Variable Description
Process_In1.F Volumetric flowrate of inlet stream.
Liquid Models
The table lists the liquid phase models available in Aspen Adsim. You connect
these models using the liq_Material_Connection stream.
Model Description
liq_bed Adsorbent bed layers.
1 Model Library 53
liq_bed Model
The liq_bed model simulates a liquid adsorption bed unit in a liquid flowsheet.
It acts as a container model for the adsorbent layers and their
interconnections.
1 Model Library 54
liq_feed Model
The liq_feed model terminates an inlet/feed flowsheet boundary. Use it to
specify the material composition, temperature and pressure. If configured as
a reversible model, and should the flow reverse, it acts as a product sink.
1 Model Library 55
liq_feed Model: User Procedures Used
Depending on the model configuration, this user procedures is available for
the liq_feed model:
Cycle_Total_Material Total material fed into boundary for last cycle. Non-reversible model
Cycle_Total_Material_Fwd Total material fed into boundary for last cycle. Reversible model
Cycle_Total_Component Total component fed into boundary for last Non-reversible model
cycle.
Cycle_Total_Component_Fwd Total component fed into boundary for last Reversible model
cycle.
1 Model Library 56
into boundary for last cycle.
Cycle_Total_Energy Total energy fed into boundary for last cycle. Non-reversible model
Cycle_Total_Energy_Fwd Total energy fed into boundary for last cycle. Reversible model
Cycle_Total_Energy_Rev Total energy received at boundary for last cycle. Reversible model
liq_feed_distrib Model
The liq_feed_distrib model selects an output stream from one of two input
streams. The model is non-reversible.
Variable Description
Mode Inlet stream selection:
1 = Process_In1
2 = Process_In2
1 Model Library 57
liq_feed_distrib Model: User Procedures Used
There are no user procedures available for the liq_feed_distrib model.
Variable Description
Process_In1.F Volumetric flowrate of inlet stream 1.
liq_interaction Model
Use the liq_interaction model as part of the single bed modeling approach to
record the profile of material received, then later replay this profile to
simulate returned material. The following information is recorded over time:
• Volumetric flowrate
• Molar concentration
• Temperature
• Pressure
• Specific enthalpy
Any type of bed interaction can be defined:
• Top-to-top
• Top-to-bottom
• Bottom-to-bottom
• Bottom-to-top
You define the interaction type through the connectivity (where material is
accepted from, and returned to). During runtime, you cannot redefine the
interaction type as connectivity is structural, so if you want more than one
type of interaction, use additional interaction models.
By acting as a pseudo-adsorbent bed, it is possible for the model to behave as
a bed at either constant or varying pressure. The Cycle Organizer defines the
steps between successive interactions.
1 Model Library 58
Process_In liq_material_port (single) liq_Material_Connection
Variable Description
F_Initial Average flowrate of returned material during a reverse
interaction.
1 Model Library 59
• Each interaction unit handles multiples interacting pairs.
• The Cycle Organizer defines the interaction and profile times.
• The initial reverse values are used only in the first cycle.
• The variables F_Initial, C_Initial, T_Initial and P_Initial are used only in
the first cycle. For subsequent cycles, they are ignored.
liq_mix_multi Model
The liq_mix_multi_nr is a non-reversible model that combines any number of
input streams into a single output stream.
Variable Description
Process_Out1.F Volumetric flowrate of outlet.
liq_prod_distrib Model
The liq_prod_distrib model selects an output stream from one of three input
streams. The model is non-reversible.
1 Model Library 60
liq_prod_distrib Model: Connectivity
These are the available connections for the liq_prod_distrib model:
Variable Description
Mode Input stream selection:
1 = Process_In1
2 = Process_In2
3 = Process_In3
Variable Description
Process_In1.F Volumetric flowrate of inlet stream 1.
1 Model Library 61
liq_product Model
The liq_product model terminates an outlet/product flowsheet boundary. Use
it to receive material from the flowsheet. If configured as a reversible model,
and should the flow reverse, the model acts as a feed unit. You can define the
material composition and material temperature.
1 Model Library 62
properties, reversible model).
Cycle_Total_Material_Rev Total material fed into boundary for last Reversible model
cycle.
Cycle_Total_Component_R Total component fed into boundary for last Reversible model
ev cycle.
1 Model Library 63
Cycle_Avg_Composition_R Total average composition of component fed Reversible model
ev into boundary for last cycle.
Cycle_Total_Energy_Rev Total energy fed into boundary for last cycle. Reversible model
liq_split Model
The liq_split model diverts an input stream to one of two output streams. The
model is non-reversible.
Variable Description
Mode Output stream selection:
1 = Process_Out1
2 = Process_Out2
1 Model Library 64
liq_split Model: Results
Typical variables in the Results table for the liq_split model are:
Variable Description
Process_In1.F Inlet 1 volumetric flowrate.
liq_tank Model
The liq_tank model is a general purpose model that simulates adsorbent bed
deadspaces (voids) or intermediate tanks.
Variable Description
Tank_Volume Total volume of the tank/void.
1 Model Library 65
liq_tank Model: User Procedures Used
Depending on the model configuration, the user procedures available for the
liq_tank model are:
Variable Description
Process_In.F Inlet volumetric flowrate.
T Internal temperature.
liq_valve Model
The liq_valve model simulates a simple linear valve that relates flowrate to
the pressure difference across the unit.
1 Model Library 66
return/check valve.
Variable Description
Active_Specification Define which of the following specifications
will be used:
0 = Valve fully off.
1 = Valve fully on (acts as a valve with high
Cv).
2 = Make use of the value specified for Cv
(constant Cv).
3 = Make use of the value specified for
Flowrate (constant flowrate).
The specification can be changed during
runtime.
Variable Description
Cv_Calculated Equivalent linear valve Cv.
Miscellaneous Models
The table lists the miscellaneous models available in Aspen Adsim:
1 Model Library 67
Model Description
Dynamics_Inlet_Connect Used to link an Aspen Dynamics model
to the inlet of an Aspen Adsim model
(gas or liquid phase only).
Dynamics_Inlet_
Connect Model
The Dynamics_Inlet_Connect model connects an Aspen Dynamics model to
the inlet of either a gas or liquid Aspen Adsim model. The block maps
appropriate variables from the Aspen Dynamics port to the Aspen Adsim port,
taking into account differences in the port variables, units of measurement
and reversible stream conventions. Furthermore, for compatability with Aspen
Adsim's single bed approach for modeling multi-bed systems using a single
bed, you can activate additional expressions to allow the block to simulate
pseudo-continuous flow at the Aspen Adsim flowsheet boundary.
Only one of the two possible output ports can be active, so your Aspen
Dynamics stream can connect to a gas or liquid Aspen Adsim model, but not
both.
1 Model Library 68
Rigorous assumed by Aspen Dynamics
models present in the flowsheet.
All Aspen Adsim models assume
Rigorous physical property calls.
Is Dynamics Pressure Driven Checked or Unchecked Check when the Aspen Dynamics
models are pressure-driven.
Uncheck when they are flowrate-
driven.
Single Bed Approach Used Checked or Unchecked Check when the Aspen Adsim
flowsheet uses the single bed
approach to simulate a multi-
column system.
All these options are global. The changes are also reflected in the Globals
table found in the Simulation Explorer window.
Variable Description
Mode Active only when Aspen Adsim uses the single bed
approach. Toggle this variable between 0 and 1:
0 Indicates that no real material is passing the
flowsheet boundary, so a pseudo-flow profile is required.
1 Indicates that real material is passing the flowsheet
boundary.
1 Model Library 69
• The delay function generates pseudo-continuous flow through the Aspen
Dynamics port. Because of the intrinsic behaviour of the delay function,
some degradation in the results may be experienced.
• Aspen Adsim calculates the delay time that is needed to generate pseudo-
continuous flow as follows:
It determines the time difference between when the Mode variable
switches from 0 to 1, and from 1 to 0. Remember that 1 is used to
indicate real flow to the Aspen Adsim model.
For more information, see Connecting to Aspen Dynamics Flowsheets in
Chapter 7 of the Aspen Adsim Reference Guide.
Dynamics_Outlet_
Connect Model
The Dynamics_Outlet_Connect model connects an Aspen Dynamics model to
the outlet of either a gas or liquid Aspen Adsim model. The block maps
appropriate variables from the Aspen Dynamics port to the Aspen Adsim port,
taking into account differences in the port variables, units of measurement
and reversible stream conventions. Furthermore, for compatability with Aspen
Adsim's single bed approach for modeling multi-bed systems using a single
bed, you can activate additional expressions to allow the block to simulate
pseudo-continuous flow at the Aspen Adsim flowsheet boundary.
Only one of the two possible input ports can be active, so your Aspen
Dynamics stream can be connected to a gas or liquid Aspen Adsim model, but
not both.
Is Dynamics Pressure Driven Checked or Check when the Aspen Dynamics models
Unchecked are pressure-driven. Uncheck when they
1 Model Library 70
Unchecked are flowrate-driven.
Single Bed Approach Used Checked or Check when the Aspen Adsim flowsheet
Unchecked uses the single bed approach to simulate
a multi-column system.
All these options are global. The changes are also reflected in the Globals
table found in the Simulation Explorer window.
Variable Description
Mode Active only when Aspen Adsim uses the single bed
approach. Toggle this variable between 0 and 1:
0 Indicates that no real material is passing the
flowsheet boundary, so a pseudo-flow profile is required.
1 Indicates that real material is passing the flowsheet
boundary.
1 Model Library 71
• For more information, see Connecting to Aspen Dynamics Flowsheets in
Chapter 7 of the Aspen Adsim Reference Guide.
p_control model
The p_control model provides simple proportional control. The controller input
is the measured variable; the controller output is the manipulated variable.
You can influence the controller output as follows:
• Apply a clipping range.
• Normalize between user-defined minimum and maximum values.
OutputSignal ControlSignal
1 Model Library 72
Variable Description
Set Point Operator set point of controller.
Variable Description
I_In Input value.
1 Model Library 73
PID Model
Aspen Adsim uses the same PID model as Aspen Dynamics and Aspen
Custom Modeler. For a full description of this model, see the chapter on
control models in either the Aspen Dynamics Reference Manual or the Aspen
Custom Modeler Reference Manual.
ratio Model
The ratio model calculates a single output as the ratio of two inputs.
The input signal comes from an external source, and the output signal goes to
a manipulated external variable.
Input1
Output_
Input2
Input 1
Output _ =
Input 2
OutputSignal ControlSignal
1 Model Library 74
Static_Isotherm Model
The Static_Isotherm model fits isotherm parameters to static experimental
data. Use it as part of Aspen Adsim's estimation capability.
The model accesses the standard and user isotherms for the following
systems:
• Gas
• Ion-Exchange
• Liquid
Gas isotherm form Any valid isotherm for gas adsorbent Choice of gas phase
layer model. isotherm.
Liquid isotherm form Any valid isotherm for liquid adsorbent Choice of liquid phase
layer model. isotherm.
Ion exchange isotherm form Any valid isotherm for ion exchange Choice of ion-exchange
adsorbent layer model. isotherm.
Variable Description
Y Gas molefraction composition.
Ci Ion concentration.
IP Isotherm parameters.
1 Model Library 75
IAS isotherms.
T Temperature.
P Pressure.
Variable Description
W Gas loading
Wi Ion loading
Wl Liquid loading
IP Isotherm parameters
1 Model Library 76
universal_block Model
The universal_block model is a simple template block that allows you to use
flowsheet constraints to create a custom model that connects with other
Aspen Adsim models.
1 Model Library 77
universal_block Model: Results
There are no recommended results for the universal_block model.
1 Model Library 78
* Process_In_MLiq.Connection.F );
EndFor
//Energy balance
H_M1 * SIGMA( Process_In_MLiq.Connection.F )
= SIGMA( Process_In_MLiq.Connection.H
* Process_In_MLiq.Connection.F );
//Outlet enthalpy constraint
Process_Out_MLiq.Connection.H = H_M1;
EndWithin
1 Model Library 79
2 Writing Compliant User
Models
This chapter describes the basic template for creating user models that can be
linked to library models.
See the following topics for more information:
• Common elements for all user models
• Standard template for user models
• Gas specific user models
• Ion-exchange specific user models
• Liquid specific user models
Model Description
gas_Material_Connection Interconnect for gas library models.
Stream
gas_Material_Connection
Use the gas_Material_Connection stream to interconnect gas models on the
flowsheet. It uses g_Material_Port to pass the following information:
Y Molefraction composition.
T Absolute temperature.
P Pressure.
H Specific enthalpy.
Typically, you need not manually configure the source and destination model
types. With library models or custom models that follow the recommended
guidelines, these automatically reconfigure when you:
• Open the configure form for the stream.
• Open the configure form for library models.
• Click the Check & Initial option in the Flowsheet menu.
It is recommended to execute the Check & Initial option within the Flowsheet
menu, once the flowsheet has been constructed and the models configured.
Stream
ionx_Material_Connection
Use the ionx_Material_Connection stream to interconnect ion-exchange
models on the flowsheet. It uses i_Material_Port to pass the following
information:
C Ion concentration.
Typically, you need not manually configure the source and destination model
types. With library models or custom models that follow the recommended
guidelines, these automatically reconfigure when you:
• Open the configure form for the stream.
• Open the configure form for library models.
• Click the Check & Initial option in the Flowsheet menu.
It is recommended to execute the Check & Initial option within the Flowsheet
menu, once the flowsheet has been constructed and the models configured.
Stream
liq_Material_Connection
Use the liq_Material_Connection stream to interconnect liquid models on the
flowsheet. It uses liq_Material_Port to pass the following information:
C Molar concentration.
T Absolute temperature.
P Pressure.
H Specific enthalpy.
The following table lists the configurable options available for the
liq_Material_Connection stream:
Typically, you need not manually configure the source and destination model
types. With library models or custom models that follow the recommended
guidelines, these automatically reconfigure when you:
• Open the configure form for the stream.
• Open the configure form for library models.
• Click the Check & Initial option in the Flowsheet menu.
It is recommended to execute the Check & Initial option within the Flowsheet
menu, once the flowsheet has been constructed and the models configured.
4 User Procedures 87
Adding Procedures
To add an additional procedure to the compiled library:
1 From the Tools menu, click Procedure Organizer.
2 Select the box next to the procedure name.
This copies a Fortran template into the current working directory.
Editing Procedures
To edit the Fortran source for the procedure:
1 From the Tools menu, click Procedure Organizer.
2 Select the procedure from the list and click the Edit button.
A text editor window opens, where you edit the source code.
4 User Procedures 88
Two build options are available:
− Local PC executes the build and creates a general build file.
− Remote Windows 2000 or XP PC creates a general build file only (no
compilation).
These are discussed below.
To generate debug code for the compilation, select the Generate Debug
Code box.
See the Local PC option, above, for rules on where to place the compiled
library.
4 User Procedures 89
Gas Procedures
For gas phase systems, the following procedure calls are available:
4 User Procedures 90
based).
Procedure pUser_Act_Coeff
Procedure name: pUser_Act_Coeff
Fortran subroutine: pUgActCoeff
Fortran template:
SUBROUTINE pUgActCoeff(T,P,X,NX,Gamma,NGamma,IFail)
IMPLICIT NONE
INTEGER NX,NGamma,IFail,I
DOUBLE PRECISION T,P,X(NX),Gamma(NGamma)
C.....Return a fail
Ifail = 4
4 User Procedures 91
RETURN
END
Procedure pUser_g_Avg_Mole_Weight
Procedure name: pUser_g_Avg_Mole_Weight
Fortran subroutine: pUAvMolW
Fortran template:
SUBROUTINE pUAvMolW(Y,NY,AMW,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION Y(NY),AMW
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Cat_RX_Heat
Procedure name: pUser_g_Cat_RX_Heat
Fortran subroutine: pUgCtHt
Fortran template:
SUBROUTINE pUgCtHt(T,Y,NY,HR,NHR,IFail)
IMPLICIT NONE
4 User Procedures 92
C......FLAGS:
C.......IFail - 1 = Normal, continue execution
C....... 2 = Warning, continue execution
C....... 3 = Serious Warning, continue execution
C....... 4 = Fatal error, stop execution immediately
INTEGER NY,NHR,IFail,I
DOUBLE PRECISION T,Y(NY),HR(NHR)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Cat_RX_Rate_C
Procedure name: pUser_g_Cat_RX_Rate_C
Fortran subroutine: pUgCtc
Fortran template:
SUBROUTINE
pUgCtc(T,P,C,NC,Rcomp,NRcomp,Rreac,NRreac,IFail)
IMPLICIT NONE
INTEGER NC,NRcomp,NRreac,IFail,I
DOUBLE PRECISION
T,P,C(NC),Rcomp(NRcomp),Rreac(NRreac)
4 User Procedures 93
ENDDO
DO i=1,Nrreac
Rreac(i) = 0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Cat_RX_
Rate_C_Sol
Procedure name: pUser_g_Cat_RX_Rate_C_Sol
Fortran subroutine pUgCtSlc
Fortran template:
SUBROUTINE pUgCtSlc(T,P,C,NC,CSol,NCSol,
&
Rcomp,NRcomp,Rreac,NRreac,Rsol,NRsol,IFail)
IMPLICIT NONE
INTEGER
NC,NCSol,NRcomp,NRreac,NRsol,IFail,I
DOUBLE PRECISION T,P,C(NC),CSol(NCSol),
&
Rcomp(NRcomp),Rreac(NRreac),Rsol(NRsol)
4 User Procedures 94
Rreac(i) = 0
ENDDO
DO i=1,Nrsol
Rsol(i) = 0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Cat_RX_Rate_Pp
Procedure name: pUser_g_Cat_RX_Rate_Pp
Fortran subroutine: pUgCt
Fortran Template:
SUBROUTINE
pUgCt(T,P,Y,NY,Rcomp,NRcomp,Rreac,NRreac,IFail)
IMPLICIT NONE
INTEGER NY,NRcomp,NRreac,IFail,I
DOUBLE PRECISION
T,P,Y(NY),Rcomp(NRcomp),Rreac(NRreac)
C.......Return a fail
IFail = 4
4 User Procedures 95
RETURN
END
Procedure
pUser_g_Cat_RX_Rate_Pp_Sol
Procedure name: pUser_g_Cat_RX_Rate_Pp_Sol
Fortran subroutine: pUgCtSl
Fortran template:
SUBROUTINE pUgCtSl(T,P,Y,NY,CSol,NCSol,
&
Rcomp,NRcomp,Rreac,NRreac,Rsol,NRsol,IFail)
IMPLICIT NONE
INTEGER
NY,NCSol,NRcomp,NRreac,NRsol,IFail,I
DOUBLE PRECISION T,P,Y(NY),CSol(NCSol),
&
Rcomp(NRcomp),Rreac(NRreac),Rsol(NRsol)
C.......Return a fail
4 User Procedures 96
IFail = 4
RETURN
END
Procedure pUser_g_Compressibility
Procedure name: pUser_g_Compressibility
Subroutine name: pUgComp
Fortran template:
SUBROUTINE pUgComp(T,P,Y,NY,LayerID,Z,IFail)
IMPLICIT NONE
INTEGER NY,LayerID,Ifail
DOUBLE PRECISION T,P,Y(NY),Z
C.......Return Compressibility
Z = 1d0
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Cpa
Procedure name: pUser_g_Cpa
Fortran subroutine: pUgCpa
Fortran template:
SUBROUTINE
pUgCpa(T,P,W,NW,CC,NC,LayerID,Cpa,NCpa,IFail)
IMPLICIT NONE
4 User Procedures 97
C.....Variables passed are:
C......INPUT:
C.......T - Temperature
C.......P - Pressure
C.......W(NW) - Component loading
C.......C(NC) - Component concentration
C.......LayerID - Bed layer that made call
C......OUTPUT:
C.......Cpa(NCpa) - Heat capacities of adsorbed phase
C......FLAGS:
C.......IFail - 1 = Normal, continue execution
C....... 2 = Warning, continue execution
C....... 3 = Serious Warning, continue execution
C....... 4 = Fatal error, stop execution immediately
INTEGER NW,NC,LayerID,NCpa,IFail,I
DOUBLE PRECISION T,P,W(NW),CC(NC),Cpa(NCpa)
DO i=1,Ncpa
Cpa(i) = 0.1d0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_De
Procedure name: pUser_g_De
Fortran subroutine: pUgDe
Fortran template:
SUBROUTINE pUgDe(T,P,W,NW,LayerID,
& De,NDe,IFail)
IMPLICIT NONE
4 User Procedures 98
C....... 2 = Warning, continue execution
C....... 3 = Serious Warning, continue execution
C....... 4 = Fatal error, stop execution immediately
INTEGER NDe,LayerID,NW,IFail,I
DOUBLE PRECISION T,P,W(NW),De(NDe)
C.......Return Loadings
DO i=1,Nde
De(i) = 1.0d-9
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_DH
Procedure name: pUser_g_DH
Fortran subroutine: pUgDH
Fortran template:
SUBROUTINE
pUgDH(T,P,W,NW,C,NC,IP,NIP,NIC,LayerID,DH,NDH,IFail)
IMPLICIT NONE
INTEGER NW,NC,LayerID,NDH,IFail,I
DOUBLE PRECISION T,P,W(NW),C(NC),IP(NIP,NIC),DH(NDH)
4 User Procedures 99
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Diffusivity
Procedure name: pUser_g_Diffusivity
Fortran subroutine: pUgDiff
Fortran template:
SUBROUTINE pUgDiff(T,P,Y,NY,D,ND,IFail)
IMPLICIT NONE
INTEGER NY,ND,IFail,I
DOUBLE PRECISION T,P,Y(NY),D(ND)
DO I=1,ND
D(I) = 1.0D-6
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Dispersion
Procedure name: pUser_g_Dispersion
Fortran subroutine: pUgDisp
Fortran template:
SUBROUTINE pUgDisp(RHOg,Vg,AMW,LayerID,Ez,NEz,IFail)
IMPLICIT NONE
INTEGER NEz,LayerID,IFail,I
DOUBLE PRECISION RHOg,Vg,AMW,Ez(NEz)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Enthalpy_Mol
Procedure name: pUser_g_Enthalpy_Mol
Fortran subroutine: pUgEnthM
Fortran template:
SUBROUTINE pUgEnthM(T,P,Y,NY,H,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION T,P,Y(NY),H
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Entropy_Mol
Procedure name: pUser_g_Entropy_Mol
Fortran subroutine: pUgEntrM
Fortran template:
SUBROUTINE pUgEntrM(T,P,Y,NY,E,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION T,P,Y(NY),E
C.......Return Entropy
E = 0d0
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Gas_RX_Heat
Procedure name: pUser_g_Gas_RX_Heat
Fortran subroutine: pUgGsHt
Fortran template:
IMPLICIT NONE
INTEGER NY,NHR,IFail,I
DOUBLE PRECISION T,Y(NY),HR(NHR)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Gas_RX_Rate_C
Procedure name: pUser_g_Gas_RX_Rate_C
Fortran subroutine: pUgGsRtc
Fortran template:
SUBROUTINE
pUgGsRtc(T,P,C,NC,Rcomp,NRcomp,Rreac,NRreac,IFail)
IMPLICIT NONE
INTEGER NC,NRcomp,NRreac,IFail,I
DOUBLE PRECISION
T,P,C(NC),Rcomp(NRcomp),Rreac(NRreac)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Gas_RX_Rate_Pp
Procedure name: pUser_g_Gas_RX_Rate_Pp
Fortran subroutine: pUgGsRt
Fortran template:
SUBROUTINE
pUgGsRt(T,P,Y,NY,Rcomp,NRcomp,Rreac,NRreac,IFail)
IMPLICIT NONE
INTEGER NY,NRcomp,NRreac,IFail,I
DOUBLE PRECISION
T,P,Y(NY),Rcomp(NRcomp),Rreac(NRreac)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Gibbs
Procedure name: pUser_g_Gibbs
Fortran subroutine: pUgGibbs
Fortran template:
SUBROUTINE
pUgGibbs(T,P,Poi,NPoi,IP,NIP,NComp,LayerID,
& G,NG,IFail)
IMPLICIT NONE
INTEGER NPoi,NIP,NComp,LayerID,NG,IFail,I
DOUBLE PRECISION T,P,Poi(NPoi),IP(NIP,NComp),G(NG)
C.......Return a fail
IFail = 4
Procedure pUser_g_Heat_Capacity_Cv
Procedure name: pUser_g_Heat_Capacity_Cv
Fortran subroutine: pUgHCapMCv
Fortran template:
SUBROUTINE pUgHCapMCv(T,P,Y,NY,Cv,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION T,P,Y(NY),Cv
C.......Return a fail
IFail = 4
RETURN
END
Procedure
pUser_g_Heat_Capacity_Mol
Procedure name: pUser_g_Heat_Capacity_Mol
Fortran subroutine: pUgHCapM
Fortran template:
SUBROUTINE pUgHCapM(T,P,Y,NY,Cp,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION T,P,Y(NY),Cp
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Henry
Procedure name: pUser_g_Henry
Fortran subroutine: pUgHenry
Fortran template:
SUBROUTINE pUgHenry(T,X,NX,IP,NIP,NComp,LayerID,
& Hen,NHen,IFail)
IMPLICIT NONE
INTEGER NX,NIP,NComp,LayerID,NHen,IFail,I
DOUBLE PRECISION T,X(NX),IP(NIP,NComp),Hen(NHen)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_HTC
Procedure name: pUser_g_HTC
Fortran subroutine: pUgHTC
Fortran template:
SUBROUTINE
pUgHTC(T,P,Y,NY,Vg,LDens,AMW,Rp,MU,Ei,Cp,Kg,
& LayerID,HTC,IFail)
IMPLICIT NONE
INTEGER NY,LayerID,Ifail
DOUBLE PRECISION
T,P,Y(NY),Vg,LDens,AMW,Rp,MU,Ei,Cp,Kg,HTC
RETURN
END
Procedure pUser_g_Isotherm_C
Procedure name: pUser_g_Isotherm_C
Fortran subroutine: pUgIsoC
Fortran template:
SUBROUTINE pUgIsoC(T,P,C,NC,IP,NIP,NComp,LayerID,
& W,NW,IFail)
IMPLICIT NONE
INTEGER NC,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION T,P,C(NC),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NW
W(i) = 0d0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
IMPLICIT NONE
INTEGER NY,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION T,P,Y(NY),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NW
W(i) = 0d0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Isotherm_Poi
Procedure name: pUser_g_Isotherm_Poi
Fortran subroutine: pUgIsoPo
Fortran template:
SUBROUTINE
pUgIsoPo(T,P,Poi,NPoi,IP,NIP,NComp,LayerID,
& W,NW,IFail)
IMPLICIT NONE
INTEGER NPoi,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION T,P,Poi(NPoi),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NW
W(i) = 0d0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Isotherm_W
Procedure name: pUser_g_Isotherm_W
Fortran subroutine: pUgIsoW
Fortran template:
SUBROUTINE pUgIsoW(T,P,W,NW,IP,NIP,NComp,LayerID,
& C,NC,IFail)
IMPLICIT NONE
INTEGER NC,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION T,P,C(NC),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NC
C(i) = 0d0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Kg
Procedure name: pUser_g_Kg
Fortran subroutine: pUgKg
Fortran template:
SUBROUTINE
pUgKg(T,P,Y,NY,LDens,Cp,Ez,NEz,LayerID,Kg,IFail)
IMPLICIT NONE
INTEGER NY,NEz,LayerID,Ifail
DOUBLE PRECISION T,P,Y(NY),LDens,Cp,Ez(NEz),Kg
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Kinetic
Procedure name: pUser_g_Kinetic
Fortran subroutine: pUgRate
Fortran template:
SUBROUTINE
pUgRate(Tg,Ts,P,X,NX,Xs,NXs,Rp,Ei,Ep,Z,AMW,MW,NMW,
& RHOs,LayerID,dWdT,NdWdT,IFail)
IMPLICIT NONE
INTEGER NX,NXs,NMW,LayerID,NdWdT,IFail,I
DOUBLE PRECISION
Tg,Ts,P,X(NX),Xs(NXs),Rp,Ei,Ep,Z,AMW,MW(NMW),
& RHOs,dWdT(NdWdT)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_KmacKmic
Procedure name: pUser_g_KmacKmic
Fortran subroutine: pUgKmKm
Fortran template:
SUBROUTINE pUgKmKm(T,P,C,NC,Z,Vg,LayerID,
& Kmac,NKmac,Kmic,NKmic,IFail)
IMPLICIT NONE
INTEGER NC,LayerID,NKmac,NKmic,IFail,I
DOUBLE PRECISION
T,P,C(NC),Z,Vg,Kmac(NKmac),Kmic(NKmic)
C.......Return a fail
IFail = 4
Procedure pUser_g_Mole_Weights
Procedure name: pUser_g_Mole_Weights
Fortran subroutine: pUMolWts
Fortran template:
SUBROUTINE pUMolWts(MW,NMW,IFail)
IMPLICIT NONE
INTEGER NMW,IFail,I
DOUBLE PRECISION MW(NMW)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_MTC
Procedure name: pUser_g_MTC
Fortran subroutine: pUgMTC
Fortran template:
SUBROUTINE pUgMTC(T,P,C,NC,Z,Vg,LayerID,
& MTC,NMTC,IFail)
IMPLICIT NONE
INTEGER NC,LayerID,NMTC,IFail,I
DOUBLE PRECISION T,P,C(NC),Z,Vg,MTC(NMTC)
C.......Return a fail
IFail = 4
RETURN
END
Procedure
pUser_g_Pump_Performance
Procedure name: pUser_g_Pump_Performance
Fortran subroutine: pUgPPer
Fortran template:
SUBROUTINE pUgPPer(Pin,Pout,T,CharNo,Vin,Eff,IFail)
IMPLICIT NONE
INTEGER CharNo,Ifail
DOUBLE PRECISION Pin,Pout,T,Vin,Eff
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_g_Viscosity
Procedure name: pUser_g_Viscosity
Fortran subroutine: pUgVisc
Fortran template:
SUBROUTINE pUgVisc(T,P,Y,NY,Visc,IFail)
IMPLICIT NONE
INTEGER NY,Ifail
DOUBLE PRECISION T,P,Y(NY),Visc
C.......Return Viscosity
Visc = 1e-5
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_i_Dispersion
Procedure name: pUser_i_Dispersion
Fortran subroutine: pUiEz
Fortran template:
SUBROUTINE pUiEz(RHOl,Vl,AMW,LayerID,Ez,NEz,IFail)
IMPLICIT NONE
INTEGER LayerID,NEz,IFail,I
DOUBLE PRECISION RHOl,Vl,AMW,Ez(NEz)
C.......Return a fail
IFail = 4
Procedure pUser_i_Isotherm_C
Procedure name: pUser_i_Isotherm_C
Fortran subroutine: pUiIsoC
Fortran template:
SUBROUTINE
pUiIsoC(Conc,NConc,Q,IP,NIP,NComp,LayerID,W,NW,IFail)
IMPLICIT NONE
INTEGER NConc,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION Conc(NConc),Q,IP(NIP,NComp),W(NW)
C.......Return loading
DO i=1,NW
W(i) = 1d-10
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_i_Isotherm_W
Procedure name: pUser_i_Isotherm_W
Fortran subroutine: pUiIsoW
Fortran template:
IMPLICIT NONE
INTEGER NConc,NIP,NComp,LayerID,NW,IFail,I
DOUBLE PRECISION Conc(NConc),Q,IP(NIP,NComp),W(NW)
C.......Return loading
DO i=1,Nconc
Conc(i) = 1d-10
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_i_Kinetic
Procedure name: pUser_i_Kinetic
Fortran subroutine: pUiKin
Fortran template:
SUBROUTINE
pUiKin(X,NX,Xs,NXs,Rp,Ei,Ep,RHOs,Vl,Q,LayerID,
& dWdT,NdWdT,IFail)
IMPLICIT NONE
INTEGER NX,NXs,LayerID,NdWdT,IFail,I
DOUBLE PRECISION
X(NX),Xs(NXs),RP,Ei,Ep,RHOs,Vl,Q,dWdT(NdWdT)
C.......Return loadings
DO i=1,NdWdT
dWdT(i) = 0
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_i_MTC
Procedure name: pUser_i_MTC
Fortran subroutine: pUiMTC
Fortran template:
SUBROUTINE
pUiMTC(Conc,NConc,Vl,Rp,LayerID,MTC,NMTC,IFail)
IMPLICIT NONE
INTEGER NConc,LayerID,NMTC,IFail,I
DOUBLE PRECISION Conc(NConc),Vl,Rp,MTC(NMTC)
C.......Return a fail
IFail = 4
RETURN
END
Liquid Procedures
For liquid phase systems, the following procedure calls are available:
Procedure pUser_l_Avg_Mole_Weight
Procedure name: pUser_l_Avg_Mole_Weight
Fortran subroutine: pUlAvMolW
Fortran template:
SUBROUTINE pUlAvMolW(X,NX,AMW,IFail)
IMPLICIT NONE
INTEGER NX,Ifail
DOUBLE PRECISION X(NX),AMW
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Density_Mass
Procedure name: pUser_l_Density_Mass
Fortran subroutine: pUlDMass
Fortran template:
SUBROUTINE pUlDMass(T,P,X,NX,LDens,IFail)
IMPLICIT NONE
INTEGER NX,Ifail
DOUBLE PRECISION T,P,X(NX),Ldens
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_DH
Procedure name: pUser_l_DH
Fortran subroutine: pUlDH
Fortran template:
SUBROUTINE
pUlDH(T,P,W,NW,C,NC,IP,NIP,NIC,DH,NDH,IFail)
IMPLICIT NONE
INTEGER NW,NC,NIP,NIC,NDH,IFail,I
DOUBLE PRECISION T,P,W(NW),C(NC),DH(NDH),IP(NIP,NIC)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Dispersion
Procedure name: pUser_l_Dispersion
Fortran subroutine: pUlDisp
Fortran template:
SUBROUTINE pUlDisp(LDens,Vl,AMW,LayerID,Ez,NEz,IFail)
IMPLICIT NONE
INTEGER NEz,LayerID,IFail,I
DOUBLE PRECISION LDens,Vl,AMW,Ez(NEz)
C.......Return a fail
IFail = 4
RETURN
END
INTEGER NX,Ifail
DOUBLE PRECISION T,P,X(NX),H
C.......Return Enthalpy
H = 0d0
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Gibbs
Procedure name: pUser_l_Gibbs
Fortran subroutine: pUlGibbs
Fortran template:
SUBROUTINE
pUlGibbs(T,C,NC,IP,NIP,NComp,LayerID,G,NG,IFail)
IMPLICIT NONE
INTEGER NC,NIP,NComp,LayerID,NG,IFail,I
DOUBLE PRECISION T,C(NC),IP(NIP,NComp),G(NG)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Heat_Capacity_Mol
Procedure name: pUser_l_Heat_Capacity_Mol
Fortran subroutine: pUlCp
Fortran template:
SUBROUTINE pUlCp(T,P,X,NX,Cp,IFail)
IMPLICIT NONE
INTEGER NX,Ifail
DOUBLE PRECISION T,P,X(NX),Cp
C.......Return a fail
RETURN
END
Procedure pUser_l_HTC
Procedure name: pUser_l_HTC
Fortran subroutine: pUlHTC
Fortran template:
SUBROUTINE
pUlHTC(T,P,X,NX,Vl,LDens,AMW,Rp,Visc,Ei,Cp,K,
& HTC,IFail)
IMPLICIT NONE
INTEGER NX,Ifail
DOUBLE PRECISION
T,P,X(NX),Vl,LDens,AMW,Rp,Visc,Ei,Cp,K,HTC
C.......Return a fail
IFail = 4
RETURN
END
IMPLICIT NONE
INTEGER NC,NIP,NComp,NW,LayerID,IFail,I
DOUBLE PRECISION T,C(NC),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NW
W(i) = 1d-10
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Isotherm_W
Procedure name: pUser_l_Isotherm_W
Fortran subroutine: pUlIsoW
Fortran template:
SUBROUTINE
pUlIsoW(T,W,NW,IP,NIP,NComp,LayerID,C,NC,IFail)
IMPLICIT NONE
INTEGER NC,NIP,NComp,NW,LayerID,IFail,I
DOUBLE PRECISION T,C(NC),IP(NIP,NComp),W(NW)
C.......Return Loadings
DO i=1,NC
C(i) = 1d-10
ENDDO
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Kinetic
Procedure name: pUser_l_Kinetic
Fortran subroutine: pUlRate
Fortran template:
SUBROUTINE
pUlRate(Tl,Ts,P,X,NX,Xs,NXs,Rp,Ei,Ep,AMW,MW,NMW,
& Rhos,LayerID,J,NJ,IFail)
IMPLICIT NONE
INTEGER NX,NXs,NMW,LayerID,NJ,IFail,I
DOUBLE PRECISION
Tl,Ts,P,X(NX),Xs(NXs),Rp,Ei,Ep,AMW,MW(NMW),
& Rhos,J(NJ)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Kl
Procedure name: pUser_l_Kl
Fortran subroutine: pUlKl
Fortran template:
SUBROUTINE pUlKl(T,P,X,NX,LDens,Cp,Ez,NEz,Kl,IFail)
IMPLICIT NONE
INTEGER NX,NEz,Ifail
DOUBLE PRECISION T,P,X(NX),LDens,Cp,Ez(NEz),Kl
C.......Return Conductivity
Kl = 1d-3
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_KmacKmic
Procedure name: pUser_l_KmacKmic
Fortran subroutine: pUlKmKm
Fortran template:
SUBROUTINE pUlKmKm(T,P,XS,NXS,Cms,NCMS,W,NW,V,
& LayerID,Kmac,NKmac,Kmic,
& NKmic,IFAIL)
IMPLICIT NONE
INTEGER NXS,NCMS,NW,LayerID,NKmac,NKmic,IFAIL,I
DOUBLE PRECISION T,P,XS(NXS),Cms(NCMS),W(NW),V,
& Kmac(NKmac),Kmic(NKmic)
C.......Return a fail
IFAIL = 4
RETURN
END
Procedure pUser_l_Mole_Weights
Procedure name: pUser_l_Mole_Weights
Fortran subroutine: pUlMolWts
Fortran template:
SUBROUTINE pUlMolWts(MW,NMW,IFail)
IMPLICIT NONE
INTEGER NMW,IFail,I
DOUBLE PRECISION MW(NMW)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_MTC
Procedure name: pUser_l_MTC
Fortran subroutine: pUlMTC
Fortran template:
SUBROUTINE pUlMTC(T,P,C,NC,Vl,LayerID,MTC,NMTC,IFail)
IMPLICIT NONE
INTEGER NC,LayerID,NMTC,IFail,I
DOUBLE PRECISION T,P,C(NC),Vl,MTC(NMTC)
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_l_Viscosity
Procedure name: pUser_l_Viscosity
Fortran subroutine: pUlVisc
Fortran template:
SUBROUTINE pUlVisc(T,P,X,NX,Visc,IFail)
IMPLICIT NONE
C.......Return Viscosity
Visc = 1e-5
C.......Return a fail
IFail = 4
RETURN
END
Miscellaneous Procedures
The following miscellaneous procedures are available:
Procedure pUser_Flash
Procedure name: pUser_Flash
Fortran subroutine name: pUFlash
Fortran template:
SUBROUTINE pUFlash(T,P,Z,NZ,Y,NY,X,NX,VF,HV,HL,IFail)
IMPLICIT NONE
INTEGER NZ,NY,NX,IFail,I
DOUBLE PRECISION T,P,Z(NZ),Y(NY),X(NX),VF,HV,HL
C.......Return a fail
IFail = 4
RETURN
END
Procedure pUser_KValues
Procedure name: pUser_Kvalues
Fortran subroutine: pUKValues
Fortran template:
SUBROUTINE pUKValues(T,P,X,NX,Y,NY,K,NK,IFail)
IMPLICIT NONE
INTEGER NY,NX,NK,IFail,I
DOUBLE PRECISION T,P,X(NX),Y(NY),K(NK)
C.......Return a fail
IFail = 4
The Block Properties dialog box lists the name of the block, and more
importantly, the name of the model that will be used. This is the name of the
submodel.
For example, consider the isotherm example. The isotherm submodel is gas
phase. The model gUserIsothermC to be edited can then be found in the
folder Custom Modeling\Submodels_User\Gas:
Right-click the model and select edit. In the editor window, enter the required
expressions and compile before closing.
For example, to refer to the variable C in the gas concentration user isotherm
submodel, you need to provide this path:
Bed1.Layer(1).Isotherm(1).User_Conc_Isotherm(1).C
Name Description
gUserCompressibilty User compressibility calculation (for bed
models).
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as Hidden IntegerSet([1:20]);
Z(FDESet) as Positive;
P(FDESet) as Pressure;
T(FDESet) as Temperature_K;
Y(FDESet,ComponentList) as MoleFraction;
End
// Define Variables
Tank_Void_ID as IntegerParameter(1);
Z as Positive;
P as Pressure;
T as Temperature_K;
Y(ComponentList) as MoleFraction;
End
END
End
Layer_ID as IntegerParameter(1);
FDESet as Hidden IntegerSet([1:20]);
Ez(FDEset,ComponentList) as Dispersion;
RHOG(FDESet) as g_Density_Mol;
Vg(FDEset) as Superficial_Velocity;
AMW(FDEset) as MolarWeight;
// Calculate value
/* Sample default to ensure problem remains square
Ez = 1e-10;
*/
End
Nodes as IntegerParameter(20);
Layer_ID as IntegerParameter(1);
FDEset as IntegerSet([1:Nodes]);
Ts(FDEset) as Temperature_K;
P(FDEset) as Pressure;
W(FDEset,ComponentList) as g_Loading;
De(FDEset,ComponentList) as g_Diffusivity;
/*
De = 1e-9;
*/
END
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as Notype;
X(FDESet,ComponentList) as Notype;
Henry(FDESet,ComponentList) as Notype;
T(FDESet) as Temperature_K;
End
// Calculate HTC
/* Sample default to ensure problem remains square
HTC = 0;
*/
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as Notype;
C(FDESet,ComponentList) as g_Conc_Mol;
W(FDESet,ComponentList) as g_Loading;
T(FDESet) as Temperature_K;
P(FDESet) as Pressure;
// Calculate loading
/* Sample default to ensure problem remains square
W = 0;
*/
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as Notype;
Poi(FDESet,ComponentList) as g_Pressure_Vapour;
W_Pure(FDESet,ComponentList) as g_Loading;
T(FDESet) as Temperature_K;
P(FDESet) as Pressure;
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as Notype;
Y(FDESet,ComponentList) as MoleFraction;
W(FDESet,ComponentList) as g_Loading;
T(FDESet) as Temperature_K;
P(FDESet) as Pressure;
// Calculate loading
/* Sample default to ensure problem remains square
W = 0;
*/
End
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
Rhog(FDESet) as g_Density_Mol;
T(FDESet) as Temperature_K;
P(FDESet) as Pressure;
Y(FDESet,ComponentList) as MoleFraction;
Cvg(FDESet) as g_Heat_Capacity;
Kg(FDESet) as g_Conductivity;
Ez(FDESet,ComponentList) as Dispersion;
// Calculate Kg
/* Sample default to ensure problem remains square
Kg = 0.16e-6;
*/
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
RtP([1:4],ComponentList) as Notype;
Ei as VoidageBed;
Ep as VoidageBead;
Z(FDESet) as Positive;
Rp as Length;
RHOs as s_Density_Mass;
Tg(FDESet),Ts(FDESet) as Temperature_K;
P(FDESet) as Pressure;
X(FDESet,ComponentList),Xs(FDESet,ComponentList) as
Notype;
dWdT(FDESet,ComponentList) as Notype;
AMW(FDESet),MW(ComponentList) as MolarWeight;
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
Ts(FDESet) as Temperature_K;
P(FDESet) as Pressure;
C(FDESet,ComponentList) as g_Conc_Mol;
Z(FDESet) as Positive;
Vg(FDESet) as Superficial_Velocity;
Kmac(FDESet,ComponentList) as g_Mass_Trans_Coeff;
Kmic(FDESet,ComponentList) as g_Mass_Trans_Coeff;
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
Ts(FDESet) as Temperature_K;
P(FDESet) as Pressure;
C(FDESet,ComponentList) as g_Conc_Mol;
Z(FDESet) as Positive;
Vg(FDESet) as Superficial_Velocity;
MTC(FDESet,ComponentList) as g_Mass_Trans_Coeff;
End
Name Description
iUserDispersion Axial dispersion coefficient.
iUserIsotherm Isotherm.
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
Ez(FDEset,ComponentList) as DISPERSION;
RHOl(FDESet) as i_Density_Mol;
Vl as Superficial_Velocity;
AMW as MolarWeight;
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as Notype;
C(FDESet,ComponentList) as i_Conc_Eq;
Q as i_Loading_Eq;
W(FDESet,ComponentList) as i_Loading_Eq;
// Calculate loading
/* Sample default to ensure problem remains square
For fde in FDEset do
W(fde,ComponentList - ["CounterIon"]) = 0;
EndFor
*/
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
V as Superficial_Velocity;
Rp as Length;
Ei as VoidageBed;
Ep as VoidageBead;
Rhos as s_density_mass;
Q as i_loading_eq;
X(FDESet,ComponentList - ["CounterIon"]) As NoType;
Xs(FDESet,ComponentList - ["CounterIon"]) As NoType;
dWdT(FDESet,ComponentList - ["CounterIon"]) As NOTYPE;
End
// Define Variables
End
Name Description
lUserDH Heats of adsorption.
lUserIsotherm Isotherm.
End
// Define variables
FDESet as IntegerSet([1:20]);
Layer_ID as IntegerParameter(1);
Ez(FDESet,ComponentList) as Dispersion;
Vl(FDESet) as Superficial_Velocity;
AMW(FDESet) as MolarWeight;
RHOl(FDESet) as l_Density_Mol;
End
// Statistical Langmuir
/* Sample default to ensure problem remains square
For fde in FDESet do
For component in ComponentList do
G(fde,component) = 0;
EndFor
EndFor
*/
End
// Calculate HTC
/* Sample default to ensure problem remains square
HTC = 0;
*/
End
// Define Variables
Layer_ID as IntegerParameter(1);
FDESet as IntegerSet([1:20]);
IsoParSet as IntegerSet([1:8]);
IP(IsoParSet,ComponentList) as NOTYPE;
T(FDESet) as Temperature_K;
X(FDESet,ComponentList) as l_Conc_Mol;
W(FDESet,ComponentList) as l_Loading;
End
// Define Variables
FDESet as IntegerSet([1:20]);
Layer_ID as IntegerParameter(1);
Tl(FDESet),Ts(FDESet) as Temperature_K;
P(FDESet) as Pressure;
Rp as Length;
Ei as VoidageBed;
Ep as VoidageBead;
AMW(FDEset),MW(ComponentList) as MolarWeight;
RHOs as s_Density_Mass;
X(FDESet,ComponentList) As NoType;
Xs(FDESet,ComponentList) As NoType;
J(FDESet,ComponentList) As NoType;
End
FDESet as IntegerSet([1:20]);
Rhol(FDESet) as l_Density_Mol;
T(FDESet) as Temperature_K;
P(FDESet) as Pressure;
X(FDESet,ComponentList) as MoleFraction;
Cpl(FDESet) as l_Heat_Capacity;
Kl(FDESet) as l_Conductivity;
Ez(FDESet,ComponentList) as Dispersion;
// Calculate Kg
/* Sample default to ensure problem remains square
Kl = 0.16e-6;
*/
FDEset as IntegerSet([1:20]);
Layer_ID as IntegerParameter;
Ts(FDEset) as Temperature_K;
P(FDEset) as Pressure;
Cms(FDEset,ComponentList) as l_Conc_Mol;
W(FDEset,ComponentList) as l_Loading;
Vl(FDEset) as Superficial_Velocity;
Kmac(FDESet,ComponentList) as l_Mass_Trans_Coeff;
Kmic(FDESet,ComponentList) as l_Mass_Trans_Coeff;
Xs(FDESet,ComponentList) as RealVariable;
/* Sample
For comp in ComponentList Do
For fde in FDESet Do
Kmac(fde,comp) = 1.0e-10;
Kmic(fde,comp) = 1.0e-10;
EndFor
EndFor
*/
End
// Define Variables
FDESet as IntegerSet([1:20]);
Layer_ID as IntegerParameter(1);
Ts(FDESet) as Temperature_K;
P(FDESet) as Pressure;
C(FDESet,ComponentList) as l_Conc_Mol;
Vl(FDEset) as Superficial_Velocity;
MTC(FDESet,ComponentList) as l_Mass_Trans_Coeff;
End
gas_valve 32
A ionx_bed 35
Activity coefficient procedures (gas) 85 ionx_feed 36
ADSIM.ada file 134 ionx_feed_distrib 37
available 160 ionx_interaction 39
ionx_mix_multi_nr 40
B ionx_mix_nr2 41
Index 161
gas_buffer_interaction 12 D
gas_feed 14
Defining equations for submodels 133
gas_heat_exchanger 17
Diffusivity (gas)
gas_interaction 18
procedures 92, 94
gas_node 21
submodels 141
gas_pipe 22
Dispersion (gas)
gas_product 23
procedures 94
gas_pump 26
submodels 141
gas_ramp 28
Dispersion (ionx)
gas_tank_void 30
procedures 112
gas_valve 32
submodels 146
ionx_bed 35
Dispersion (liq)
ionx_feed 36
procedures 119
ionx_feed_distrib 37
submodels 149
ionx_interaction 39
documentation 158
ionx_mix_multi_nr 40
Dynamics_Outlet_Connect model 62, 64
ionx_mix_nr2 41
ionx_mix_nr3 42 E
ionx_prod_distrib 43
Enthalpy procedures (gas) 95
ionx_product 44
Enthalpy procedures (liq) 120
ionx_split_nr2 45
Entropy procedures (gas) 96
ionx_valve_nr 46
Equations for submodels 133
liq_bed 48
liq_feed 49 F
liq_feed_distrib 51
Flowsheet constraints 135
liq_interaction 52
Fluid thermal conductivity (liq)
liq_mix_multi 54
procedures 125
liq_prod_distrib 55
submodels 151
liq_product 56
liq_split 58
G
liq_tank 59
g_Material_Port 76, 77
liq_valve 60
Gas adsorption processes (overview) 8
p_control 66
Gas model procedures (list) 84
ratio 68
Gas model submodels (list) 139
static_isotherm 69
Gas models
universal_block 71
gas_bed 10
Constraints 135
gas_buffer_interaction 11
gas_feed 14
Index 162
gas_heat_exchanger 17 gUserGibbs submodel 141
gas_interaction 18 gUserHenryCoeff submodel 142
gas_node 21 gUserHTC submodel 142
gas_pipe 22 gUserIsothermC submodel 143
gas_product 23 gUserIsothermPoi submodel 143
gas_pump 26 gUserIsothermPp submodel 144
gas_ramp 27 gUserKg submodel 144
gas_tank_void 29 gUserKineticModel submodel 145
gas_valve 32 gUserKmacKmic submodel 145
Gas models (connecting) 77 gUserMTC submodel 146
Gas models (list) 9
Gas specific user models 75
H
Index 163
gas_bed 11 Ion-exchange models
gas_buffer_interaction 13 ionx_bed 35
gas_feed 15 ionx_feed 36
gas_heat_exchanger 17 ionx_feed_distrib 37
gas_interaction 19 ionx_interaction 38
gas_node 21 ionx_mix_multi_nr 40
gas_pipe 23 ionx_mix_nr2 41
gas_product 24 ionx_mix_nr3 42
gas_pump 27 ionx_prod_distrib 43
gas_ramp 29 ionx_product 44
gas_tank_void 31 ionx_split_nr2 45
gas_valve 33 ionx_valve_nr 46
ionx_bed 35 Ion-exchange models (connecting) 78
ionx_feed 37 Ion-exchange models (list) 34
ionx_feed_distrib 38 Ion-exchange specific user models 76
ionx_interaction 39 ionx_bed model 35
ionx_mix_multi_nr 40 ionx_feed model 36
ionx_mix_nr2 41 ionx_feed_distrib model 37
ionx_mix_nr3 42 ionx_interaction model 38
ionx_prod_distrib 43 ionx_Material_Connection 78
ionx_product 45 ionx_Material_Stream 76
ionx_split_nr2 46 ionx_mix_multi_nr model 40
ionx_valve_nr 47 ionx_mix_nr2 model 41
liq_bed 48 ionx_mix_nr3 model 42
liq_feed 49 ionx_prod_distrib model 43
liq_feed_distrib 51 ionx_product model 44
liq_interaction 53 ionx_split_nr2 model 45
liq_mix_multi 54 ionx_valve_nr model 46
liq_prod_distrib 55 Isotherm (gas)
liq_product 56 procedures 103, 104, 105
liq_split 58 submodels 143, 144
liq_tank 59 Isotherm (ionx)
liq_valve 61 procedures 113
p_control 67 submodels 147
ratio 68 Isotherm (liq)
static_isotherm 70 procedures 123
universal_block 71 submodels 150
Ion-exchange model procedures (list) 112 iUserDispersion submodel 146
Ion-exchange model submodels (list) 146 iUserIsotherm submodel 147
Index 164
iUserKinetic submodel 147 liq_split 58
iUserMTC submodel 147 liq_tank 59
liq_valve 60
K Liquid models (connecting) 79
Kinetic (gas) Liquid models (list) 47
procedures 107 Liquid specific user models 76
submodels 145 lModelType model type 76
Kinetic (ionx) lUserDH submodel 148
procedures 114 lUserDispersion submodel 149
submodels 147 lUserGibbs submodel 149
Kinetic (liq) lUserHTC submodel 150
procedures 124 lUserIsotherm submodel 150
submodels 151 lUserKinetic submodel 151
lUserKl submodel 151
L lUserKmacKmic submodel 152
liq_bed model 48
M
liq_feed model 49
liq_feed_distrib model 51 Macro/micropore rate constants (gas)
liq_interaction model 52 procedures 108
liq_Material_Connection 79 submodels 145
liq_Material_Port 76, 79 Macro/micropore rate constants (liq)
liq_Material_Stream 76 procedures 126
liq_mix_multi model 54 submodels 152
liq_prod_distrib model 54 Mass density procedures (liq) 117
liq_product model 56 Mass transfer (gas)
liq_split model 58 procedures 109
liq_tank model 59 submodels 146
liq_valve model 60 Mass transfer (ionx)
Liquid model procedures (list) 116 procedures 115
Liquid model submodels (list) 148 submodels 147
Liquid models Mass transfer (liq)
liq_bed 48 procedures 127
liq_feed 49 submodels 152
liq_feed_distrib 51 Material streams (list) 77
liq_interaction 52 Miscellaneous models 61
liq_mix_multi 54 Dynamics_Outlet_Connect 62, 64
liq_prod_distrib 54 p_control 66
liq_product 56 PID 68
Index 165
ratio 68 Mole fraction procedure 129
static_isotherm 69 Molecular weight procedures (gas) 86, 109
universal block 71 Molecular weight procedures (liq) 117, 127
Miscellaneous procedures 129
Model library
O
Index 166
viscosity 111 pUser_g_Enthalpy_Mol procedure 95
volumetric flowrate 110 pUser_g_Entropy_Mol procedure 96
Procedures used in (ionx) pUser_g_Gas_RX_Heat procedure 96
dispersion 112 pUser_g_Gas_RX_Rate_C procedure 97
isotherms 113 pUser_g_Gas_RX_Rate_Pp procedure 98
kinetics 114 pUser_g_Gibbs procedure 99
mass transfer 115 pUser_g_Heat_Capacity_Cv procedure 100
Procedures used in (liq) pUser_g_Heat_Capacity_Mol procedure 100
dispersion 119 pUser_g_Henry procedure 101
enthalpy 120 pUser_g_HTC procedure 102
fluid thermal conductivity 125 pUser_g_Isotherm_C procedure 103
Gibbs expression 120 pUser_g_Isotherm_P procedure 104
heat capacity 121 pUser_g_Isotherm_Poi procedure 104
heat of adsorption 118 pUser_g_Isotherm_W procedure 105
heat transfer 122 pUser_g_Kg procedure 106
isotherms 123 pUser_g_Kinetic procedure 107
kinetics 124 pUser_g_KmacKmic procedure 108
macro/micropore rate constants 126 pUser_g_Mole_Weights procedure 109
mass density 117 pUser_g_MTC procedure 109
mass transfer 127 pUser_g_Pump_Performance procedure 110
molecular weight 117, 127 pUser_g_Viscosity procedure 111
viscosity 128 pUser_i_Dispersion procedure 112
Procedures used in (miscellaneous) pUser_i_Isotherm_C procedure 113
mole fractions 129 pUser_i_Isotherm_W procedure 113
partition values 130 pUser_i_Kinetic procedure 114
pUser_Act_Coeff procedure 85 pUser_i_MTC procedure 115
pUser_Flash procedure 129 pUser_KValues procedure 130
pUser_g_Avg_Mole_Weight procedure 86 pUser_l_Avg_Mole_Weight procedure 117
pUser_g_Cat_RX_Heat procedure 86 pUser_l_Density_Mass procedure 117
pUser_g_Cat_RX_Rate_C procedure 87 pUser_l_DH procedure 118
pUser_g_Cat_RX_Rate_C_Sol procedure 88 pUser_l_Dispersion procedure 119
pUser_g_Cat_RX_Rate_Pp procedure 89 pUser_l_Enthalpy_Mol procedure 120
pUser_g_Cat_RX_Rate_Pp_Sol procedure 90 pUser_l_Gibbs procedure 120
pUser_g_Compressibility procedure 91 pUser_l_Heat_Capacity_Mol procedure 121
pUser_g_Cpa procedure 91 pUser_l_HTC procedure 122
pUser_g_De procedure 92 pUser_l_Isotherm_C procedure 123
pUser_g_DH procedure 93 pUser_l_Isotherm_W procedure 123
pUser_g_Diffusivity procedure 94 pUser_l_K1 procedure 125
pUser_g_Dispersion procedure 94 pUser_l_Kinetic procedure 124
Index 167
pUser_l_KmacKmic procedure 126 liq_prod_distrib 55
pUser_l_Mole_Weights procedure 127 liq_product 57
pUser_l_MTC procedure 127 liq_split 59
pUser_l_Viscosity procedure 128 liq_tank 60
liq_valve 61
R p_control 67
Ratio model 68 ratio 68
Reaction rate procedures (gas) 97, 98 static_isotherm 70
Results for models universal_block 72
Dynamics_Inlet_Connect 63
S
Dynamics_Outlet_Connect 65
gas_bed 11 Specifications for models
gas_buffer_interaction 14 Dynamics_Inlet_Connect 63
gas_feed 15 Dynamics_Outlet_Connect 65
gas_heat_exchanger 18 gas_bed 10
gas_interaction 20 gas_buffer_interaction 12
gas_node 21 gas_feed 15
gas_pipe 23 gas_heat_exchanger 17
gas_product 24 gas_interaction 19
gas_pump 27 gas_node 21
gas_ramp 29 gas_pipe 22
gas_tank_void 31 gas_product 24
gas_valve 34 gas_pump 26
ionx_bed 36 gas_ramp 28
ionx_feed 37 gas_tank_void 30
ionx_feed_distrib 38 gas_valve 33
ionx_interaction 40 ionx_bed 35
ionx_mix_multi_nr 40 ionx_feed 36
ionx_mix_nr2 41 ionx_feed_distrib 38
ionx_mix_nr3 42 ionx_interaction 39
ionx_prod_distrib 44 ionx_mix_multi_nr 40
ionx_product 45 ionx_mix_nr2 41
ionx_split_nr2 46 ionx_mix_nr3 42
ionx_valve_nr 47 ionx_prod_distrib 43
liq_bed 48 ionx_product 44
liq_feed 50 ionx_split_nr2 46
liq_feed_distrib 52 ionx_valve_nr 46
liq_interaction 53 liq_bed 48
liq_mix_multi 54 liq_feed 49
Index 168
liq_feed_distrib 51 kinetics 147
liq_interaction 53 mass transfer 147
liq_mix_multi 54 Submodels used in (liq)
liq_prod_distrib 55 dispersion 149
liq_product 56 fluid thermal conductivity 151
liq_split 58 Gibbs isotherm 149
liq_tank 59 heat of adsorption 148
liq_valve 61 heat transfer 150
p_control 66 isotherms 150
ratio 68 kinetics 151
static_isotherm 69 macro/micropore rate constants 152
universal_block 71 mass transfer 152
Standard template (user models) 75
Static_isotherm model 69
T
Index 169
gas_buffer_interaction 14 Volumetric flowrate procedures (gas) 110
gas_feed 15
gas_heat_exchanger 17
gas_interaction 19
gas_node 21
gas_pipe 23
gas_product 24
gas_pump 27
gas_ramp 29
gas_tank_void 31
gas_valve 33
ionx_bed 35
ionx_feed 37
ionx_feed_distrib 38
ionx_interaction 39
ionx_mix_multi_nr 40
ionx_mix_nr2 41
ionx_mix_nr3 42
ionx_prod_distrib 43
ionx_product 45
ionx_split_nr2 46
ionx_valve_nr 47
liq_bed 48
liq_feed 50
liq_feed_distrib 52
liq_interaction 53
liq_mix_multi 54
liq_prod_distrib 55
liq_product 56
liq_split 58
liq_tank 60
liq_valve 61
p_control 67
ratio 68
static_isotherm 70
Index 170
Index 171