PD-PLUS Input Keyword Summary

This document summarizes the keyword options for various types of input to the PD-PLUS Chemical Process Simulator. Consult the user manual for complete details on how to use these keywords effectively and their minimum abbreviations.

A phrase or keyword in square brackets [ ] means "optional," but many phrases may be optional anyway, if their use is not needed for a particular case. Some keyword combinations are invalid (consult the manual). To be sure of avoiding input errors, always use the commas shown. In some keywords, such as for defining a flowsheet block or a stream, the string "abcdefgh" means a field of up to 8 characters. Minimum abbreviations are in boldface.

Order of keyword summaries:
*COMPONENTS - Define components in a model.
*KVALUES - Define method for calculating vapor-liquid K values.
*ENTHALPY - Define method for calculating enthalpies.
*ENTROPY - Define method for calculating entropy.
*UNITS - Define output units and default input units.
*STREAM - Define an input stream or initialize a recycle.
*COLUMN - Columns (fractionator, absorber, stripper, etc.)
*FLASH - Flash drum, or flash a stream to its conditions.
*MIX - Mix streams together.
*SPLIT - Split a stream into two or more of same composition.
*SEPARATOR - Separate a stream on a component-by-component basis.
*HEATEXCH - Heat exchanger.
*LNG HEATEXCHANGER - LNG (plate-fin) heat exchanger.
*REACTOR - Stoichiometric reactor.
*COMPRESSOR - Compress a vapor stream.
*EXPANDER - Expand a vapor and extract work.
*PUMP - Pump a liquid, calculate the power.
*DECANTER - Decant a liquid into two immiscble liquid phases.
*CONTROLLER - Vary a parameter until some result is achieved.
*CALCULAT - Fortran subset "calculator" - miscellaneous things.
*PARAM - Null operation - holds parameters for a model.
*ASTM - Request calculation of TBP/ASTM distillation curves.
*SCALE - Scale entire model for a given unit capacity.
*PRINT - Select stream print options, give long names.
*GENERATE - Generate custom stream report and column data files.
*PROPS - Request calculation of transport properties.
*HCURVE - Calculate heat curves (condensing/vaporization).
*RECYCLE - Specify recycle stream convergence parameters.
*SEQUENCE - Specify execution sequence, when to check recycles.
*TRACE - Set overall flowsheet calculation trace level.

Crude breakdown program - Convert TBP/ASTM/ curve to pseudocomponents.


Units:

In the various types of input paragraphs, units may be specified separately for each item that can have units. Except where noted, the allowed fields are as follows.

          Temp.                Pressure                                       Flow
          F = Farenheit     PSIA = psi(abs)                           LBMOL/HR
          C =Centigrade   PSIG = psi(gauge)                       KGMOL/HR
                                    MMHG = mmHg(abs)               LB/HR
          Duty                   KGCM = kg/sq.cm(abs)            KG/HR
          BTU/HR            KGCMG = kg/sq.cm(gauge)      BBL/DAY
          KCAL/HR         BAR = bar(abs)                          MTON/DAY
          KJ/HR               BARG = bar(gauge)
          WATT               KPA = kilopascals(abs)
                                    KPAG = kilopascals(gauge)


Define components in a model.

*COMPONENTS,
UNITS units units units ....,
    defines default units for properties given after this phrase; see table below
LIBRARY n1 n2 n3 ....,
    retrieves one or more components from library
LIBRARY n , prop1 = value [units], prop2 = ....
    retrieves one component and overrides properties
NONLIBRARY '20-character name', prop1 = value [units], prop2 = value [units], ....
    defines non-library component and gives its properties
ABP temp. [units], prop1 = value [units], prop2 = value [units], ....
    defines hydrocarbon fraction pseudocomponent, of average boiling point "temp."; name defaults to 'ABPtemp'; gravity should be given to enable prediction of other properties.)
ESTIMATE USING method
    defines the method used for estimating molecular weight, critical temperature and pressure, and acentric factor of hydrocarbon fraction pseudocomponents defined using the ABP keyword; "method" is API80, API87, WINN, or LK to use the equations in the API Technical Data Book (1980 or 1987), the Winn nomograph (1957), or the Lee- Kesler equations (1976); the default is API80; this keyword may be used anywhere in the *COMPONENTS paragraph to specify the method to be used for pseudocomponents defined after that; the keyword may appear more than once to change the method as desired.)

Properties:
NAME = '20-character name',
MW = value, (value)
SPGR = value (specific gravity at 60 F)
API = value, (API gravity at 60 F)
TC = value units, (critical temperature)
PC = value units, (critical pressure)
VC = value units, (critical volume)
ZC = value, (critical compressibility)
ZRA = value, (Rackett parameter)
NBP = value units, (normal boiling point)
VL = value units, (liquid molar volume at 25 C)
ACEN = value, (acentric factor)
SOLP = value units, (solubility parameter)
UNIQUAC Q = value, (UNIQUAC 'Q' area parameter)
UNIQUAC R = value, (UNIQUAC 'R' volume parameter)
HTFORM = value units, (heat of formation at 25 C)
GFORM = value units, (Gibbs energy of formation at 25 C)
VISCOSITY t1 visc1 t2 visc2 units, (kinematic viscosity, centistokes; units are temperature)

Units:
Temperature        Pressure                     Volume
F = Fahrenheit     PSIA = psi (abs.)        CUFT/LB = cu.ft./lb
C = Centigrade    MMHG = mmHg       CC/GMOL = cc/gr.mol
R = Rankine        KGCM = kg/sq.cm.    CUM/KGMOL = cu.m/kgmol
K = Kelvin          BARA = bar (abs.)
                           PASC = pascals

Solubility parameter              Heat, Gibbs Q of formation
CAL/CC = (cal/cc)**.5        J/KGMOLE = joule/kgmole
J/CUM = (joule/cu.m)**.5    KCAL/GRMOLE = kcal/gr.mole


K value methods for vapor-liquid equilibrium.

*K VALUES (or *KVALUES), SET n, (K data set number when multiple sets are defined; default = 1)

By general system name: IDEAL,
                                      MAXWELL BONNELL,
                                      SOAVE, or SRK,
                                      PENG ROBINSON, or PR,
                                      GRAYSON STREED, or GS,
                                      WILSON,
                                      NRTL,
                                      UNIQUAC,
                                      SOUR WATER

Fugacity and activity coefficient methods may be specified separately:
    IDEAL VAPOR FUGACITY,
    SOAVE (or SRK) VAPOR FUGACITY,
    PENG ROBINSON (or PR) VAPOR FUGACITY,
    REDLICH KWONG (or RK) VAPOR FUGACITY,

    IDEAL LIQUID FUGACITY,
    MAXWELL BONNELL LIQUID FUGACITY,
    SOAVE (or SRK) LIQUID FUGACITY,
    PENG ROBINSON (or PR) LIQUID FUGACITY,
    GRAYSON STREED (or GS) LIQUID FUGACITY,
    SOUR WATER LIQUID FUGACITY,

    IDEAL LIQUID ACTIVITY,
    WILSON LIQUID ACTIVITY,
    NRTL LIQUID ACTIVITY,
    UNIQUAC LIQUID ACTIVITY,
    REGULAR SOLUTION LIQUID ACTIVITY,

For giving tabular vapor pressure or K data or equation coefficients for one or more components:
VAPOR PRESSURE (or VP) or K
    DATA, COMPONENT n1 t1 p1 ... t6 p6 temp.units press.units,
                 COMPONENT n2 t1 p1 ... t6 p6 temp.units press.units,

    COEFF, COMPONENT n3 c1 ..c5 temp.units press.units eq.form,
                   COMPONENT n4 c1 ..c5 temp.units press.units eq.form,

For giving isothermal curves of tabular partial pressure vs. composition data:
XPP DATA,
    COMPONENT n,
either:
    FILE filename,
or:
    TEMPERATURE= value units, PP= x1 p1 x2 p2 ...x-basis p-units,
    TEMPERATURE= value units, PP= x1 p1 x2 p2 ...x-basis p-units,

Temp.    Pressure                    Vapor pressure coeff. eq. form
F            PSIA = psi(abs)        ANTOINE log(vp)=c1 -c2/(t +c3)
C            MMHG = mmHg     DIPPR ln (vp)=c1 +c2/T +c3*ln(T)
R            KGCM = kg/sq.cm                            +c4*T**c5
K            BAR = bar(abs)
               PASC = pascals

For Soave fugacity or nonideal liquid activity interaction parameters:
    INTERACTION COEFFICIENTS, [FIVE COEFF or SEVEN COEFF,]
         (five or seven coefficients can be specified only for NRTL)
        COMPONENTS n1 n2 c1 c2 c3 c4 c5 c6 c7,
        COMPONENTS n1 n3 c1 c2 c3 c4 c5 c6 c7,

WATER K BY SOLUBILITY,     (for water K*P=vp/solub. in kerosene)
WATER SOLUBILITY DATA = t1 s1 t2 s2 temp.units, (s is mol fr.)
WATER SOLUBILITY COEFFICIENTS = a b temp.units, (ln s =a +b/T)
WATER IS MISCIBLE,     (suppress WATER K BY SOLUBILITY)

TRACE LEVEL n, (n=0,1,2)


Enthalpy methods.

*ENTHALPY, SET n, (enthalpy data set number when multiple sets are defined; default = 1)
IDEAL,
SOAVE, or (SRK,)
PENG ROBINSON, or (PR,)
LEE KESLER, (or LK,) [SIMPLE MIXING RULES,]
API

For giving tabular ideal gas or real vapor and liquid enthalpy data for one or more components:
IDEAL GAS DATA,
    COMPONENT n1 t1 h1 .. t6 h6 temp.units enth.units,
    COMPONENT n2 t1 h1 .. t6 h6 temp.units enth.units,

DATA,
    COMPONENT n3 t1 hl1 hv1 .. t6 hl6 hv6 t.units h.units,
    COMPONENT n4 t1 hl1 hv1 .. t6 hl6 hv6 t.units h.units,

For giving Soave interaction parameters:
INTERACTION COEFFICIENTS,
    COMPONENTS n1 n2 k12,
    COMPONENTS n3 n4 k34,

For giving tabular heat of mixing data for binaries:
HEAT OF MIXING,
    COMPONENTS n1 n2,
either:
        FILE filename,
or:
        TEMPERATURE= value units, X-H= x1 h1 x2 h2 ...x-basis h-units,
        TEMPERATURE= value units, X-H= x1 h1 x2 h2 ...x-basis h-units,...

TRACE LEVEL n, (n=0,1,2)
WATER IS MISCIBLE,

Units:    Temp.    Enthalpy
                F         BTU/LBMOL
                C        BTU/LB
                R        CAL/GRMOL
                K        CAL/GRAM
                           J/KGMOL


Entropy methods.

*ENTROPY, SET n, (entropy data set number when multiple sets are defined; default = 1)
SOAVE, (or SRK,)
PENG ROBINSON, (or PR,)
LEE KESLER, (or LK,) [SIMPLE MIXING RULES]

TRACE LEVEL n, (n=0,1,2)


Units: output and default input.

*UNITS, temp.units, press.units, heat units, flow units,

or

*UNITS, INPUT temp.units, press.units, heat units, flow units,
                OUTPUT temp.units, press.units, heat units, flow units,

ATMOSPHERIC PRESSURE = value units,


Define an input stream, or initialize a recycle stream.

*STREAM abcdefgh
[ESTIMATED] TEMPERATURE = value units,
[ESTIMATED] L/F = value,
[FIXED ] L/F = value,
PHASE IS LIQUID,
PHASE IS VAPOR,
PRESSURE = value units,
FLOW = value units,
COMPOSITION = value1 value2 .... [units],


Column (fractionator, absorber, stripper, etc.). Stages are numbered bottom-up.

*COLUMN blockid '50-character equipment name', STAGES= nn,

SIDESTRIPPER abcdefgh, STAGES=nn,
    DRAWS FROM STAGE nn, STREAM abcdefgh,
    RETURNS TO STAGE nn, STREAM abcdefgh,
    PRODUCT IS STREAM abcdefgh,

SIDECOLUMN id, STAGES=nn,

FEED abcdefgh STAGE nn [VARIES],

HEATER, STAGE nn, [DUTY= value units,]
COOLER, STAGE nn, [DUTY= value units,
CONDENSER [, SIDECOLUMN id,], DUTY= value units,
REBOILER, [STRIPPER or SIDECOLUMN abcdefgh,], [DUTY= value units,]
CIRCULATING REBOILER, [DUTY= value units,] [FLOW= flow info.,],
    [PERCENT VAPORIZ= value, ] [MOL BASIS,]
    [FRACTION VAPORIZ= value,] [WT BASIS,]
    [BAFFLE,] [STREAM abcdefgh,]

PUMPAROUND FROM STAGE nn TO STAGE nn, STREAM abcdefgh,]
    COOL TO value units [BELOW DRAW TEMP], [DUTY = value units,]
    [ESTIMATED] FLOW = flow info. ,

LIQUID DISTILLATE, [SIDECOLUMN id,] STREAM abcdefgh, [EST] FLOW = flow info.,
VAPOR DISTILLATE, [SIDECOLUMN id,] STREAM abcdefgh, [EST] FLOW = flow info.,
TOTAL DISTILLATE, STREAM abcdefgh, [EST] FLOW = flow info.,
LIQUID SIDESTREAM, STAGE nn, [CONNECTS TO STAGE nn,] STREAM abcdefgh,
     [CONNECTS TO STAGE nn,] [EST] FLOW = flow info.,
VAPOR SIDESTREAM, STAGE nn, [CONNECTS TO STAGE nn,] STREAM abcdefgh,
      [CONNECTS TO STAGE nn,] [EST] FLOW = flow info.,
OVERHEAD VAPOR, [STRIPPER or SIDECOLUMN abcdefgh,] STREAM abcdefgh,
     [CONNECTS TO STAGE nn,] [EST] FLOW = flow info.,
BOTTOMS, [STRIPPER or SIDECOLUMN abcdefgh,] STREAM abcdefgh,
     [CONNECTS TO STAGE nn,] [FLOW = flow info.,]

VAPOR [EST] FLOW = flow info., STAGE nn, STREAM abcdefgh, [CONNECTS TO STAGE nn,] 
LIQUID, STAGE nn, [FLOW= flow info.,] [STREAM abcdefgh,] [CONNECTS TO STAGE nn,] 

Flow info.:     value units [DRY,] [EST MW = value]
        or:         value OF FEED [abcdefgh], MOL/WT/VOL BASIS,

PRESSURE = value units, STAGE nn,
[EST] TEMPERATURE = value units, STAGE nn,
SUBCOOLED REFLUX TEMPERATURE = value units [BELOW BP],

TEMPERATURE = value units, TBP value [%], STREAM abcdefgh,
TEMPERATURE = value units, D86 value [%], STREAM abcdefgh,
TEMPERATURE = value units, D1160 value [%], STREAM abcdefgh,

DECANT WATER [=NONE], STREAM abcdefgh,

[INTERNAL] REFLUX RATIO = value,
[EXTERNAL] REFLUX RATIO = value,

L/V = value, STAGE nn,

MOL/WT/VOL FRACTION [RECOVERY]=value, COMPONENT n1 [n2], STREAM abcdefgh,
API GRAVITY = value, STREAM abcdefgh,
REID VAPOR PRESSURE = value units, STREAM abcdefgh,
TRUE VAPOR PRESSURE = value units, STREAM abcdefgh,

UNITS [temp.units] [press.units] [duty units] [flow units],

PRINT ALL,
PRINT STAGES n1 n2 n3 ...,

TRACE LEVEL n, (n=0,1,2)
K SET n, H SET n,
MAXIMUM ITERATIONS = n,
DAMPING FACTOR = value,
METHOD = SIMPLE,
TOLERANCES = inner outer,

ESTIMATED COMPOSITION, MOL BASIS, (or WT BASIS,)
STAGE n, X= x1 x2 ..., Y= y1 y2 ...,

After a flow, temperature, pressure, duty keyword, or product quality specification, there may be:
    LABEL = label (eight characters)


Flash drum, or flash a stream to its conditions.

*FLASH blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
VAPOR IS STREAM streamid,
LIQUID IS STREAM streamid,  or  FIRST LIQUID IS STREAM streamid,
WATER IS STREAM streamid,  or  SECOND LIQUID IS STREAM streamid,
[EST] TEMPERATURE= temp units,
PRESSURE [DROP]= press units,
[EST] L/F= value,
ADD duty units, or REMOVE duty units,
TRACE LEVEL n,
K SET n1 [n2], H SET n,

For a rigorous three-phase flash, liquid composition estimates:

either:

FIRST LIQUID ESTIMATED COMPOSITION= value value ... ,

SECOND LIQUID ESTIMATED COMPOSITION= value value ... ,

or:

MAJOR COMPONENTS = n1 n2,

Also, fixed L-L K values may be given, either for all components:

LL K VALUES = value  value ... , CALCULATE K1, or CALCULATE K2,

or for selected components (to override K values from a K set):

COMPONENT LL K VALUES - n1 value  n2 value ... , CALCULATE K1,

COMPONENT LL K VALUES - n1 value  n2 value ... , CALCULATE K2,

After a temperature, pressure, L/F, or duty keyword there may be:
    LABEL= label (eight characters)


Mix streams.

*MIX blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
PRODUCT IS STREAM streamid,
[EST] TEMPERATURE= temp units,
PRESSURE [DROP]= press units,
[EST] L/F= value, or PHASE IS LIQUID, or PHASE IS VAPOR,
ADD duty units, or REMOVE duty units, or NO HEAT BALANCE,
TRACE LEVEL n,
K SET n, H SET n,

After a temperature, pressure, L/F, or duty keyword there may be:
    LABEL= label (eight characters)


Split a stream into two or more of same composition. Multiple products may be defined as a specified flow or fraction of a feed. Only one product may be specified by FLOW IS BALANCE.

*SPLIT blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
STREAM streamid, [COMPONENT n] FLOW = flow info.
                     or         FLOW IS BALANCE

    where "flow info"= value units
                                 value OF FEED
                                 value OF STREAM streamid, MOL/WT/VOL BASIS,

[EST] TEMPERATURE= temp units,
PRESSURE [DROP]= press units,
[EST] L/F= value, or PHASE IS LIQUID, or PHASE IS VAPOR,

K SET n, H SET n, or NO HEAT BALANCE,
TRACE LEVEL n,

After a flow, temperature, pressure, or L/F keyword there may be:
    LABEL= label (eight characters)


Separate a stream into two or more products on a component-by-component basis. Multiple products may be defined by giving for each the fraction of each component in the feed going into that product and the stream's conditions. Only one product may be
specified by IS BALANCE.

*SEPARATOR blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
STREAM streamid,
    FRACTIONS = value value value .....
or COMPONENT FRACTIONS = # value # value # value....
or IS BALANCE
[EST] TEMPERATURE= temp units,
PRESSURE [DROP]= press units,
[EST] L/F= value, or PHASE IS LIQUID, or PHASE IS VAPOR,

REMOVE STREAM streamid, (remove a known stream from the feed)

K SET n, H SET n, or NO HEAT BALANCE,
TRACE LEVEL n,

After a keyword for fractions, temperature, pressure, or L/F there may be:
    LABEL= label (eight characters)


Heat exchanger. Cool a hot stream, heat a cold stream, or exchange heat between both hot and cold streams. For each of HOT STREAM and COLD STREAM, give the information below that may apply to that stream, then give any limits imposed on the exchange and other data.

*HEATEXCHANGER blockid '50-character equipment name',
HOT STREAM streamid, or COLD STREAM streamid,
    OUTLET STREAM streamid,
    [EST] TEMPERATURE= temp units,
    PRESSURE [DROP]= press units, (see below to calc)
    [EST] L/F= value,
    K SET n, or PHASE IS LIQUID, or PHASE IS VAPOR,
    H SET n,
    CALCULATE FLOW,
For calculating pressure drop and U from reference information:
    REFERENCE PRESSURE DROP= value units,
        FLOW= value units,
        LIQUID DENSITY= inlet [outlet] units,
        VAPOR DENSITY= inlet [outlet] units,
        [WT FRACTION VAPOR= inlet [outlet],
        [INLET PRESSURE DROP FRACTION= value,]
        [U SCALING = fraction exponent,]
DUTY = value units,
APPROACH = value units,
[CORRECTED] LMTD = value units, SHELLS = number,
WEIGHTED MTD [= value units], SECTIONS = number, [CORRECTED,]
U = value units, AREA = value units, FOULING FACTOR = value,
FLOW = COUNTERFLOW or FLOW = COCURRENT or PARALLEL,
TRACE LEVEL n,

After a temperature, pressure, L/F, duty, temperature difference, U, area, or fouling factor keyword there may be:
    LABEL= label (eight characters)

Units of "U":
    BTU = BTU/FT2-HR-F,
    KCAL = KCAL/M2-HR-C,
    WATT = WATT/M2-C


LNG (plate-fin) heat exchanger. There may be multiple hot and cold streams.

*LNG HEATEXCHANGER blockid '50-character equipment name',
For each stream:
    HOT STREAM streamid, or COLD STREAM streamid,
        OUTLET STREAM streamid,
        [EST] TEMPERATURE= temp units,
        [EST] L/F= value, or PHASE IS LIQUID, or PHASE IS VAPOR,
        PRESSURE [DROP]= press units,
        DUTY = value units,
        K SET n, H SET n,
    for the stream's heat curve:
        VARY TEMPERATURE,
              or   L/F,
              or   ENTHALPY,
              or   DUTY,
            INCREMENTS = n, or SIZE = value units,

For heat provided by stages of a column block (dephlegmator):
HEAT FROM COLUMN BLOCK abcdefgh, [STAGES n1 n2,]

Optionally:
ZONE ANALYSIS, [DEFERRED,] [PLOTFILE = fileid,]
MITA LABEL = label, (eight characters)
MTD LABEL = label,
UA LABEL = label,
TRACE LEVEL n,

Labels may also be given for temperatures, pressures, L/F's, and duties by following those keywords with:
    LABEL= label


Stoichiometric reactor.

*REACTOR blockid '50-character equipment name',
FEED IS STREAM[S] name name name ...,
PRODUCT IS STREAM name,
[EST] TEMPERATURE = value units,
PRESSURE [DROP] = value units,
[EST] L/F = value, or PHASE IS VAPOR or PHASE IS LIQUID,
K SET n, H SET n,
CALCULATE HEAT,
TRACE LEVEL n

For each equation:
EQUATION n1 coeff1 n2 coeff2 n3 coeff3 ..., [WEIGHT BASIS,]
    CONVERT value [% or PC or PERCENT], COMPONENT j,
or: TO COMPLETION, (default is to completion)

To begin a new "level" of equations, which may consume products of the previous levels:
    NEXT LEVEL, (followed by more EQUATIONS)

For makeup, to give some percent excess or concentration in the product:
    MAKEUP STREAM name,
        COMPONENT j EXCESS = value [% or PC or PERCENT],
or     COMPONENT j CONCENTRATION= value [% or PC or PERCENT],
            (the % may be preceded by MOL or WT; default is mol)

After each temperature, presssure, L/F, CALCULATE HEAT, excess, or concentration keyword, there may be
    LABEL name,


Compress a vapor stream.

*COMPRESSOR blockid '50-character equipment name',
FEED IS STREAMS name name name ....,
PRODUCT IS STREAM name,
PRESSURE= press [press press ...] units,
STAGES= n, [COOL TO temp units,]
MAXIMUM TEMPERATURE= temp units, [COOL TO temp units,]
HEAD CURVE= flow head flow head .....flow-units head-units,
POLYTROPIC EFFICIENCY= value,
ADIABATIC EFFICIENCY= value,
Or, to give an efficiency curve:
POLYTROPIC EFFICIENCY = flow eff flow eff.....flow-units,
ADIABATIC EFFICIENCY = flow eff flow eff.....flow-units,

K SET n, or PHASE IS VAPOR,
H SET n,
TRACE LEVEL n,

After a PRESSURE, MAXIMUM TEMP, COOL TO, STAGES, or EFFICIENCY keyword there may be:
    LABEL= label (eight characters)
There may also be HORSEPOWER LABEL = label to label the calculated value of horsepower.

Units:    Flow                           Head
            CFM = cu.ft./min         FEET
            CMH = cu.meter/hr     METERS


Expand a vapor and extract work, using entropy method.

*EXPANDER blockid '50-character equipment name',
FEED IS STREAMS name name name ....,
PRODUCT IS STREAM name,
PRESSURE= press units,
EFFICIENCY= value [% or PC or PERCENT],
K SET n, H SET n,
TRACE LEVEL n,

After a PRESSURE or EFFICIENCY keyword, there may be
    LABEL= label (eight characters)

There also may be HORSEPOWER LABEL = label to label the calculated value of horsepower.


Pump a liquid stream, calculate power.

*PUMP blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
PRODUCT IS STREAM streamid, or DISCHARGE IS STREAM streamid,
PRESSURE [INCREASE]= press units,
EFFICIENCY = value [% or PC or PERCENT],
H SET n,
K SET n, or PHASE IS LIQUID,
TRACE LEVEL n,

After a pressure or efficiency keyword there may be:
    LABEL= label (eight characters)

There also may be the phrase HORSEPOWER LABEL = label to label the calculated value of horsepower.


Decant a feed into two immiscible phases, using fixed K values or using liquid activity coefficients.

*DECANTER blockid '50-character equipment name',
FEED IS STREAM[S] streamid streamid streamid ... ,
PHASE ONE IS STREAM streamid, PHASE TWO IS STREAM streamid,
TEMPERATURE = value units, PRESSURE [DROP]= value units,

MAJOR COMPONENTS = n1 n2,
or     PHASE ONE ESTIMATED COMPOSITION = value value ...,
        PHASE TWO ESTIMATED COMPOSITION = value value ...,
or     [ESTIMATED] K VALUES = value value ... , MOL or WT BASIS,

K SET n,
H SET n, or NO HEAT BALANCE,
TRACE LEVEL n,

After a TEMPERATURE, PRESSURE, or K VALUES keyword, there may be:
    LABEL= label (eight characters)
to override the default labels. There also may be the keyword
    DUTY LABEL,
to override the default label for duty (heat added/removed).


Feedback controller

*CONTROLLER blockid '50-character equipment name',
VARY operand
    LOW LIMIT = value [units],
    HIGH LIMIT = value [units],
    MAXIMUM CHANGE = value [units or %],
UNTIL operand
    VALUE = value [units],
or VALUE IS MAXIMUM,
or VALUE IS MINIMUM,
TOLERANCE = value [units or %],
START LOOP AT BLOCK blockid,
MAXIMUM ITERATIONS = n,
ESTIMATED SLOPE = value,
TRACE LEVEL n,

The "operand" for the VARY or UNTIL keyword is one of:
    STREAM streamid FLOW
                                    COMPONENT n FLOW
                                                                 MOL FRACTION
                                                                 WT FRACTION
                                    TEMPERATURE
                                    PRESSURE
                                    L/F or LIQUID FRACTION
                                    ENTHALPY
    BLOCK blockid label,

After a LOW LIMIT, HIGH LIMIT, MAXIMUM CHANGE, TOLERANCE, ESTIMATED SLOPE, or VALUE keyword, there may be
    LABEL= label (eight characters)

Units:  Flow
           LBMOL/HR
           KGMOL/HR
           LB/HR
           KG/HR


Fortran subset "calculator." Access stream information, block parameters, and physical properties; perform calculations, read and write files. Names of variables created are labels for those values, so that other blocks may access values created by the calculator block.

*CALCULATOR blockid '50-character equipment name'
DIMENSION array(size), array(size), ....
DATA name/value .../, name/value .../, ...
variable = expression
DO n name = start, limit, increment
n CONTINUE
GO TO n
IF(expression) n1, n2, n3 (goto for expression -,0,+)
RETURN [TO BLOCK id]
STOP
PRINT n, name, name, name, ... (immediately to output file)
DISPLAY n, name, name, name, ... (display on screen)
REPORT n, name, name, name, ... (save for output report, or write to special file)
n FORMAT (format specifications)
RFILE = fileid [APPEND or NEW] [PRINT] (file for REPORT)
READ n, name, name, name, ... (read from keyboard or from special file)
INFILE = fileid (file for READ)
CALL subrname (arg, arg, arg, ...) (see below)
TRACE LEVEL n
DEBUG
END

Comment lines begin with 'C' or ';'. Anything after a semicolon on a statement is a comment field.

In statements of the form 'variable = expression' and in IF statements, both the variable and expression may contain references to data in streams and blocks. Where a variable name would be used, there may be one of the following:

STREAM id   TEMPERATURE (Rankine)
                        PRESSURE (psia)
                        L/F or LIQUID FRACTION
                        ENTHALPY (Btu/hr)
                        ENTROPY (Btu/hr-R)
                        ZV (vapor compressibility)
                        MOL FLOW or WT FLOW (lbmol, lb)
                        COMPONENT n MOL FLOW (or WT FLOW) (lbmol, lb)
                        COMPONENT n MOL FRACTION (or WT FRACTION)
                        EXIST

BLOCK id label [(subscript)]
WORD n

There are some "reserved words" that should not be used for variable names. These are as follows.

STREAM         READ           WT                  ABS                VVISC

BLOCK            PRINT         FLOW             SQRT             LTCOND

DIM                   DISPLAY    WORD           FLASH           VTCOND

DATA               REPORT     DEBUG           KVAL             SURTEN

DO                    FORMAT     NCOMP         ENTHAL        NONOUTPUT

CONTINUE     END               RFILE             ENTROP       COMP

MW                  GAMMA       TEMP             PRES              SPGR                

LDENS             GO                 TO                  GOTO            TC

INFILE              IF                   L/F                  LIQUID          FRACTION   

RETURN          NBP              KSET              STOP             PC

DOS                  HTFORM    HSET               CALL             ENTHALPY

INT                    ZV                 ENTROPY     ALOG             LVISC               

TRACE             LEVEL         MOL                EXP                 EXIST

Several physical property arrays are provided automatically andshould not be declared in DIMENSION statements. These are:

MW - molecular weights of the components in the flowsheet
SPGR - specific gravities (at 60 F)
TC - critical temperatures (Rankine)
PC - critical pressures (psia)
NBP - normal boiling points (Rankine)
HTFORM - heats of formation (joule/kgmole)

The mathematical operators supported are:
+ add
- subtract
* multiply
/ divide
** raise to power (X**Y means raise X to the power Y)

Except when parentheses specify otherwise, an expression is evaluated left to right in order of exponentiation (**) first, then multiply and divide, then add and subtract.

Support is provided for some mathematical functions; these are:
INT - truncate to integer value
ALOG - natural logarithm
EXP - exponential
ABS - absolute value
SQRT - square root

Facilities supported by CALL statement:

  1. Vapor-liquid equilibrium flash calculation:
    CALL FLASH (TYPE, feed, vapor, liquid)
    Arguments:
    TYPE is flash type: 1 = to temperature and pressure
                                  2 = to L/F and pressure
                                  3 = to enthalpy and pressure
                                  4 = to entropy and pressure
    "feed," "vapor," and "liquid" are stream id's and not arrays in a DIMENSION statement.
  2. Vapor-liquid equilibrium K value calculations:
    CALL KVAL (T, P, X, Y, XYCODE, K, ZV, ZL)
    Arguments:
    T temperature (Rankine).
    P pressure (psia).
    X, Y liquid and vapor compositions, mol basis, not necessarily normalized; they must be declared in a DIMENSION statement.
    XYCODE flag = 0 to calculate "ideal" K values (X and Y do not contain compositions), =1 to calculate composition-dependent K values, using X and Y.
    K vector to contain the K values; it must be declared in a DIMENSION statement.
    ZV, ZL vapor and liquid compressibilities; they are set to zero if not calculated by the K method.
  3. Enthalpy calculations.
    CALL ENTHAL (T, P, X, PHASE, H, HI)
    Arguments:
    T temperature (Rankine).
    P pressure (psia).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement; ignored if PHASE = 0.
    PHASE flag = 0 to calculate ideal gas enthalpies and return the values in HI, =1 for liquid enthalpy returned in H, =2 for vapor enthalpy returned in H.
    H liquid or vapor enthalpy, Btu/lbmol, returned when PHASE = 1 or 2.
    HI vector, declared in a DIMENSION statement, to contain ideal gas enthalpies for PHASE = 0 or partial molar enthalpies for PHASE = 1 or 2.
  4. Entropy calculations.
    CALL ENTROP (T, P, X, PHASE, S, SI)
    Arguments:
    T temperature (Rankine).
    P pressure (psia).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement; ignored if PHASE = 0.
    PHASE flag = 0 to calculate ideal gas entropies and return the values in SI, =1 for liquid entropy returned in H, =2 for vapor entropy returned in H.
    S liquid or vapor entropy, Btu/lbmol-R, returned when PHASE = 1 or 2.
    SI vector, declared in a DIMENSION statement, to contain ideal gas entropies for PHASE = 0.
  5. Liquid activity coefficient calculations.
    CALL GAMMA (T, X, ACOEF)
    Arguments:
    T temperature (Rankine).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    ACOEF vector to contain the activity coefficients; must be declared in a DIMENSION statement.
  6. Liquid density calculations.
    CALL LDENS (T, X, DENS)
    Arguments:
    T temperature (Rankine).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    DENS density, lb/cu.ft. (zero if not calculated).
  7. Liquid viscosity calculations.
    CALL LVISC (T, X, VISC)
    T temperature (Rankine).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    VISC viscosity, centipoise (zero if not calculated).
  8. Vapor viscosity calculations.
    CALL VVISC (T, P, Y, Z, VISC)
    T temperature (Rankine).
    P pressure (psia).
    Y composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    Z vapor compressibility (if zero, a value will be calculated via the Redlich-Kwong equation of state).
    VISC viscosity, centipoise (zero if not calculated).
  9. Liquid thermal conductivity calculations.
    CALL LTCOND (T, P, X, COND)
    T temperature (Rankine).
    P pressure (psia).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    COND conductivity, Btu/ft-hr-F (zero if not calculated).
  10. Vapor thermal conductivity calculations.
    CALL VTCOND (T, P, Y, Z, COND)
    T temperature (Rankine).
    P pressure (psia).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    Z vapor compressibility (if zero, a value will be calculated via the Redlich-Kwong equation of state).
    COND conductivity, Btu/ft-hr-F (zero if not calculated).
  11. Surface tension calculations.
    CALL SURTEN (T, X, ST)
    T temperature (Rankine).
    X composition vector, mol basis, not necessarily normalized; it must be declared in a DIMENSION statement.
    ST surface tension, dynes/cm (zero if not calculated).
  12. TBP/ASTM distillation temperatures.
    CALL ASTM (stream, TEMPS)
    Arguments:
    "stream" name of the stream (the name of a flowsheet stream, not a dimensioned array).
    TEMPS vector, declared in a DIMENSION statement, that contains, on return, 27 temperatures (Rankine), in three sets of nine. These sets are TBP, ASTM D86, and ASTM D1160, in that order. Within each set, the temperatures correspond to IP, 5, 10, 30, 50, 70, 90, 95, EP volume percent distilled. Zeroes are returned if the temperatures cannot be calculated.
  13. Operating system: commands and other programs.
    CALL DOS ('command')
    Arguments:
    "command" DOS command or the name of a program to be run, complete with arguments. There must be enough memory remaining, with the simulator already loaded, to run any program specified by the command. On completion of the command, execution of the calculator block resumes at the statement after the CALL. If the block has written a file for input to an external program, using RFILE and REPORT statements, the file should be closed by placing an RFILE statement, without a fileid, before the CALL statement.

Parameter block. Such a block is a "no operation," meaning that it does not perform any calculations. However, it can be a useful means of entering parameters for a model. Calculator and controller blocks can access this data.

*PARAMETER blockid 'descriptive name - up to 50 characters',
label = value value ....,
label = value value ....,


ASTM and TBP distillation curves for streams. Also used to define initial and end points and the method for converting between TBP and D86 temperatures.

*ASTM, IP=value [%], EP=value [%], TBP, D86, D1160,
[CRACKING,] API80 or API87

-----------------------------------------------------------------
Scale entire model for a given unit capacity.

*SCALE blockid '50-character equipment name',
STREAM id [COMPONENT n] FLOW = value units,
or BLOCK id label VALUE = value,
INCLUDE BLOCK id label label ....,
TRACE LEVEL n,


Stream printing options, give long names.

*PRINT
ALL, or NONE, or ORDER= id id ...., or ONLY
STREAM NAMES
    id '52-character name'
    id '52-character name'
    . .
    . .,        (comma after last name)
ZEROES
REID VAPOR PRESSURE (or REID VP), K SET n
BLOCKS id id id ....


Custom stream report and column data files.

*GENERATE [NEWLIST,] FILE fileid,
STREAM streamid streamid ..... streamid, (id's in flowsheet)
ALIAS      streamid streamid ..... streamid, (id's to display)
TRANSFER TIMES streamid streamid ....., (transfer times, min)
or ALL STREAMS,
FORMAT = INPUT,
or
FORMAT = SPREADSHEET (or EXCEL), or FORMAT = PRINT,
HORIZONTAL (default is only the stream ID's)
    LABELS, MW, SPGR, API, STREAM NAME [ONLY],
VERTICAL (default is temp., press., L/F,
    COMPONENTS, and component mol flows.)
    COMPONENT n [AS 'name'],
    COMPONENTS n n ...n [AS 'groupname'],
    UNDERLINES, BLANK,
    TOTAL MOLS (or WT or VOL), DRY,
    TEMPERATURE units, PRESSURE, PHASE, [WT] L/F, WATER,
    MW, HOT SPGR (or ACTUAL SPGR), COLD SPGR (or STD SPGR),
    API, MEABP, WATSON K,
    ACTUAL VOLUME, STD VOLUME [AT temp. units],
    HEAT CAPACITY, ENTHALPY, DENSITY,
    [KINEMATIC] VISCOSITY [AT temp. units], CONDUCTIVITY,
    SURFACE TENSION, ZVAPOR, TC, PC, CP/CV,
    REID VP, TRUE VP [AT TEMP, or AT temp. units,] [K SET n,]
    TBP, D86, D1160,
FLOWS = units, DECIMALS = n, ZEROES, PPM,
TRACE, or TRACE LIMIT = value PPM, SPLIT PHASES,
BATCHTIME = minutes,
TITLE 'Title for top of each page', DATE, PAGE NUMBERS,
WIDTH = n, LINE LENGTH = n CHARACTERS (or STREAMS),
PAGE LENGTH = n,

The input for a file containing column information is as follows:

*GENERATE [NEWLIST,] FILE fileid,
COLUMN blockid blockid ..... blockid,


Transport properties. To request printing of transport properties with streams:

*PROPS
SUBSTITUTES = compno libno compno libno compno libno ...,
LIQUID VISCOSITY METHOD = method

The keyword LIQUID VISCOSITY is used to choose one of the following methods for liquid viscosity of mixtures:

LOGARITHMIC - ln(v-mix) = molar weighted average ln(v); recommended by the DIPPR Data Prediction Manual; this is the default method.
CUBIC - cube root(v-mix) = molar weighted average cube root(v); recommended by API for pure compound
mixtures).
MAXWELL - Maxwell blending index method for oil fractions.
ASTMD341 - ASTM D-341 (API Proc. 11A4.4) for oil fractions.


Heat curves (condensing/vaporization).

*HCURVE
STREAM id
PRESSURE= value value value .... units
H SET n, K SET n, (or PHASE IS LIQUID, or PHASE IS VAPOR,)
PRINT COMPOSITIONS,
FILE fileid, GENERATE HTRI INPUT,
REFERENCE PRESSURE = value units
REFERENCE TEMPERATURE = value units or REFERENCE L/F = value

for each flash curve for the stream:
FROM TEMPERATURE = value units TO TEMPERATURE = value units
  "          L/F = value                                "     L/F = value
  "          BP                                             "     BP
  "          DP                                             "     DP
  "          STREAM CONDITIONS        "    STREAM CONDITIONS

VARY (or CHANGE BY) TEMPERATURE,
                                           L/F,
                                           ENTHALPY or DUTY,
INCREMENTS = value
SIZE = value [units]


Recycle stream convergence parameters.

*RECYCLE
DEFAULTS,  or  STREAM abcdefgh,
    TOLERANCE = value FRACTION,
                                         %,
                                         LBMOL, both fractional and
                                         KGMOL, absolute criteria)
                                         LB,
                                         KG,
(Tolerance may be given twice, for both fractional and absolute criteria)

    TEMPERATURE TOLERANCE = value units, (units = F or C)
    MAXIMUM ITERATIONS = n, ("n" > 0)

    DIRECT SUBSTITUTION, (convergence method)
    WEGSTEIN,

    BOUNDS = lower upper, (Wegstein "q" bounds)
    FREQUENCY = n, (acceleration freq.)


Execution sequence, when to check recycles. Default is the order defined in input. If the default order is to be used, just put a comma after the SEQUENCE keyword before giving any recycle stream checking information.

*SEQUENCE id. id. id. ......,
CHECK RECYCLE id AFTER BLOCK id, START LOOP AT BLOCK id,


Trace level for details of flowsheet calculations. If the trace level for an individual block is higher than given here for all blocks, the higher level is used.

*TRACE LEVEL n


Program CRUDEBR is used to break down a crude oil or other hydrocarbon stream described by its TBP, ASTM D86, or ASTM D1160 distillation into "pseudocomponents" for use in the simulation program. CRUDEBR runs separately from the simulation program, and it generates a data file that may be used as part of the data for a flowsheet simulation. The following is a summary of the input format and options. Multiple crudes may be defined by using groups of keywords CRUDE through VISCOSITY and then giving their proportions via the *BLEND paragraph.

CRUDE 'crudename',
    LIGHTENDS = lib.no. % lib.no. % ....., [actual %'s]
    TBP = % temp. % temp. ..... units, [cumulative %'s]
    D86 = % temp. % temp. ..... units,
    D1160 = % temp. % temp. ..... units,
    SPECIFIC GRAVITY = % grav. % grav. ....., [cumulative %'s]
    API GRAVITY = % grav. % grav. .....,
    AVG SPECIFIC GRAVITY = value,
    AVG API GRAVITY = value,
    NORMALIZE GRAVITIES,
    ADJUST END GRAVITY,
    BASIS = VOL,  or WT,
    CUTS = t0 t1 n1     t2 n2 ..... tm nm,
    CRACKING,
    CONVERT USING API87   (or  API80),
    VISCOSITY t1 t2 % v1 v2 % v1 v2 % v1 v2 ... , (centistokes)

STREAM abcdefgh, [EST] TEMP = value units, PRESSURE = value units,
[EST] L/F = value, FLOW = value units
[EST] LIQUID FRACTION

*BLEND, BASIS= VOL  or WT,
     'crudename'=value, 'crudename'=value, etc.