EPA-600 / 7-90-022 c
December 1990
INTEGRATED AIR POLLUTION CONTROL SYSTEM
VERSION 4.0
VOLUME 3: PROGRAMMER'S MAINTENANCE MANUAL
by
Mehdi Maibodi, A. L. Blackard, and
Robert J. Page
Radian Corporation
Post Office Box 13000
Research Triangle Park, NC 27709
EPA Contract No. 68-02-4286
Work Assignment 116
Project Officer
Norman Kaplan
Air and Energy Engineering Research Laboratory
Office of Research and Development
U.S. Environmental Protection Agency
Washington, D.C. 20460
-------
TECHNICAL REPORT DATA
(Please read hiztructions on /lie reverse before com/yleling)
1. REPORT NO. 2.
EPA-600/7-90-02 2 c
3. RECIPIENT'S ACCESSION NO.
PB91-133538
4. TITLE AND SUBTITLE
Integrated Air Pollution Control System, Version 4.0;
Volume 3: Programmer's Maintenance Manual
5. REPORT DATE
December 1990
6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)
M. Maibodi, A. L. Blackard, and R. J. Page
8. PERFORMING ORGANIZATION REPORT NO.
EPA/SW/DK-91/074c
9. PERFORMING ORGANIZATION NAME AND ADDRESS
Radian Corporation
P. O. Box 13000
Research Triangle Park, North Carolina 27709
10. PROGRAM ELEMENT NO.
11. CONTRACT/GRANT NO.
68-02-4286, Task 2/116
12. SPONSORING AGENCY NAME AND ADDRESS
EPA, Office of Research and Development
Air and Energy Engineering Research Laboratory
Research Triangle Park, North Carolina 27711
13. TYPE OF REPORT AND PERIOD COVERED
Task final; 6/89 - 9/90
14. SPONSORING AGENCY CODE
EPA/600/13
15.supplementary notes^jt;jt;j^l project officer is Norman Kaplan, Mail Drop 62, 919/541-
2556. Volume 1 is the User's Guide, and Volume 2 is the Technical Documentation
Manual.Eor diskette(s) see: PB91-506469 and PB91-506477
16. abstract xntegrated Air Pollution Control System (IAPCS) was developed for the
U. S. EPA's Air and Energy Engineering Research Laboratory to estimate costs and
performance for emission control systems applied to coal-fired utility boilers. The
model can project a material balance, and equipment list, and capital investment
and revenue requirements based on user-specific input data. Included in the model
are conventional and emerging technologies affecting S02, NOx, and particulate mat-
ter pre-combustion, in-situ, and post-combustion emission controls. A variety of
technology modules built into the model can be incorporated and combined. Cost and
performance estimates can be analyzed in terms of integrated technologies. Conven-
tional and emerging technologies included in IAPCS Version 4.0 are overfire air/
low NOx burners, lime injection multistage burners, physical coal cleaning,
coal switching and blending, spray humidification, electrostatic precipitator, fabric
filter, lime spray drying, wet limestone flue gas desulfurization, dry sorbent injec-
tion, natural gas reburning, selective catalytic reduction, atmospheric fluidized bed
combustion, pressurized fluidized bed combustion, integrated gasification combi-
ned cycle, and pulverized coal burning boiler.
17. KEY WORDS AND DOCUMENT ANALYSIS
a. DESCRIPTORS
b. IDENTI Ft ERS/OPEN ENDED TERMS
c. COSATI Field/Group
Pollution Nitrogen Oxides
Mathematical Models Particles
Coal
Combustion
Electric Power Plants
Sulfur Oxides
Pollution Control
Stationary Sources
Integrated Air Pollution
Control System
Particulate
13 B
12A 14G
21D
2 IB
10 B
07B
18. DISTRIBUTION STATEMENT
Release to Public
19. SECURITY CLASS (ThisReport)'
Unclassified
21. NO. OF PAGES
136
20. SECURITY CLASS (This page)
Unclassified
22. PRICE
EPA Form 2220-1 (9-73)
i
-------
CONTENTS
Abstract ii
Figures xi
Tables xiv
Abbreviations and Symbols xviii
Metric Equivalents xx
VOLUME 1
INTEGRATED AIR POLLUTION CONTROL SYSTEM
USER'S GUIDE
1.0 Introduction 1-1
1.1 System Overview 1-1
1.2 Background 1-1
1.3 Model Description, Organization, and Capability .... 1-2
2.0 Operation 2-1
2.1 System Requirements 2-1
2.2 Installation 2-1
2.3 Execution Guidelines 2-2
2.3.1 Select Economic Format 2-2
2.3.2 Select Input File 2-3
2.3.3 Edit Input Data 2-4
2.3.3.1 Run Description Comments 2-5
2.3.3.2 Boiler Specific Data 2-5
2.3.3.3 Run of Mine Coal Characteristics . . . 2-9
2.3.3.4 Clean Coal Characteristics 2-10
2.3.3.5 Technology Modules to Implement .... 2-11
2.3.3.6 Fan 2-13
2.3.3.7 Economic 2-14
2.3.3.8 Rerun with New Emission Rate 2-18
2.4 List Parameter Data 2-19
2.5 Save Input Data 2-21
2.6 Execute 2-23
3.0 Using Batch Files 3-1
3.1 Batch File 3-1
4.0 Troubleshooting 4-1
4-1 Troubleshooting 4-1
iii
-------
CONTENTS
(Continued)
VOLUME 2
INTEGRATED AIR POLLUTION CONTROL SYSTEM
TECHNICAL DOCUMENTATION MANUAL
1.0 Introduction 1-1
1.1 System Overview 1-1
1.2 Background 1-1
1.3 Model Description, Organization, and Capability .... 1-2
2.0 Precombustion Controls 2-1
2.1 Coal Switching and Blending 2-1
2.1.1 Process Description 2-1
2.1.1.1 Switching 2-1
2.1.1.2 Blending 2-4
2.1.1.3 Applicability of Low Sulfur Coals . . . 2-5
2.1.2 Battery Limits 2-5
2.1.3 Details of Physical/Performance Models 2-9
2.1.4 Capital Cost Model 2-9
2.1.4.1 Process Capital Costs 2-9
2.1.4.2 Indirect Capital Costs 2-12
2.1.5 Operating and Maintenance Cost Model 2-12
2.2 Physical Coal Cleaning 2-13
2.2.1 Process Description 2-13
2.2.2 Battery Limits 2-15
2.2.3 Details of Physical/Performance Models 2-15
2.2.4 Capital Cost Model 2-18
2.2.5 Operating and Maintenance Cost Model 2-18
2.3 References 2-18
3.0 In-situ Combustion 3-1
3.1 Low N0x Combustion (LNC) 3-1
3.1.1 Process Description 3-2
3.1.1.1 Low Excess Air 3-2
3.1.1.2 Low NO Burners 3-2
3.1.1.3 Overfire Air 3-4
3.1.1.4 Low NO Concentric Firing System . . . 3-4
3.1.2 Battery Limits 3-7
3.1.2.1 Low Excess Air 3-7
3.1.2.2 Low NO Burners 3-7
3.1.2.3 Overfire Air 3-8
3.1.2.4 Low N0x Concentric Firing System . . . 3-9
iv
-------
CONTENTS
VOLUME 2
(Continued)
3.1.3 Details of Physical Performance Models 3-9
3.1.3.1 Low Excess Air 3-10
3.1.3.2 Low N0x Burners 3-10
3.1.3.3 Overfire Air 3-12
3.1.3.4 Low NOx Concentric Firing System
and Low NO Burner/Overfire Air . . 3-13
3.1.4 Capital Cost Model 3-13
3.1.4.1 Process Capital Cost Model 3-14
3.1.4.2 Indirect Capital Costs 3-14
3.1.5 Operating and Maintenance Cost Model 3-16
3.2 Natural Gas Reburning 3-17
3.2.1 Process Description 3-17
3.2.2 Battery Limits 3-19
3.2.3 Details of Physical/Performance Models 3-19
3.2.4 Capital Cost Model 3-20
3.2.4.1 Process Capital Costs 3-20
3.2.4.2 Indirect Capital Costs 3-21
3.2.5 Operating and Maintenance Cost Model 3-21
3.3 Natural Gas Substitution 3-24
3.3.1 Process Description 3-24
3.3.2 Battery Limits 3-25
3.3.3 Details of Physical/Performance Models 3-25
3.3.3.1 Sizing Procedures for Estimating
Capital Costs for NGS 3-25
3.3.3.2 Emission Reduction Performance .... 3-26
3.3.4 Capital Cost Model 3-27
3.3.4.1 Process Capital Costs 3-27
3.3.4.2 Indirect Capital Costs 3-27
3.3.5 Operating and Maintenance Cost Model 3-27
3.4 Lime Injection Multistage Burner (LIMB) 3-27
3.4.1 Process Description 3-27
3.4.2 Battery Limits 3-31
3.4.3 Details of Physical Performance Models 3-33
3.4.4 Capital Cost Model 3-34
3.4.4.1 Process Capital Cost 3-34
3.4.4.2 Indirect Capital Cost 3-34
3.4.5 Operating and Maintenance Cost Model 3-34
3.5 References 3-37
v
-------
CONTENTS
VOLUME 2
(Continued)
4.0 Post Combustion 4-1
4.1 Electrostatic Precipitators 4-1
4.1.1 Process Description 4-1
4.1.2 Battery Limits 4-3
4.1.3 Details of Physical/Performance Models 4-6
4.1.4 Capital Cost Model 4-8
4.1.4.1 Process Capital Costs 4-8
4.1.4.2 Indirect Capital Costs 4-11
4.1.5 Operating and Maintenance Cost Model 4-11
4.2 Fabric Filter 4-14
4.2.1 Process Description 4-14
4.2.2 Battery Limits 4-16
4.2.3 Details of Physical/Performance Models 4-18
4.2.4 Capital Cost Model 4-21
4.2.4.1 Process Capital Costs 4-21
4.2.4.2 Indirect Capital Costs 4-23
4.2.5 Operating and Maintenance Cost Model 4-23
4.3 Gas Conditioning 4-26
4.3.1 Spray Humidification 4-26
4.3.1.1 Process Description 4-27
4.3.1.2 Battery Limits 4-27
4.3.1.3 Details of Physical Performance Model . 4-29
4.3.1.4 Capital Cost Model 4-30
4.3.1.5 Operating and Maintenance Cost Model . 4-30
4.3.2 Sulfur Trioxide (S03) Conditioning 4-33
4.3.2.1 Process Description 4-33
4.3.2.2 Battery Limits 4-33
4.3.2.3 Details of Physical Performance Models 4-33
4.3.2.4 Capital Cost Model 4-34
4.3.2.5 Operating and Maintenance Cost Model . 4-34
4.4 Lime/Limestone Wet FGD 4-34
4.4.1 Process Description 4-34
4.4.2 Battery Limits 4-38
4.4.3 Details of Physical Performance and Cost Models 4-39
4.5 ADVACATE Process 4-42
4.5.1 Process Description 4-42
4.5.2 Battery Limits 4-46
4.5.2.1 Reagent Feed System 4-46
4.5.2.2 S02 Removal System 4-47
vi
-------
CONTENTS
VOLUME 2
(Continued)
4.5.2.3 Flue Gas System 4-48
4.5.2.4 Waste Handling System 4-48
4.5.2.5 General Support 4-48
4.5.3 Details of Physical Performance and Cost Models 4-48
4.5.3.1 Process Capital Cost Model 4-49
4.5.3.2 Indirect Capital Cost 4-49
4.5.3.3 Operating and Maintenance Cost Model . 4-49
4.6 Spray Drying FGD 4-52
4.6.1 Lime Spray Drying 4-52
4.6.1.1 Process Description 4-52
4.6.1.2 Battery Limits 4-57
4.6.1.3 Details of Physical Performance and
Cost Models 4-58
4.6.1.4 Capital Cost Model 4-59
4.6.1.5 Operating and Maintenance Cost Model . 4-60
4.6.2 Duct Spray Drying 4-68
4.6.2.1 Process Description 4-68
4.6.2.2 Battery Limits 4-69
4.6.2.3 Capital Cost Model 4-69
4.7 Dry Sorbent Injection 4-69
4.7.1 Process Description 4-69
4.7.2 Battery Limits 4-73
4.7.3 Details of Physical Performance and Cost Models 4-74
4.7.3.1 Process Capital Cost Model 4-74
4.7.3.2 Indirect Capital Costs 4-74
4.7.3.3 Operating and Maintenance Cost Model . 4-74
4.8 Selective Catalytic Reduction (SCR) 4-77
4.8.1 Process Description 4-77
4.8.2 Battery Limits 4-80
4.8.3 Details of Physical Performance and Cost Models 4-81
4.8.3.1 Catalyst Volume 4-81
4.8.3.2 Ammonia Injection 4-84
4.8.3.3 Pressure Drop 4-85
4.8.4 Capital Cost Model 4-85
4.8.4.1 Process Capital Cost Model 4-86
4.8.4.2 Indirect Capital Costs 4-90
4.8.5 Operating and Maintenance Cost Model 4-90
4.9 References 4-94
vii
-------
CONTENTS
VOLUME 2
(Continued)
5.0 Combustion Technologies 5-1
5.1 Atmospheric Fluidized Bed Combustion (AFBC) 5-1
5.1.1 Process Description 5-1
5.1.2 Battery Limits 5-3
5.1.3 Details of Physical Performance Models 5-5
5.1.4 Capital Cost Model 5-7
5.1.4.1 Process Capital Costs 5-7
5.1.4.2 Indirect Capital Costs 5-10
5.1.5 Operating and Maintenance Cost Model 5-10
5.2 Pressurized Fluidized Bed Combustion (PFBC) 5-13
5.2.1 Process Description 5-13
5.2.2 Battery Limits 5-13
5.2.3 Details of Physical Performance Model 5-15
5.2.4 Capital Cost Model 5-15
5.2.4.1 Process Capital Costs 5-15
5.2.4.2 Indirect Capital Costs 5-16
5.2.5 Operating and Maintenance Cost Model 5-16
5.3 Integrated Gasification Combined Cycle (IGCC) 5-18
5.3.1 Process Description 5-18
5.3.2 Battery Limits 5-20
5.3.3 Details of Physical Performance Models 5-24
5.3.4 Capital Cost Model 5-26
5.3.4.1 Process and Indirect Capital Costs . . 5-26
5.3.4.2 Other Indirect Capital Cost 5-30
5.3.5 Operating and Maintenance Cost Model 5-30
5.4 Pulverized Coal-Fired Plant 5-36
5.4.1 Process Description 5-36
5.4.2 Battery Limits 5-37
5.4.3 Details of Physical Performance Models 5-37
5.4.4 Capital Cost Model 5-38
5.4.4.1 Process Capital Costs 5-38
5.4.4.2 Indirect Capital Costs 5-40
5.4.5 Operating and Maintenance Cost Model 5-40
5.5 References 5-43
viii
-------
CONTENTS
(Continued)
VOLUME 3
INTEGRATED AIR POLLUTION CONTROL SYSTEM
PROGRAMMER'S MAINTENANCE MANUAL
1.0 Introduction 1-1
1.1 System Overview 1-1
1.2 Background 1-1
1.3 Model Description, Organization, and Capability .... 1-2
1.4 Run-Time System Files 1-4
1.5 System Flow Chart 1-5
1.6 System Module Hierarchy Chart 1-5
1.7 System Data File Formats 1-8
1.7.1 Parameter Files 1-8
1.7.2 Batch Data Files 1-22
1.7.3 Discrete Files 1-24
1.7.4 ASCII Field Definition Files 1-25
1.7.5 Help Database Files 1-26
1.8 Procedures for Building the IAPCS Program 1-26
1.9 Program Requirements and Installation 1-40
1.10 References 1-42
2.0 FORTRAN Model Code 2-1
2.1 FORTRAN Language Source Code Files 2-1
2.2 FORTRAN Subroutine Summary 2-3
2.3 FORTRAN Subroutine Hierarchy Chart 2-8
2.4 Description of FORTRAN Subroutines 2-10
2.4.1 Action Diagrams 2-13
2.4.1.1 Action Diagram for MODEL Subroutine . . 2-13
2.4.1.2 Action Diagram for DRIVER Subroutine . 2-17
2.4.2 FORTRAN Module Descriptions 2-18
2.5 FORTRAN Coding Conventions 2-33
2.6 Main FORTRAN Variables 2-35
2.6.1 Arrays 2-35
2.6.2 Scalar Numeric Variables 2-37
2.6.3 Logical Flag Variables 2-38
2.7 Usage of FORTRAN Common Blocks 2-38
2.8 Usage of FORTRAN to C Interface Files 2-55
ix
-------
CONTENTS
VOLUME 3
(Continued)
3.0 FORTRAN Code Listings 3-1
3.1 FORTRAN Source Code File Listings 3-1
4.0 C Language Code For User Interface 4-1
4.1 C Language Program Source Code Files 4-1
4.2 Summary of C Subroutines 4-1
4.3 C Subroutine Hierarchy Chart 4-3
4.4 Description of C Subroutines 4-5
4.4.1 Action Diagrams for Major C Subroutines 4-5
4.4.2 C Subroutine Details 4-9
4.5 Commercial C Language Support Packages 4-15
4.6 Main C Variables 4-15
5.0 C Language Code Listings 5-1
5.1 C Source Code File Listings 5-1
DISKETTE 1
INTEGRATED AIR POLLUTION CONTROL SYSTEM
EXECUTABLE FILES
(1.2 MB, 5 1/4 inch diskette)
DISKETTES 2 AND 3
INTEGRATED AIR POLLUTION CONTROL SYSTEM
SOURCE CODES
(Two 1.2 MB, 5 1/4 inch diskettes)
x
-------
FIGURES
VOLUME 1
INTEGRATED AIR POLLUTION CONTROL SYSTEM
USER'S GUIDE
* * *
VOLUME 2
INTEGRATED AIR POLLUTION CONTROL SYSTEM
TECHNICAL DOCUMENTATION MANUAL
Number Page
2-1 Effect of Coal Rank on Furnace Sizing 2-2
2-2 Coal Supply Regions 2-6
2-3 Level 4 Coal Preparation Plant 2-15
3-1 Distributed Mixing Burner Utility Boiler Design 3-3
3-2 Conceptual Diagram of Distributed Mixing Burner 3-3
3-3 Schematic Diagram of an Overfire Air System (OFA) 3-5
3-4 Tangential Firing System Incorporating Low NOx Concentric
Firing System for NOx Control-Coal Firing 3-6
3-5 Injection Angles for Fuel and Air--Utah Power
& Light Company 3-6
3-6 Natural Gas Reburn--for Wall-fired Boiler 3-18
3-7 Lime Injection Multistage Burner System 3-32
4-1 Typical Dry Electrostatic Precipitator 4-2
4-2 ESP Battery Limits 4-4
4-3 ESP Module for Designing the Duct Layout 4-5
xi
-------
FIGURES
VOLUME 2
(Continued)
Number Page
4-4 Duct Layout for Industrial Boilers and Utility
Boilers Below 250 MW 4-7
4-5 Duct Layout for 250- to 499- MW Boilers 4-7
4-6 Fabric Filter System 4-15
4-7 Fabric Filter Battery Limits 4-17
4-8 Fabric Filter and Duct Layout for Boilers Less Than 250 MW . 4-19
4-9 Fabric Filter and Duct Layout for Boilers Between
250 and 649 MW 4-19
4-10 Fabric Filter and Duct Layout for Boilers Greater
Than 650 MW 4-20
4-11 Simplified Process Flow Diagram of Spray Humidification
System 4-28
4-12 Lime/Limestone FGD System Flow Diagram 4-36
4-13 ADVACATE FGD System (Retrofit Plant - Case 1 and 2) .... 4-43
4-14 ADVACATE FGD System (Retrofit Plant - Case 3 and 4) .... 4-44
4-15 Lime Spray Dryer Process Flow Diagram 4-55
4-16 Flow Diagram of Dry Sorbent Injection FGD 4-71
4-17 Possible SCR Configurations 4-79
5-1 Conventional AFBC Boiler Flowsheet 5-2
5-2 Generalized Block Flow Diagram of Combined Cycle Coal
Gasification Power Generation 5-19
xii
-------
FIGURES
(Continued)
VOLUME 3
INTEGRATED AIR POLLUTION CONTROL SYSTEM
PROGRAMMER'S MAINTENANCE MANUAL
Number Page
1-1 IAPCS System Flow Chart 1-6
1-2 IAPCS System Module Hierarchy Diagram 1-7
1-3 Software Compile/Link Diagram 1-28
2-1 FORTRAN Subroutine Hierarchy Chart 2-9
2-2 FORTRAN Subroutine Call Tree for MODEL Routine 2-11
2-3 Action Diagram for MODEL Subroutine .... 2-13
2-4 Action Diagram for DRIVER Subroutine 2-17
4-1 C Subroutine Hierarchy Chart 4-4
xiii
-------
TABLES
VOLUME 1
INTEGRATED AIR POLLUTION CONTROL SYSTEM
USER'S GUIDE
VOLUME 2
INTEGRATED AIR POLLUTION CONTROL SYSTEM
TECHNICAL DOCUMENTATION MANUAL
Number Page
2-1 Technical Factors Affecting Coal Switching 2-3
2-2 Coal Supply Regions . 2-7
2-3 Consumption Data of Bituminous and Subbituminous
Coals in the U.S. from 1982 to 1986 2-10
2-4 Process Capital Costs for Coal Switching/Blending
from Bituminous to Subbituminous Coals 2-11
2-5 Indirect Capital Costs for Coal Switching/Blending:
EPRI Methodology 2-13
2-6 Estimated Characteristics and Costs of Raw and
Cleaned Coals 2-17
3-1 Selection Criterion for Low N0x Combustion Technologies
Based on Fuel and Firing Type 3-10
3-2 Process (Direct) Capital Cost Equations for Low N0x
Combustion Applied to Power Plants (June 1982 $) 3-15
3-3 Indirect Capital Costs for Low NO Combustion:
EPRI Methodology 3-16
3-4 Process Capital Costs for Natural Gas Reburning 3-21
xiv
-------
TABLES
VOLUME 2
(Continued)
Number Page
3-5 Indirect Capital Costs for Natural Gas Reburning:
EPRI Methodology 3-22
3-6 Operating and Maintenance Cost Procedures for
Natural Gas Reburning 3-23
3-7 Process Capital Costs for Natural Gas Substitution 3-28
3-8 Indirect Capital Costs for Natural Gas Substitution:
EPRI Methodology 3-29
3-9 Operating and Maintenance Cost Procedures for Natural
Gas Substitution . 3-30
3-10 Process Capital Cost Equations for LIMB 3-35
3-11 Indirect Capital Costs for LIMB: EPRI Methodology 3-36
3-12 Operating and Maintenance (0&M) Equations
for LIMB Process 3-37
4-1 Estimated Particulate Removal Efficiencies for Cold-Side
ESPs as a Function of Specific Collection Area and
Fly Ash Resistivity 4-9
4-2 Process Capital Costs for ESPs 4-10
4-3 Indirect Capital Costs for ESPs: EPRI Methodology 4-12
4-4 Operating and Maintenance Costs for ESPs 4-13
4-5 Process Capital Costs for Fabric Filters . 4-22
4-6 Indirect Capital Costs for Fabric Filters: EPRI Methodology 4-24
4-7 Operating and Maintenance Costs for Fabric Filters 4-25
4-8 Process Capital Costs for Spray Humidification 4-31
4-9 Indirect Capital Costs for Spray Humidification:
EPRI Methodology 4-32
4-10 Operating and Maintenance Cost Procedures for
Spray Humidification 4-32
xv
-------
TABLES
VOLUME 2
(Continued)
Number Page
4-11 Indirect Capital Costs for SO, Conditioning:
EPRI Methodology 4-35
4-12 L/LS FGD Design and Performance Parameters 4-41
4-13 Process (Direct) Capital Cost Equations for ADVACATE .... 4-50
4-14 Indirect Capital Costs for ADVACATE: EPRI Method 4-51
4-15 Annual Cost Equations for ADVACATE 4-53
4-16 Lime Spray Drying Base Case 4-61
4-17 Process Capital Costs for Lime Spray Drying ($1987) .... 4-64
4-18 Operating and Maintenance Cost Procedures for
Lime Spray Drying ($1987) 4-65
4-19 Process (Direct) Capital Cost Equations for Dry
Sorbent Injection 4-75
4-20 Indirect Capital Costs for Dry Sorbent Injection:
EPRI Method 4-76
4-21 Annual Cost Equations for Dry Sorbent Injection 4-78
4-22 Process (Direct) Capital Cost Equations for Hot-Side
Selective Catalytic Reduction Applied to New
Power Plants 4-87
4-23 Process (Direct) Capital Cost Equations for Cold-Side
Selective Catalytic Reduction Applied to New
Power Plants 4-89
4-24 Indirect Capital Costs for SCR: EPRI Methodology 4-91
4-25 Annual Cost Equations for Selective Catalytic Reduction . . 4-92
5-1 Process Capital Cost Equations for New Overbed Feed AFBC . . 5-8
5-2 Equipment Reuse Factor as a Fraction of New AFBC
Process Area Cost 5-9
xvi
-------
TABLES
VOLUME 2
(Continued)
Number Page
5-3 Indirect Capital Costs for AFBC Systems: EPRI Methodology . 5-11
5-4 Indirect Capital Costs for New PFBC Plants:
EPRI Methodology 5-17
5-5 Process and Indirect Capital Cost Equations for
Texaco's IGCC Process 5-27
5-6 Existing Reusable Equipment as a Percentage of
Base Plant Costs for IGCC 5-29
5-7 Indirect Capital Costs for IGCC Systems:
EPRI Methodology 5-31
5-8 Operating and Maintenance (O&M) Cost Equations for
Texaco IGCC Process: Combined Cycle Phase 5-32
5-9 Operating and Maintenance (O&M) Cost Equations for
Texaco IGCC Process: Gasification Phase 5-33
5-10 Maintenance Costs as a Fraction of Total Plant
Cost for Gasification Phase 5-34
5-11 Process Capital Cost Equations for Pulverized
Coal-Fired Power Plants 5-39
5-12 Indirect Capital Costs for Pulverized Coal-Fired
Plants: EPRI Methodology 5-41
xvii
-------
ABBREVIATIONS AND SYMBOLS
ABBREVIATIONS
AEERL
--
Air and Energy Engineering Research Laboratory
ADVACATE
--
Advanced Silicate Process
AFBC
--
atmospheric fluidized bed combustion
AFDC
--
allowance for funds during construction
ASCII
--
American Standard Code for Information Interchange
AUSM
--
advanced utility simulation model
CE
--
Chemical Engineering
CG
--
coal gasfication
CS
--
coal switching
CS/B
--
coal switching and blending
CSO
--
coal switching option
DOS
--
disk operating system
DSD
--
duct spray drying
DSI
--
dry sorbent injection
EPA
--
Environmental Protection Agency
EPRI
--
Electric Power Research Institute
ESP
--
electrostatic precipitator
FBC
-r
fluidized bed combustion
FF
--
fabric filter
FGD
--
flue gas desulfurization
FPD
--
fuel price differential
FSI
--
furnace sorbent injection
ft
--
feet
GC
--
gas conditioning
IAPCS
--
Integrated Air Pollution Control System
IGCC
--
integrated gasification combined cycle
K
--
kilobyte
kW
--
kilowatt
kWh
killowatt hour
xviii
-------
ABBREVIATIONS AND SYMBOLS
(Continued)
LE
--
life extension
LIMB
--
lime injection multistage burner
L/LS FGD
--
lime/limestone flue gas desulfurization
LNB
--
low-NOx burner
LNC
--
low-NOx combustion
LSD
--
lime spray drying
MB
--
megabyte
NAPAP
--
National Acid Precipitation Assessment Program
NCC
--
National Computer Center
NGR
--
natural gas reburning
NSPS
--
new source performance standard
OFA
--
overfire air
O&M
--
operating and maintenance
PCBB
--
pulverized coal burning boiler
PCC
--
physical coal cleaning
PFBC
--
pressurized fluidized bed combustion
PM
--
particulate matter
RAM
--
random access memory
SCA
--
specific collection area
SCR
--
selective catalytic reduction
sec
--
second
SD
--
spray drying
SH
--
spray humidification
SI
--
sorbent injection
sq ft
--
square feet
TAG
--
Technical Assessment Guideline
TVA
--
Tennessee Valley Authority
SYMBOLS
NOx
--
nitrogen oxides
so2
--
sulfur dioxide
S03
--
sulfur trioxide
xix
-------
METRIC EQUIVALENTS
Readers who are more familiar with the metric system may use the
following factors to convert the nonmetric units used in this report to that
system.
Non-metric Multiplied bv Yields Metric
acfm 0.000472 acms
acre 4047 m2
atm 101.325 kPa
Btu 1.055 kJ
cfm 0.000472 cms
dscf 0.0283 dscm
ft 0.305 m
ft2 0.093 m2
ft3 28.317 L
gal. 3.785 L
HP 0.746 kW
in. 2.54 cm
in. H20 0.249 kPa
lb 0.454 kg
micron 1.0 |im
mi 1e 1.609 km
psia 6.895 kPa
ton 907.2 kg
yd2 0.836 m2
yd3 0.765 m3
#F 5/9(®F-32) *C
XX
-------
SECTION 1.0
INTRODUCTION
1.1 SYSTEM OVERVIEW
The Integrated Air Pollution Control System (IAPCS) was developed for
the U. S. Environmental Protection Agency's Air and Energy Engineering
Research Laboratory (US EPA-AEERL) to estimate costs and performance for
emission control systems applied to coal-fired utility boilers. The model is
capable of projecting a material balance, an equipment list, and capital
investment and revenue requirements based upon user-specified input data. The
model includes conventional and emerging technologies affecting sulfur dioxide
(S02), nitrogen oxides (N0x), and particulate matter (PM) pre-, in-situ, and
post-combustion emission control systems. A variety of technology modules
built into the model can be incorporated and combined, with interaction and
integrated effects for various control configurations reflected in the
material balance. Cost and performance estimates can be analyzed in terms of
integrated technologies.
1.2 BACKGROUND
The IAPCS computer model was developed to estimate cost and performance
of air emission control equipment for coal-fired utility boilers. The IAPCS
model evolved over the years from a FORTRAN-coded mainframe computer model
known as the Shawnee Model which was developed by the Tennessee Valley
Authority (TVA). The first version (unpublished) of IAPCS (IAPCS-1), a
mainframe computer model, was completed in November 1983 and was housed at
U.S. EPA's National Computer Center (NCC). An IBM PC version of IAPCS
(IAPCS-2) was published in September 1986, and this version incorporated a
number of enhancements and upgrades to the various pollution control modules.
A third version of IAPCS (IAPCS-3 was not published) incorporated additional
1.1 System Overview
1.2 Background
1-1
-------
enhancements and added several new technology modules, including selective
catalytic reduction (SCR), natural gas reburning (NGR), and gas conditioning
(GC). The latest version, IAPCS Version 4.0, includes further enhancements to
technology modules and a number of new technology additions.
1.3 MODEL DESCRIPTION, ORGANIZATION, AND CAPABILITY
IAPCS Version 4.0 is a personal computer-based model for cost and
performance estimates of pollution control systems for coal-fired utility
boilers. In this current and latest version a C language User Interface has
been added to the original model to facilitate the input of data for the
FORTRAN model.
IAPCS Version 4.0 is organized into three volumes and three diskettes:
Volume 1: User's Guide; Volume 2: Technical Documentation Manual;
Volume 3: Programmer's Maintenance Manual; Diskette 1: Executable Files; and
Diskettes 2 and 3: Source Codes in Fortran and C Language and other files
necessary to create an executable file. Instructions for compiling the
program to produce an executable file from the source codes can be found in
Volume 3: Programmer's Maintenance Manual, Section 1.8: Procedures for
Building the IAPCS Program.
The IAPCS Version 4.0 documentation format was selected to facilitate
future maintenance and enhancement of the IAPCS model. This includes
correction of software errors, correction of existing deficiencies, and
enhancement of the modeling system with new capabilities.
The intended audience of IAPCS Version 4.0 includes programmers and
research analysts involved in maintaining and upgrading the IAPCS model code.
This includes IAPCS code corrections for existing problems and the addition of
new technology modules to the program.
Conventional and emerging technologies which are included in the IAPCS
Verson 4.0 are the following:
1.1 System Overview
1.2 Background
1-2
-------
• Overfire air/low NOx burners (OFA/LNB)
• Lime injection multistage burners (LIMB)
• Physical coal cleaning (PCC)
• Spray humidification (SH)
• Electrostatic precipitator (ESP)
• Fabric filter (FF)
• Lime spray drying/duct spray drying (LSD/DSD)
• Wet limestone flue gas desulfurization (FGD)
• Dry sorbent injection (DSI)
The program will accept any reasonable configuration of these technologies,
some of the exceptions are as follows:
• Spray humidification cannot be utilized with DSI or LSD.
• LSD or DSI is not to be preceded by a FF or an ESP.
• Identical control devices in series are not permitted.
Control technology interactions are shown in the material balance tabulation
at the exit of each module.
Parameter files are an important feature of the IAPCS Version 4.0
program. The parameter file has specific default values for program operation
and calculation. Based on a recent program the user may then modify these
default values for preference and site-specific needs.
The initial run of the IAPCS Version 4.0 utilizes the default
performance values for each control technology. Costs presented reflect
default performance levels for control equipment. The user can revise the
default values and run the model. For particulate control the ESP or FF can
be modified. The desired pollutant mass emission rate/overall system removal
efficiency can be achieved through modification of the default values. The
removal capability of a particular module can be altered through the input of
a new module efficiency or a new system emission rate.
1.3 Model Description, Organization, and Capability
1-3
12/31/89
-------
1.4 RUN-TIME SYSTEM FILES
Version 4.0 of the IAPCS model consists of a single executable program
file (IAPCX.EXE) and various types of permanent and temporary support data
files.
The next group of files are three dBase format files which contain all
of the text information used for display of the on-screen user menus and
context-sensitive help messages.
IAPCS uses a pair of 'Parameter Files', one for TVA format and one for
EPRI. These parameter files contain a complete set of default model
parameters which are appropriate for the particular reporting format. The
user screens use these default settings unless the user specifies an
alternative value by use of the parameter entry screens. The users selections
are stored in a different format and the default parameter files remain
unmodified.
IAPCS4.EXE
IAPCS executable program
IAPCXHLP.DBF
IAPCXHLP.DBT
IAPCXHLP.NDX
DFFASC.EPR
DISCRETE.EPR
PARMFILE.EPR
DFFASC.TVA
DISCRETE.TVA
PARMFILE.TVA
MMATRIX.DAT
*.TVA
*.EPR
?.?
Help/Menu dBase Database File
Help/Menu dBase Database Text File
Help/Menu dBase Database Index File
EPRI parameter input format specifications
EPRI pop-up window parameter selections
EPRI default parameter file
TVA parameter input format specifications
TVA pop-up window parameter selections
TVA default parameter file
Coal cleaning database
User-specified TVA-mode parameter file
User-specified EPRI-mode parameter file
User-specified Batch run data files
1.4 Run-time System Files
1-4
-------
1.5 SYSTEM FLOW CHART
Figure 1-1 displays a System Flow Chart for the IAPCS program. The
symbols and Format are for a Yourdon Context Diagram.1 A single 'bubble'
represents an overview of the entire program with external sources (permanent
data files) and sinks (output files and reports) depicted as blocks. Data
Stores (internal and temporary files) are shown.
IAPCS uses four permanent files (sources) to operate. These include:
1) A User Screen Menu and Message Database used for all user screens
and messages;
2) A Default Parameter File for TVA format runs;
3) A Default Parameter File for EPRI format runs; and,
4) A Database of Coal Cleaning Factors.
The main Data Store is a File called the 'Batch File' which contains the
actual numeric parameters to use for each of a series of IAPCS runs. Each
segment of the Batch File is derived from numeric values in the corresponding
Default Parameter File.
Only one of the two Output Reports (Data Sinks) is produced for a given
run, as each run is specific to either the TVA or EPRI Format. Optionally,
these Output Reports may be appended to previously created reports.
1.6 SYSTEM MODULE HIERARCHY CHART
Figure 1-2 shows a system module Hierarchy Chart for IAPCS. For the
purpose of interpreting this diagram, a module shall mean a collection of
functionally related subroutines. Figure 1-2 shows these functional areas
further sub-divided by the computer programming language used for each - C or
FORTRAN.
IAPCS can be generalized into three components
1.5 System Flow Chart
1-5
-------
Figure 1-1. IAPCS System Flow Chart.
1.5 System Flow Chart
1-6
-------
1) A small C language control routine;
2) A mixed language user-interface component (C and FORTRAN); and,
3) A FORTRAN cost modeling component.
Looking at the top of Figure 1-2, the Main Control Routine is the top-
most module. Proceeding in a top-down fashion, the User-Interface is
represented by the entire sub-tree shown at the left below the Control
Routine. The Cost Modeling Component MODEL appears as the right sub-tree
below the Control Routine, and also as a sub-component of the User-Interface.
The FORTRAN Cost Modeling Component (MODEL) is invoked directly by the
main Control Routine for batch mode execution, or indirectly from the User-
Interface component for interactive mode execution.
1.7 SYSTEM DATA FILE FORMATS
1.7.1 Parameter Files
IAPCS uses a set of files called Parameter Files, alternatively called
Input Files. Two special Parameter Files called PARMFILE.TVA and PARMFILE.EPR
contain the default values for the TVA and EPRI constants used in the costing
model. These default parameter files (or any other user-specified parameter
files) may be loaded into the input screen of the interactive user interface
and modified. Parameter file data from the user interface may then be used to
create new parameter files or may be passed directly to the cost modeling
subsystem. Parameter file data from the user interface may also be stored in
the form of Batch Mode Data Files for later use, as shown in Figure 1-1.
This file contains all of the sub-menu data items and corresponding
default values available to the menuing system. Beyond referencing the screen
group to which a sub-menu item belongs, all other information regarding
logical association between any individual item and those that follow is
contained in the file DFFASC.xxx.
1.6 System Module Hierarchy Chart
1-8
-------
The file format of the Parameter File is as follows:
31 F9.X A64
Format Item
31 Screen Group
F9.x
Default Value
A65
Menu Text
Description
The screen group defines the
menu to which the item
logically belongs. It only
has a function when it marks
the first occurrence of the
screen group in the list of
items. All subsequent
occurrences of a screen group
are ignored and relational
information is obtained from
DFFASC.xxx. It must be
present as the first item of
each line.
The default value is the
initial value displayed when
the menu is first created. It
may be edited and will replace
the original value.
This is the text displayed on
the menu. Note: For the
comment strings, it is the
default value and the previous
default value is ignored.
This entry may be omitted.
All menu items, with the exception of the comment line text, can
occupy any location within PARMFILE.xxx provided the information
for sorting the menu items is contained in DFFASC.xxx. There are,
however, four blocks of lines reserved for specific data. They
are:
1.7 System Files Format
1-9
-------
Parmfile In #
COMMENT LOCATION
SELECTED TECHNOLOGIES
OPTIMIZATION INFORMATION
RUN DATA INFORMATION
548
550
560
563
The following is a listing of the EPRI Parameter File segmented by
logical subgroups. The following sub-groupings relate to a Screen Group
Number in the Parameter File which corresponds to the segment of the user
interface where this information is operated on by the user. This listing
uses the following format:
1) Parameter File Line Number (same as Parameter Array sub-script)
2) Screen Group Number
3) Default Numeric Value (EPRI in this listing)
4) Description used for user screens
Screen Group 1 - Run Comnents
548 1 0.0000 Plant and Boiler Description Card
549 1 0.0000 Technology Description Card
Screen Group 2 - Boiler Specific Parameters
563 2 1.000 Boiler Firing Method
564 2 350.0 Boiler Size, MUe
565 2 65.00 Capacity Factor, dimensionless
566 2 2.000 Retrofit Status
567 2 1965. Year of Conmercial Operation of Boiler
568 2 310.0 Temperature at Air Heater Exit Temperatue, Degrees Farenheit
569 2 1.000 Coal Type
570 2 1.000 Typical Coal Type
572 2 1.000 Boiler Bottom Type
573 2 4.000 Output Option
Screen Groqj 3 - Rin-Of-Mine Coal Characteristics
574 3 11950. ROM Heating Value
575 3 2.230 ROM Sulfur Content, %
576 3 15.90 ROM Ash Content, X
1.7 System Files Format
1-10
-------
577 3 0.0000 ROM Coal Cost, S/ton*
578 3 0.4000 ROM Na20 Content in Ash, %
579 3 6.500 ROM Alkalinity Content in Ash,
580 3 0.1000 ROM Chlorine Content in Ash, X
581 3 9.000 ROM FeO Content, X
582 3 3.300 ROM Moisture Content, X
583 3 33.80 ROM Volatile Matter Content, %
584 3 47.00 ROM Fixed Carbon Content, X
Screen Grotqp 4 - Coal Cleaning Characteristics
Clean Heating Value
Clean Sulfur Content, X
Clean Ash Content, X
Clean Coal Cost, $/ton
Clean Na20 Content in Ash, X
Clean Alkalinity Content in Ash, X
Clean Chlorine Content in Ash, X
Clean FeO Content, X
Clean Moisture Content, %
Clean Volatile Matter Content, X
Clean Fixed Carbon Content, X
Screen Group 5 - Technology Modules to Iiqplement
550 5 0.0000 Number of Technology Modules
551 5 0.0000 First Technology Module in Gas Path Order
552 5 0.0000 Second Technology Module in Gas Path Order
553 5 0.0000 Third Technology Module in Gas Path Order
554 5 0.0000 Fourth Technology Module in Gas Path Order
555 5 0.0000 Fifth Technology Module in Gas Path Order
556 5 0.0000 Sixth Technology Module in Gas Path Order
557 5 0.0000 Seventh Technology Module in Gas Path Order
558 5 0.0000 Eighth Technology Module in Gas Path Order
559 5 0.0000 Ninth Technology Module in Gas Path Order
Screen Groip 6 - Emission Rate Target Parameters
560 6 0.0000 Rerun with new emission rate
561 6 0.0000 Module to be Optimized
562 6 0.0000 Target Emission Rate
585
4
12600.
586
4
1.420
587
4
10.00
588
4
4.570
589
4
0.4000
590
4
6.500
591
4
0.1000
592
4
9.000
593
4
5.600
594
4
33.90
595
4
50.50
Screen Group 7 - Systewide Parameters
1
7 0.8846
2
7 7914.
3
7 0.0000
20
7 100.0
21
7 0.5000
22
7 0.9950
58
7 0.0000
92
7 0.04000
195
7 0.0000
Base Thermal Efficiency
Gross Heat Rate, BTU/KUH
Boiler Net Heat Rate (Calculated if Zero), BTU/KWH
Boiler Load, X
Solid Combustible Loss, X
Combustible Loss Correction Factor, Fraction
Flow Rate, ACFM (calculated if zero)
Default Na20 Content of Ash, X
Retrofit Difficulty Factor Calculation Method
•Readers more familiar with metric units may use the factors at the end of the front matter to convert to
that system.
1.7 System Files Format
1-11
-------
229 7 10.00 Engineering and Home Office Fees, X Process Capital
230 7 10.00 General Facilities, X Process Capital
231 7 15.00 Project Contingency, X Process Capital
232 7 10.00 Process Contingency, X Process Capital
233 7 0.0000 Sales Tax, X Process Capital
234 7 0.0000 Royalty Allowance, X Process Capital
235 7 0.0000 Inventory Capital, X Process Capital
236 7 0.0000 Initial Catalyst, X Total Process Capital
238 7 3.000 Maintenance Labor and Material, X Total Process Capital
239 7 1.000 Write Summary Output File?
342 7 35.00 Annual Rainfall, in/year
343 7 0.0000 Seepage Rate, cm/sec
344 7 32.00 Annual Evaporation, in/year
349 7 5.000 Sludge Disposal Option
350 7 1.000 Sludge Fixation Option
351 7 9999. Total Available Land for Construction of Waste Facility, ACRES
352 7 75.00 Uncompacted Waste Bulk Density, LB/CU FT
353 7 95.00 Compacted Waste Bulk Density, LB/CU FT
354 7 5280. Distance from Utility Area to Disposal Site, FT
355 7 1.000 Disposal Site Lining
356 7 12.00 Clay Depth, IN
391 7 0.0000 Fraction On-site Disposal
493 7 0.0000 Boiler Lost Generation (outage) Period (Days)
494 7 0.0000 Base RDF Adjustment for Add-On Technology Class (1)
495 7 0.0000 Base RDF Adjustment for Cold-Duct Technology Class (2)
496 7 0.0000 Base RDF Adjustment for Hot-Duct Technology Class (3)
497 7 0.0000 Base RDF Adjustment for In Situ Technology Class (4)
498 7 0.0000 Base RDF Adjustment for Pre-Combustion Technology - Class (5)
529 7 0.0000 demolition rate AS X of process capital (X)
530 7 1.000 (1) Single burner or (2) Cluster burner furnace configuration
531 7 1.000 (1) Single or (2) Split wall furnace configuration
532 7 1.000 (1) Physical Coal Cleaning or (2) Coal Substitution/Blending
533 7 3.000 (CSB) Coal Subst./Blending Typical LSC Coal Type
534 7 0.0000 (X) Parasitic demand on system capacity (MW) -- calculated if 0
535 7 10.00 (CSB) general facilities (X)
536 7 10.00 (CSB) eng. and home office fees (X)
537 7 30.00 (CSB) project contingency (X)
538 7 10.00 (CSB) process contingency (X)
539 7 0.0000 (CSB) inventory capital (X)
540 7 0.0000 Target X S removal (>0) or actual CLEAN X S (<0)
Screen Group 8 - Uncontrolled Coal Parameters
4
8 0.8000
5
8 0.0000
6
8 0.5000
7
8 0.3500
8
8 0.3150
9
8 0.9750
10
8 0.8750
11
8 0.7500
12
8 0.5250
13
8 0.3500
14
8 0.3750
15
8 0.2000
16
8 0.8500
17
8 9820.
18
8 0.4000
19
8 0.1700
476
8 4.000
477
8 4.000
478
8 16.00
Particulate Overhead Ratio, if Zero, AP 42 USED, Fraction
S02 Overhead Ratio, if Zero, AP 42 Emission Factors Used
Particulate Dry-Bottom Emission Factor(AP42 Suplmt.13 Rev),Fract
Particulate Wet-Bottom Emission Factor (ibid), Fraction
Particulate Lignite Emission Factor (ibid). Fraction
S02 Bituminous Emission Factor (ibid). Fraction
S02 Sub-Bituminous Emission Factor (ibid), Fraction
S02 Lignite Emission Factor (ibid), Fraction
NOx Wall Fired Bituminous/Sub-Bitum Dry-Bottom (ibid), Fraction
NOx Wall Fired Lignite Dry-Bottom (ibid), Fraction
NOx Tangen. Fired Bituminous/Sub-Bitum. Dry Bottom (ibid), Fract
NOx Tangential Lignite Dry-Bottom
All Wet-Bottom (as above)
PC F-Factor (ibid, DSCF/MMBTU)
Excess Air, Fraction
Controlled Excess Air, Fraction
Database Coal Cleaning Technical Preparation Level
User-Defined Coal Cleaning Technical Preparation Level
Coal Supply Region
1.7 System Files Format
1-12
-------
Screen Groip 9 - Fan Parameters
23 9 10.00 Engineering and Home Office Fees, X Process Capital
24 9 10.00 General Facilities, X Process Capital
25 9 15.00 Project Contingency, X Process Capital
26 9 10.00 Process Contingency, X Process Capital
27 9 0.0000 Sales Tax, X Process Capital
28 9 0.0000 Royalty Allowance, X Process Capital
30 9 4.000 Maintenance Labor and Material, X Total Process Capital
147 9 0.0000 Inventory Capital, X Process Capital
289 9 1.000 Fan Retrofit Factor, dimensionless
Screen Group 10 - Economic Parameters
163 10 0.0000 0 & M Levelization Factor (Calc if 0), Dimensionless - decimal
164 10 0.0000 Capital Levelization Factor (Calc if 0), Dimensionless - decimal
165 10 0.0000 ITC Investment Tax Credit, X
166 10 30.00 B1 Book Life, Years
167 10 20.00 P1 Tax Life, Years
168 10 11.00 CO Cost of Debt, X
169 10 50.00 DR Debt Ratio, X
170 10 11.50 CP Cost Preferred Stock, X
171 10 15.00 PR Preferred Ratio, X
172 10 15.20 CE Cost of Common Stock, X (Common Ratios 100X-PR-DR)
173 10 38.00 TX Federal and State Income Tax, X
174 10 6.000 EI Inflation Rate, X
175 10 2.000 PTI Property Tax and Insurance, X
176 10 0.0000 ER Real Annual Escalation Rate, X
177 10 3.000 TDM Depreciation Method
178 10 1.000 DURAT Idealized Time Required for Construction (Yrs)
180 10 0.0000 Discount Rate, X Calculated from Above if 0
191 10 30.00 Actninistrative and Support Labor Factor (X of O&M Labor)
192 10 0.0000 Dollar Basis for Cost Output
199 10 8806. Year of Capital Costs (YYMM)
200 10 8806. Year of O&M Costs (YYMM)
290 10 8807. Date of CE indices, YYMM
402 10 343.0 CE Plant Index for Corresponding Year and Month of Cost
403 10 374.2 CE Material Index for Corresponding Year and Month of Cost
404 10 265.0 CE Labor Index for Corresponding Year and Month of Cost
405 10 113.0 O&M Index for Corresponding Year and Month of Cost
426 10 0.0000 Scope Adder for Beyond Technology Limits (dollars)
427 10 1.000 Labor Cost Multiplier for Geographic Differences
428 10 1.000 Material Cost Multiplier for Geographic Differences
429 10 1.000 Consumables Cost Multiplier for Geographic Differences
Screen Group 11 - Lime Spray Drying (LSD) Parameters
31 11 1.400 Stoichiometric Ratio
32 11 80.00 Utilization of Fly Ash Alkalinity, X
33 11 53.00 Average Molecular Weight of Alkalinity in Fly Ash
34 11 0.7250 Fresh Lime Component of Slurry, Fraction
35 11 70.00 MaxiRMD Efficiency of Spray Drying Absorbers, X
36 11 35.00 Maximum Solids in Slurry by Weight, X
37 11 4.636 Maximum Reactive Alkalinity/Megawatt
38 11 10.00 Maximum Efficiency of Fly Ash Alkalinity, X
39 11 1.560 Modified Particulate Loading Exiting Spray Dryer, Fract.
40 11 150.0 Spray Down Temperature, Degrees Farenheit
41 11 2.000 Pressure Drop Across Dryer for S0A, IN. H20
42 11 2.000 Installation Factor, Dimensionless
43 11 10.00 General Facilities, X Process Capital
44 11 10.00 Engineering and Home Office FEes, X Process Capital
45 11 30.00 Project Contingency, X Process CapitaL
46 11 4.300 Process Contingency, X Process Capital
1.7 System Files Format
1-13
-------
47
11
0.0000
48
11
0.0000
49
11
0.0000
50
11
0.2500
51
11
0.2000
53
11
43000.
54
11
70.00
55
11
0.0000
56
11
0.4300
57
11
1.500
59
11
6.000
60
11
0.0000
291
11
1.000
430 11
1.000
431
11
1.000
432
11
35.00
433
11
100.0
436
11
1.000
Sales Tax,X Process Capital
Royalty Allowance Factor, X Process Capital
Reactive Alkalinity Factor for Bituminous Coal,Fraction
Reactive Alkalinity Factor for Sub-Bituminous Coal, Fraction
Reactive Alkalinity Factor for Lignite Coal, Fraction
Operating and Supervision Labor, Manhours/year
Amount Flue Gas Going Topside for Spray Drying Absorb., X
Current Run is Combined Run for LSD
LSD Electric Useage, X Gross Kilowatts
LSD Replacement Parts Cost Factor, X Total Eqp Cost
Maintenance Labor and Material, X of total plant cost
Inventory Capital, X Process Capital
LSD Retrofit Factor, dimensionless
LSD Type
Pressure Drop Across -duct- for DSD, IN. H20 (Isd)
Maximum Efficiency of Duct Spray Drying, X (Isd)
Amount Flue Gas Going Topside for Duct Spray Drying, X (LSD)
Number of Spare Dryers (Isd)
Screen Groip 12 - Low-NOx Over-fired Boiler (LNBOfA) Parameters
61 12 10.00 Engineering and Home Office Fees, X Process Capital
62 12 10.00 General Facilities, X Process Capital
63 12 30.00 Project Contingency, X Process Capital
64 12 10.00 Process Contingency, X Process Capital
66 12 0.0000 Royalty Allowance Cost Factor, X Process Capital
67 12 0.0000 Sales Tax, X Process Capital
68 12 2.000 Maintenance Labor and Material, X of Total Plant Cost
69 12 0.0000 Inventory Capital, X Process Capital
194 12 0.0000 Percent NOx Reduction; Determined by LNC Method if 0.
198 12 1.000 Low NOx Combustion Method
463 12 0.0000 LNC Capital Cost Calculation Method
Screen Group 13 - Fabric Filter (FF) Pararters
71 13 2.000 Air-to-Cloth Ratio, CFM/Square Foot
72 13 99.70 Fabric Filter Efficiency, X
73 13 10.00 Minimum Bypass, X
74 13 2.020 Installation and Freight Cost Factor, Dimensionless
75 13 10.00 Engineering and Home Office Fees, X Process Capital
76 13 10.00 General Facilities, X Process Capital
77 13 30.00 Project Contingency, X Process Capital
78 13 0.0000 Process Contingency, X Process Capital
79 13 0.0000 Sales Tax, X Process Capital
80 13 0.0000 Royalty Allowance, X Process Capital
81 13 0.0000 Initial Catalyst, X Total Process Capital
82 13 15.00 Percent Supervision to Operating Labor, X
83 13 20.00 Water to Ash by Weight, X
84 13 8.000 Presure Drop Accross Fabric Filter, IN. H20
85 13 20.00 S02 Efficiency of FF Preceeded by LIMB, X Removal
86 13 0.0000 S02 Efficiency of FF Preceeded by Spray Humid., X Removal
87 13 55.00 S02 Efficiency of FF Predeeded by LSD, X Removal
88 13 80.00 S02 Efficiency of FF Preceeded by DSI, X Removal
90 13 4.000 Maintenance Labor and Material, X Total Plant Cost
142 13 0.0000 Inventory Capital, X Process Capital
293 13 1.000 Fabric Filter Retrofit Factor, dimensionless
434 13 0.0000 Fabric Filter Cost Mode (Total System or Ash Disposal Only)
Screen Groip 14 - Electrostatic Precipitator (ESP) Paraneters
91 14 99.90 Maximum Removal Efficiency, X
93 14 2.170 Installation and Freight Cost Factor, Dimensionless
1.7 System Files Format
1-14
-------
94 14 2.000 Duct Cost Factor for Large(>=500MW) Units, Dimensionless
95 14 100.0 Sizing Factor for Ash Silos, Tons/hour/silo
96 14 10.00 Engineering and Home Office Fees, X of Process Capital
97 14 10.00 General Facilities, X of Process Capital
98 14 30.00 Project Contingency, X of Process Capital
99 14 0.0000 Process Contingency, X of Process Capital
100 14 0.0000 Sales Tax, X of Process Capital
101 14 0.0000 Royalty Allowance, X of Process Capital
102 14 15.00 Percent Supervision to Operating Labor, X
103 14 20.00 Uater to Ash by Ratio Weight, X
104 14 1.000 Pressure Drop Across ESP, IN. H20
105 14 0.0000 S02 Efficiency of ESP Preceeded by LIMB, X
106 14 0.0000 S02 Efficiency of ESP Preceeded by Spray Humidification.X
107 14 21.00 S02 Efficiency of ESP Preceeded by LSD, X
108 14 0.0000 S02 Efficiency of ESP Preceeded by DSI, X
109 14 4.000 Maintenance Labor and Material, X Total Plant Cost
110 14 0.0000 Initial Catalyst, X Process Capital (ESP) «not applicable»
112 14 0.0000 Coal Flyash Resistivity, 10**9 OHM-CM (calculated if 0)
122 14 0.0000 Flyash Resistivity After Contaminating Control, 10**9 OHM-CM
130 14 1.000 Assume ESP Cost is Upgrade for Retrofit
138 14 0.0000 Inventory Capital, X Process Capital
143 14 1.000 ESP Upgrade Option
197 14 0.0000 ESP Cost Mode (total system or ash disposal only)
266 14 0.0000 Specific Collection Area; calculated if zero
294 14 1.000 ESP Retrofit Factor, dimensionless
435 14 0.0000 $/FT*2 Cost of Insulation for ESP Near Dew Point**(PRESENT $)**
Screen Group 15 - Li Bestone Injected Multiburner (LIMB) Parameters
111 15 0.0000 Stoichiometric Ratio (Calculated from Percent Removal if Zero)
113 15 3.000 Sorbent Type
114 15 95.00 Sorbent Purity, X
115 15 2.000 Number of Jobs
116 15 10.00 Engineering and Home Office Fees, X Process Capital
117 15 10.00 General Facilities, X Process Capital
118 15 30.00 Project Contingency, X Process Capital
119 15 20.00 Process Contingency, X Process Capital
120 15 0.0000 Sales Tax, X Process Capital
121 15 0.0000 Royalty Allowance, X Process Capital Cost
123 15 50.00 S02 Removal, X (Calculated from Stoichiometric Ratio if Zero)
124 15 15.00 Supervision, X Operating Manhours
126 15 4.000 Maintenance Labor and Material, X of Total Plant Cost
137 15 0.8000 Fraction Flyash, Remainder is Bottom Ash
141 15 5.000 Additive S03 Concentration, PPM
Screen Group 16 - Natural Gas Returning (NGR) Parameters
411 16 15.00 Portion of Heat Input as Gas Reburning, X • _
412 16 10.00 General Facilities, X Process Capital (ngr)
413 16 10.00 Engineering and Home Office Fees, % Process Capital (ngR)
414 16 30.00 Project Contingency, X Process Capital (ngr)
415 16 20.00 Process Contingency, X Process Capital (ngr)
416 16 0.0000 Sales Tax,X Process Capital (ngr)
417 16 0.0000 Royalty Allowance Factor, X Process Capital (ngr)
418 16 50.00 Nox Removal Efficiency (X) - Calculated By NGR if Zero (NGR)
419 16 0.0000 Initial Catalyst, X Process Capital (ngr)
420 16 1.000 Jobs Saved from Coal Process per 500 MU
421 16 2.000 Maintenance Labor and Materials, X (ngr)
422 16 53.00 Natural Gas F-Factor, #/MM BTU
423 16 807.0 Natural Gas A-Factor, #/MM BTU, X
424 16 75.00 Moisture from Fuel, #/MM BTU
425 16 10.00 Moisture from Combustion Air, #/MM BTU
1.7 System Files Format
1-15
-------
Screen Grcx^i 17 - (DSI) Parameters
271 17 0.0000 Normalized Stoichiochiomtric Ratio HSR Calculated if zero
272 17 19.30 Sorbent Purity, X
273 17 85.00 Percent Solids in Fixation Waste Stream
274 1 7 1.500 Fixation Cost Factor, D intension I ess
275 17 70.00 DSI Efficiency Calculated if NSR is non-zero
276 17 10.00 Engineering and Home Office Fees, X
277 17 10.00 General Facilities, X Process Capital
278 17 30.00 Project Contingency, X Process Capital
279 17 20.00 Process Contingency, X Process Capital (dsi)
280 17 0.0000 Sales Tax, X Process Capital (dsi)
281 17 0.0000 Royalty Allowance, X Process Capital (dsi)
282 17 0.7500 Operating and Supervision Jobs - Operators/shift (dsi)
283 17 1.000 Sorbent Type
284 17 4.000 Maintenance Rate (X) of Total Plant Cost (dsi)
286 17 0.0000 Initial Catalyst, X Total Process Capital
288 17 0.5000 Inventory Capital, X Process Capital (dsi)
297 17 1.000 DSI Retrofit Factor, dimensionless
Screen Grotp 18 - Conventional Flue Gas Desulfurization (FGD) ParaMters
202 18 1.400 Stoichiometric Ratio
203 18 90.00 Removal Efficiency, X
298 18 1.000 FGD Retrofit Factor, dimensionless
299 18 114.5 XLG L/G Ratio for Scrubber, Gallons/1000 CU. FT.
300 18 2.000 ISR L/G, Efficiency Control Variable (0,1,2,3)
301 18 0.0000 XESP Particulate Collection Option (0,1,2)
302 18 2.000 XRH Reheat Option (0,2)
303 18 1.000 KEPASS Emergency Bypass Option (0,1)
304 18 0.0000 KPAS02 Partial Scrubbing/Bypass Option (0,1)
305 18 175.0 TSK Temperature of Stack Gas, DEG. F.
306 18 470.0 TSTEAM Temperature of Reheater Steam, DEG. F.
307 18 751.9 HVS Heat of Vaporization of Reheater Steam, BTU/LB
308 18 1.000 IASH Unit of Measure Option for Particulate Removal(1,2)
309 18 99.700 ASHUPS Value for Particulate Removal Upstream from Scrubber
310 18 20.00 VLG L/G Ratio in Venturi, Gallons/1000 CU FT
311 18 5.000 VTR Venturi/oxidation Hold Tank Residence Time, MIN
312 18 10.00 V Scrubber Gas Velocity, FT/SEC
313 18 25.00 VRH Superficial Gas Velocity Through Reheater, FT/SEC
314 18 8.000 TR RecircuIat ion/Oxidation Hold Tank Residence TimE.MIN
315 18 1.000 IALK Alkali Addition Option (1,2)
316 18 0.0000 , IADD Chemical Additive Option (0,1,2)
317 18 0.0000 WPMGO Soluble MGO in Limestone or Lime, WT X Dry basis
318 18 0.1500 XMGOAD Soluble MgO Added to System, LB/100 LB Limestone
319 18 1500. AD Adipic Acid in Scrubbing Liquid, PPM (wt)
320 18 3.000 ADDC Adipic Acid Degradation Constant
321 18 4.850 WPI Insolubles in Limestone-Lime Additive, WT X Dry
322 18 5.000 WPM Moisture in Limestone-Lime Additive, LB/100 LB dry basis
323 18 8.000 WPS Solids in Recycle Surry to Scrubber, WT X
324 18 85.00 PSD Solids in Sludge Discharge, WT X
325 18 0.0000 RS Thickener Solids Settling Rate, FT/HR
326 18 40.00 PSC Percent Solids in Thickener Underflow, WT X
327 18 0.0000 IFOX Forced Oxidation Option (0,1,2,3)
328 18 95.00 OX Oxidation of Sulfite in Srubber Liquid, Mole X
329 18 2.500 SRAIR Air Stoichiometry Value, Moles Oxygen/mole S02 absorbed
330 18 85.00 PSF Percent Solids in Filter Cake, WT X
331 18 1.200 FILRAT Filtration Rate, TONS/SQ FT/Day
332 18 5.200 PHLIME Recirculation Liquor PH
333 18 0.0000 IVPD Venturi -P- Option
334 18 9.000 VPD Value for Either -P- or Throat Velocity, IN H20 or FT/S
335 18 0.0000 DELTAP Override -P- for Entire System, IN H20
336 18 14.70 PRES Scrubber Pressure, PSIA
337 18 1.000 I FAN Fan Option (0,1)
1.7 System Files Format
1-16
-------
338
18 1.000
ISCRUB
339
18 3.000
XNS
340
18 4.000
XNG
341
18 5.000
HS
345
18 10.00
WINDEX
346
18 5.700
HPTONW
347
18 1.000
NOREDN
348
18 0.1000
PCNTRN
371
18 75.000
ASHSCR
392
18 1.000
NSPREP
393
18 0.0000
NOTRAN
394
18 39.00
EXSAIR
Scrubbing Option. (1,2,3,4,5,6)
Number of TCA Stages
Number of TCA Grids
Height of Spheres per Stage, IN
Limestone Hardness Work Index Factor, dimensionless
Fineness of Grind Index Factor, HP/Ton
Number of Spare Scrubber Trains
Entrainment Level of Wet Gas, wt X
Value for Particulate Removal Within Scrubber.
Number of Spare Preparation Units
Nunber of Operating Scrubber Trains (Calc. if zero)
Excess Air, X
Screen Group 19 - FGD Econcaic Paraaters
358 19 10.00 General Facilities, X Process Capital(fgd)
359 19 10.00 Engineering and Home Office Fees, X Process Capital (fgD)
360 19 30.00 Project Contingency, X Process Capital (fgd)
361 19 1.400 Process Contingency, X Process Capital (fgd)
362 19 0.0000 Sales Tax, X Process Capital (fgd)
363 19 0.0000 Royalty Allowance, X Process Capital (fgd)
364 19 0.0000 Initial Catalyst, X Process Capital (fgd)
366 19 8.000 PCTMNT Maintenance Rate, Excluding Disposal Site Cost, X TPC
370 19 0.0000 Current Run is Combined Run for FGD
373 19 16.00 FLDEXP Construction Field Expense, X
Screen Group 20 - Currently Unused Parameters
29 20 0.0000 «N0T APPLICABLE TO FANS»
52 20 0.0000 «NOT APPLICABLE TO LSD»
65 20 0.0000 Initial Catalyst, X Process Capital
70 20 0.0000 LAND S/ACRE (LNBOF)
89 20 6215. LAND, S/ACRE (FF)
125 20 700.0 Quench Rate, Degrees Farenheit/minute
127 20 0.0000 Initial Catalyst, X Process Capital
128 20 6215. LAND, $/ACRE (LIMB)
129 20 0.0000 INVENTORY CAPITAL, X PROCESS CAPITAL (LIMB)
131 20 98.00 CALCITIC LIMESTONE USAGE FACTOR, X (LIMB)
132 20 58.00 DOLOMITIC LIMESTONE USAGE FACTOR, X (LIMB)
133 20 93.00 CALCITIC HYDRATE USAGE FACTOR, X (LIMB)
134 20 53.00 DOLOMITIC HYDRATE USAGE FACTOR, X (LIMB)
135 20 93.00 CALCITIC PRESSURE HYDRATE USAGE FACTOR, X
136 20 53.00 DOLOMITIC PRESSURE HYDRATE USAGE FACTOR, X
139 20 6215. LAND, $/ACRE (ESP)
144 20 0.0000
146 20 0.0000
148 20 0.0000 «NOT APPLICABLE TO FANS»
151 20 20.69 Waste Facility Labor Cost ($/HR)
152 20 20.69 Analysis LABOR COST (S/HR)
160 20 0.0000 * NOT USED *
179 20 0.0000
188 20 0.0000
189 20 0.0000
190 20 30.00 Book Life, Years
193 20 0.0000
196 20 0.0000
201 20 1.000 FLAG - 1 = FORCED OXIDATION;2 = CHEMICAL FIXATION (FGD)
204 20 7.000 Pressure Drop, IN. H20
205 20 125.0 Maximum Module Size, MW
206 20 25.00 SPARE CAPACITY, X (FGD)
207 20 10.00 ENGINEERING AND HOME OFFICE FEES, X PROCESS CAPITAL (FGD)
208 20 10.00 GENERAL FACILITIES, X PROCESS CAPITAL(FGD)
209 20 30.00 PROJECT CONTINGENCY, X PROCESS CAPITAL (FGD)
1.7 System Files Format
1-17
-------
210 20 1.400
211 20 0.0000
212 20 0.0000
213 20 15.00
214 20 0.0000
215 20 125.0
216 20 60.00
217 20 85.00
218 20 10.00
219 20 0.03000
220 20 1.400
221 20 1.670
222 20 0.0000
223 20 6215.
224 20 0.0000
225 20 8.000
226 20 0.0000
227 20 0.0000
228 20 0.0000
237 20 6215.
240 20 0.0000
261 20 0.0000
263 20 0.0000
267 20 0.0000
269 20 0.0000
270 20 0.0000
285 20 0.0000
287 20 6215.
292 20 1.000
295 20 1.000
365 20 10.00
367 20 3.000
368 20 6.000
369 20 60.00
372 20 0.0000
374 20 4.000
375 20 3.500
376 20 6.000
377 20 0.0000
378 20 1.000
379 20 1.500
380 20 15.00
381 20 90.00
384 20 19.00
385 20 24.00
386 20 3.883
387 20 0.1600
388 20 0.05500
390 20 26.00
395 20 1.000
396 20 2.000
397 20 1.000
398 20 8.000
399 20 5.000
400 20 20.00
401 20 0.0000
408 20 0.0000
409 20 0.0000
410 20 0.0000
437 20 0.0000
438 20 0.0000
450 20 0.0000
458 20 0.0000
460 20 0.0000
461 20 4700.
PROCESS CONTINGENCY, X PROCESS CAPITAL (FGD)
SALES TAX, X PROCESS CAPITAL (FGD)
ROYALTY ALLOWANCE, X PROCESS CAPITAL (FGD)
SUPERVISORY LABOR RATE, X OPERATING LABOR (FGD)
SATURATED GAS TEMPERATURE, DEG.F (FGD)
PERCENT SOLIDS FOR FORCED OXIDATION (FGD)
PERCENT SOLIDS FOR CHEMICAL FIXATION (FGD)
PERCENT SOLIDS IN L/S SLURRY (FGD)
LIME RATE FACTOR (FGD)
SLUDGE TO L/S RATIO - CHEMICAL FIXATION (FGD)
SLUDGE TO L/S RATIO + FORCED OXIDATION (FGD)
INITIAL CATALYST, X TOTAL PROCESS CAPITAL (FGD)
LAND, S/ACRE (FGD)
INVENTORY CAPITAL, X PROCESS CAPITAL (FGD)
MAINTENANCE LABOR AND MATERIAL, X TOTAL PROCESS CAPITAL (FGD)
LAND, S/ACRE (WASTE)
Initial Catalyst, X Total Process Capital
Land, S/Acre
land, S/acre (dsi)
Low NOx Burners/Overfire Air Retrofit Factor, dimensionIess
LIMB Retrofit Factor, dimensionIess
XINT Cost of Capital, X TFI
PDMNTP Disposal Site Maintenance Rate, X Direct Disposal Site
XINFLA Inflation Factor, X
PCTOVR Plant Overhead Rate, X of Conversion Costs Less Util.
PCTMKT Marketing Costs, X Byproduct Credit
TXRAT Sales Tax Rate, X
FRRAT Freight Rate, X
SERVRT Services, Utilities, and Miscellaneous, X TPC
ROYALT Royalties, X TPC
IOTIME Overtime Construction Labor Option (0,1)
OTRATE Overtime Labor Rate, dimensionless
UC(1) Limestone Unit Cost, $/ton
UC(2) Lime Unit Cost, S/ton
UC(5) Operating and Supervision Unit Cost, $/manhour
UC(6) Landfill Labor and Supervision Unit Cost, $/manhour
UC(7) Steam Unit Cost, $/1000 LB
UC(8) Process Water Unit Cost, $/1000 GAL
UC(9) Electricity Unit Cost, $/KWH
UC(11) Analyses Unit Cost, $/hour
INDPND Separate Indirect Factors for Disposal(0,1)
PENGIN Disposal Site Engineering Design, X Disposal TDI
parch disposal site construction architect, X disposal TDI
pfldex disposal site field expenses, X disposal tdi
pfees disposal site contractor fees, X disposal tdi
pcont disposal site contingency, X disposal tdi
pstart disposal site startup and modification, X disposal TDI
Calcitic Pressurized Hydrate Unit Cost, $
Doloniitic Pressurized Hydrate Unit Cost, $
Land, $/acre (scr)
1.7 System Files Format
1-18
-------
473 20 0.0000
480 20 0.0000 CLE)
487 20 0.0000
490 20 0.0000
521 20 0.0000
541 20 0.0000
542 20 0.0000
543 20 0.0000
544 20 0.0000
545 20 0.0000
546 20 0.0000
547 20 0.0000
571 20 0.0000 Coal Cleaning Level
596 20 0.0000
Screen Groip 21 - Cost-besed Parameters
140 21 123.2 Sulfur Cost <$/Ton)
145 21 0.0000 Clean Coal Cost Differential for CS/B (S/ton)
149 21 1.000 Premium Natural Gas Cost, S/MMBTU
150 21 19.70 Operating and Supervision Labor Cost (S/HR)
153 21 0.05000 Electricity Cost (S/KWH)
154 21 0.6000 Water Cost ($/1000GAL)
155 21 5.510 Steam Reheat Cost (S/MMBTU)
156 21 25.00 Calcite Cost (S/TON)
157 21 50.00 Calcific Hydrate Cost (S/TON)
158 21 100.0 Nahcolite Cost (S/TON)
159 21 75.00 TRONA Cost (S/TON)
161 21 9.250 Waste Disposal, Wet($/ton)
162 21 8.000 Waste Disposal, Dry (S/TON)
181 21 6500. Land Cost (S/Acre)
182 21 25.00 Dolomitic Limestone Cost, S/Ton
183 21 50.00 Dolomitic Hydrate Cost, S/Ton
184 21 55.00 Calcitic Pressure Hydrate Cost, S/Ton
185 21 55.00 Dolomitic Pressure Hydrate Cost, S/Ton
186 21 15.00 Limestone Cost, S/Ton
187 21 65.00 Lime Cost, S/Ton
242 21 3.400 Ductwork Metal Fabrication and Installation Cost, S/LB
357 21 6.000 Clay Cost, S/CU YD
382 21 510.0 MGO Unit Cost, S/ton
383 21 1500. Adipic Acid Unit Cost, S/ton
389 21 1.600 Diesel Fuel Cost, S/gal
406 21 0.0000 Synthetic Liner Material Unit Cost, S/SQ YD
407 21 0.0000 Synthetic Liner Labor Unit Cost, S/SQ YD
444 21 134.5 Ammonia Unit Cost, S/ton
445 21 258.4 Sodiun Hydroxide Unit Cost, S/ton
446 21 56.00 Sulfuric Acid Unit Cost, S/ton
447 21 20300. SCR Catalyst Unit Cost, S/ton
Screen Grwp 22 - (GC) Parameters
241 22 3500. Gas Velocity in Spray Humidifier Chamber, Ft/Min
243 22 1.250 Extra Fabrication Cost Factor (1.+25%)
244 22 3.000 Water Useage Factor, Dimensionless
245 22 8.000 Surge Tank Retention Time, Hours (SH)
246 22 14730. Maximum Tank Size, CU. FT.
247 22 1.100 Extra Pumpage Factor, Dimensionless (SH)
248 22 70.00 Pump Effieciency, %
249 22 100.0 Pump Head on Feed Pumps, FT.
250 22 50.00 Pump Head on Fresh Water Pumps, FT.
251 22 1.850 Tank and Pump Installation Factor, Dimensionless
252 22 2.000 Feed Pump Redundancy, Dimensionless
253 22 2.000 Fresh Water Pump Redundancy, Dimensionless
1.7 System Files Format
1-19
-------
254 22 10.00 Engineering and Home Office Fees, X Process Capital
255 22 10.00 General Facilities, X Process Capital
256 22 30.00 Project Contingency, X Process Capital (SH)
257 22 20.00 Process contingency, X process capital (sh)
258 22 0.0000 Sales tax, X process capital cost (sh)
259 22 0.0000 Royalty allowance, X process capital cost (sh)
260 22 600.0 Operating and supervision manhours/year (sh)
262 22 2.000 Maintenance Labor and Material, X Total Plant Cost
264 22 2.000 Incremental Pressure Drop Across SH, IN. H20
265 22 0.0000 Length of Natural Gas Pipe Line (miles)
268 22 0.0000 Inventory Capital, X Process Capital
296 22 1.000 Spray Humidification Retrofit Factor, dimensionless
Screen Grotp 23 - Selective Catalytic Reduction (SCR) Parameters
439 23 0.0000 SCR Implementation (Hot or Cold Side)
440 23 3.000 Catalyst/Service Life, Years (scr)
441 23 80.00 NOx Efficiency, X (scr) - calculated If Zero
442 23 7.000 Pressure Drop, IN. H20 (scr)
443 23 2350. Reactor Space Velocity, Hours (scr)
448 23 0.0000 NH3:NOx Stoichiometic Ratio (scr) - calculated if zero
449 23 0.0000 NH3 Slip X (scr) - calculated if zero
451 23 4.000 Maintenance Labor and Materials, X of Total Plant Cost (SCR)
452 23 10.00 General Facilities, X direct cost (scr)
453 23 10.00 Eng. and Home Office Fees (scr)
454 23 30.00 Project Contengency, X Direct (scr)
455 23 20.00 Proccess Contengency, X D+I (scr)
456 23 20.00 Sales Tax, X D+I (scr)
457 23 0.5000 Royalty Allowance, X Direct Cost (scr)
459 23 0.0000 Inventory Capital, X D&I Cost (scr)
462 23 1.000 SCR Retrofit Factor, dimensionless
Screen Groip 24 -
464 24 0.0000 Total Plant Capacity, Defaults to BSIZE P(464)
465 24 15.00 Percent of Heat Supplied by Gas Burning
466 24 2.000 Maintenence Labor and Materials X
467 24 10.00 General Facilities, X
468 24 10.00 Engineering and Home Office Fees, X
469 24 30.00 Project Contingency, X
470 24 20.00 Process Contingency, X
471 24 0.0000 Sales Tax, X
472 24 0.0000 Royalty Allowance, X
474 24 0.0000 Inventory Capital, X
475 24 0.0000 Initial Catalyst, X
Screen Groip 25 - Life Extension (LE) Paraaters (unused in this version)
479 25 1.000 Life Extension Level
481 25 10.00 General Facilities, X
482 25 10.00 Engineering and Home Office Fees, X
483 25 30.00 Project Contingency, X
484 25 10.00 Process Contingency, X
485 25 0.0000 Sales tax, X
486 25 0.0000 Royalty Allowance, X
488 25 0.0000 Inventory Capital, X
489 25 0.0000 Initial Catalyst, X
491 25 0.0000 Improved(Life Extended) Boiler Heat Rate (BTU/KUH)
492 25 2.000 Steam Criticality Operation
1.7 System Files Format
1-20
-------
Screen Group 26 - Repowering (AFBC) Parameters
499 26 2.666 Solids Recycle Ratio
500 26 40.00 Calcium Utilization Factor
501 26 1.000 Repower Option
502 26 1.000 (1) on site sorbent prep
503 26 2.000 turbine-generator option (1) uprate OR (2) upgrade(default)
504 26 6.000 maintenance labor and materials (X) of total plant cost
505 26 10.00 general facilities (X) - Process areas 1 thru 6
506 26 10.00 eng. and home office fees (X) - Process areas 1 thru 6
507 26 30.00 project contingency (X) - Process areas 1 thru 6
508 26 20.00 process contingency (X) - Process areas 1 thru 6
509 26 0.0000 sales tax (X) - Process areas 1 thru 6
510 26 0.0000 royalty allowance (X) - Process areas 1 thru 6
511 26 0.0000 turbine uprated capacity (mw)
512 26 0.5000 inventory capital (X) - Process areas 1 thru 6
513 26 0.0000 initial catalyst (X) - Process areas 1 thru 6
514 26 0.0000 land ($/acre) - Process areas 1 thru 6
515 26 10.00 general facilities (X) - Process area 7
516 26 10.00 eng. and home office fees (X) - Process area 7
517 26 30.00 project contingency (X) - Process area 7
518 26 20.00 process contingency (X) - Process area 7
519 26 0.0000 sales tax (X) - Process area 7
520 26 0.0000 royalty allowance (X) - Process area 7
522 26 0.5000 inventory capital (X) - Process area 7
523 26 0.0000 initial catalyst (X) - Process area 7
524 26 0.0000 land ($/acre) - Process area 7
525 26 0.9500 Sorbent Purity (decimal)
526 26 2.000 Number of operating jobs - default a 2
527 26 1.000 Solid Waste disposal (1) S02 only or (2) S02 and Flyash
528 26 9710. Improved RAFBC heat rate (BTU/kwh)
1.7 System Files Format
1-21
-------
1.7.2 Batch Data Files
Batch Data Files are used to allow IAPCS to process multiple runs in a
single execution. A run is defined as a single operation of the modeling
subsystem with a single set of input parameters.
To run IAPCS in the batch mode, three command line arguments are typed
after the name of the program (ex. IAPCX 1 PARMFILE.EPR MYBATCH.DAT) when the
program is started from DOS. These three arguments are:
(1) Economic Mode (1 for TVA, 2 for EPRI),
(2) Name of Parameter File for default values,and;
(3) Name of Batch Data File.
The program uses the Parameter File as the starting point for data
values to use for model runs. The Batch Data File contains an initial set of
two (2) run comment lines and then a series of six (6) lines of parameter
change data. Each of these six (6) lines contains up to six (6) pairs of
change items. Each item is a pair of numbers, the first being the number of
the parameter to change, and the second being then new value to be used. This
sequence of eight (8) eighty-column lines is repeated for every additional run
to be performed. The program restores the default values from the Parameter
File after each run so that only the parameter changes specified for the
current run are different from the default parameters. The following diagram
illustrates a unit structure of the Batch Data File.
1.7 System Files Format
1-22
-------
1
2
3
4
5
6
7
8
Comment Line 1
Comment Line 2
item
Each Change Item consists of the following pair of numbers:
Parameter Number
New Value
This 8-line block structure is repeated for every run in the
Batch Data File. An example follows:
LIMB
1 500.0 62.821975300.021N14
3
2 4 5 0 0
0
0 0 ON
5
11700.03.415.1
0,
.0 1.0 4.5
0.
,125.9 4.0028.352.6
141 0.0000113
6.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
LIMB+ADVACATE
1 500.0 62.821975300.021N14
3
2 4 5 0 0
0
0 0 ON
5
11700.03.415.1
0
.0 1.0 4.5
0
.125.9 4.0028.352.6
141 0.0000144
1.0000146
1.0000115
4.0000
0
0.0000
0
0.0000
0 0.0000113
6.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
0 0.0000 0
0.0000 0
0.0000 0
0.0000
0
0.0000
0
0.0000
1.7 System Files Format
1-23
-------
1.7.3 Discrete Files
DISCRETE.xxx
This file contains the choices which will be displayed for discrete
entry menu items (1 for data type). There must be one set of entries for each
discrete item. Missing or incorrect data can cause lock-ups or indefinite
looping.
File format
*3I
Axx I
Axx I
Discrete Entry Menu Block
• I
• I
Axx -
Format Item Description
31 Item Number This refers to the line number of
the item in PARMFILE.xxx to which
the set of discrete choices are
associated.
Axx Entry Text This is the text for each discrete
choice displayed. The maximum
length discrete entries are set
through the C preprocessor variable
DSCWDTH (defined in READPARM.H and
used in READPARM.C).
The discrete entry menu block is repeated for each discrete entry
item denoted in PARMFILE.xxx.
1.7 System Files Format
1-24
-------
1.7.4 ASCII Field Definition Files
DFFASC.xxx
This file works hand-in-hand with PARMFILE.xxx to properly format the
sub-menus. Errors in the information in this file can cause the program to
lock-up or loop indefinitely.
The file format is as follows:
31 Axx II II
Format Item
31 Next Item Index
Axx
Format String
II
Data Type
Description
This is the line number of the next
menu item to be displayed from
PARMFILE.xxx. If it is the last
item to be displayed, this number
is 0.
This defines the acceptable format
for entry in the menu field. X
denotes any printable ASCII
character, # denotes a numeric
field, and @ specifies the maximum
right position of the decimal point
(eg., for #@###, 9.000 is
acceptable while 90.00 is not).
Short hand formats may be entered
(eg., 25*X).
This item defines the procedure by
which data will be entered. 1
denotes discrete data (discrete
choices are obtained from
DISCRETE.xxx) while 9 denotes field
entered data.
II
Unknown
Purpose of this field is unknown.
All entries must be entered. There must be one line of information in
this file for every line in PARMFILE.xxx.
1.7 System Files Format
1-25
-------
1.7.5 Help Database Files
IAPCXHLP.DBF
IAPCXHLP.NDX
IAPCXHLP.DBT
These files contain most of the information regarding the general layout
of the screen throughout execution of IAPCS. Entries in these dBase III files
include the menu border lines, the main and edit menu entries, etc. Also
contained within these files are the implemented technologies, their numeric
calling code (passed to the model portion), their status line abbreviation,
and a boolean which indicates possible optimization. The number of entries
allowed in these file are limited due to array limitation in the FORTRAN and C
code.
1.8 PROCEDURES FOR BUILDING THE IAPCS PROGRAM
Version 3.0 of IAPCS is coded in two different computer languages:
FORTRAN and C. FORTRAN is an acronym for FORmula TRANslation, and has been the
main programming language for engineering for the past three decades. The
kernel of the cost calculation model represents the oldest part of the system
which was originally ported from a mainframe FORTRAN model. In the past
decade FORTRAN has been almost completely abandoned by commercial software
developers because of numerous deficiencies and the C language has become the
predominate language of choice for Personal Computers. When the IAPCS was
extended and the user interface was improved to make the program easier to
use, the C language was chosen because of the availability of commercial user-
interface development libraries (in this case, Windows for Data).
Several types of Program Development Packages are required in order to
build the machine executable IAPCS program from the human readable FORTRAN and
C Source Code Files. These are Source Code Compilers, Development Utility
Programs, and Development Support Libraries.
1.7 System Files Formats
1.8 References
1-26
-------
Compilers
Microsoft FORTRAN 4.1 Compiler
Microsoft C 5.0 Compiler
Utilities : Microsoft MAKE Utility Program
Microsoft LINK Utility Program
Libraries :
Vermont Creative Software Windows For Data
Figure 1-3 shows how these Program Development Packages are used to construct
the IAPCS program in a step-wise fashion.
At Radian the following directory structure was used to rebuild the IAPCS
executable program from the source code. The DOS SUBST command was used to
create logical drives W:, X:, Y:, and Z: for convenience.
FORTRAN
Microsoft FORTRAN
Compiler Sub-directories
WFD
C
Microsoft C
Compiler Sub-directories
Windows for Data
IAPCS
FOR
IAPCS FORTRAN Source Code (X:)
C
IAPCS C Source Code (W:)
OBJ
Compiled Object Modules (Y:)
BIN
IAPCS.EXE (Z:)
1.8 Procedures for Building the IAPCS Program
1-27
-------
Figure 1-3. Software Compile/Link Diagram
1.8 Procedures for Building the IAPCS Program
1-28
-------
# -
# IAP-FOR.MAK - MakeFile for Compiling IAPCS 4.0 FORTRAN Routines
#
# SYNTAX: MAKE IAP-FOR.MAK
#
# -
# *** Compilation for DEBUG/CODEVIEW:
#
# fcompile = fl /AH /4Nt /4Yd /4Yb /Gtl5 /Zi /Od /c /FoY:
#
# *** Compilation for OPTIMIZATION - SPEED (8087?):
fcompile = fl /AH /4Nt /4Yd /4Yb /Gtl5 /Ot /c /FoY:
Y:ADAMGO.obj: ADAMGO.FOR _CSTNDX.CMM
$(fcompile) ADAMGO.FOR
Y:ADIPID.obj: ADIPID.FOR
$(fcompile) ADIPID.FOR
Y:BATCH3.obj: BATCH3.FOR _INPUT.CMM _PARM.CMM _C0MM.CMM _XFER1.CMM PARMCH.CMM
_SLFCNT.CMM _BIN.CMM _TYPE.CMM JEW.CMM BATCHC.CMM
$(fcompile) BATCH3.FOR
Y:BECHTL.obj: BECHTL.FOR _flyash.cmm
$(fcompile) BECHTL.FOR
Y:BEQ.obj: BEQ.FOR
$(fcompile) BEQ.FOR
Y:BINFND.obj: BINFND.FOR
$(fcompile) BINFND.FOR
Y:BLOCK.obj: BLOCK.FOR _OUTH.CMM _INPUT.CMM PARM.CMM _XFER2.CMM XFER2B.CMM
XFER3B.CMM _XFER7.CMM _EFACT.CMM SLFCNT.CMM _SPC.CMM _I0.CMM
$(fcompile) BLOCK.FOR
Y:APPFIL.obj: APPFIL.FOR
$(fcompile) APPFIL.FOR
Y:BSEARCH.obj: BSEARCH.FOR _BIN.cmm
$(fcompile) BSEARCH.FOR
Y:BYPASS.obj: BYPASS.FOR
$(fcompile) BYPASS.FOR
Y:CHKFMT.obj: CHKFMT.FOR
$(fcompile) CHKFMT.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-29
-------
Y:COALMAT.obj: COALMAT.FOR input.cmm parm.cmm bin.cmm type.cmm slfcnt.cmm
$(fcompile) COALMAT.FOR
Y:CORSET.obj: CORSET.FOR JNPUT.CMM PARM.CMM _C0MM.CMM _XFER1.CMM _PARMCH.CMM
SLFCNT.CMM _BIN.CMM TYPE.CMM _NEW.CMM BATCHC.CMM
$(fcompile) CORSET.FOR
Y:CREF.obj: CREF.FOR DBF.CMM _INDEX.CMM _SK.CMM _HELP.CMM
$(fcompile) CREF.FOR
Y:CSB.obj: CSB.FOR input.cmm acccic.cmm costs.cmm esc.cmm parm.cmm
coal 1.cmm _insysp.cmm parmch.cmm
$(fcompile) CSB.FOR
Y:DBFINF.obj: DBFINF.FOR DBF.CMM _SPC.CMM
$(fcompile) DBFINF.FOR
Y:DBREAD.obj: DBREAD.FOR DBF.CMM _REC.CMM
$(fcompile) DBREAD.FOR
Y:DRIVERB.obj: DRIVERB.FOR STREAM.CMM _INPUT.CMM _PARM.CMM _MATBAL.CMM
FAN.CMM
$(fcompile) DRIVERB.FOR
YrDSI.obj: DSI.FOR _C0STS.CMM MATBAL.CMM PARM.CMM JNPUT.CMM _I0.CMM
_C0AL1.CMM _INSYSP.CMM _ESC.CMM _0PT.CMM _FAN.CMM _STREAM.CMM _ACCCIC.CMM
OSIPARM.CMM
$(fcompile) DSI.FOR
Y:DSIEQN.obj: DSIEQN.FOR
$(fcompile) DSIEQN.FOR
Y:DUCWRK.obj: DUCWRK.FOR _CSTNDX.CMM _flyash.cmm
$(fcompile) DUCWRK.FOR
Y:ELECTR.obj: ELECTR.FOR _CSTNDX.CMM _XFER1.CMM
$(fcompile) ELECTR.FOR
YrEPECON.obj: EPECON.FOR _PARM.CMM
$(fcompile) EPECON.FOR
Y:EQCALL.obj: EQCALL.FOR
$(fcompile) EQCALL.FOR
Y:EQUIPT.obj: EQUIPT.FOR _CSTNDX.CMM
$(fcompile) EQUIPT.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-30
-------
Y:ESP.obj: ESP.FOR _ACCCIC.CMM _COSTS.CMM _INPUT.CMH PARM.CMM MATBAL.CMM
FAN.CMM _COALl.CMM _STREAM.CMM _IO.CMM _ESC.CMM JNSYSP.CMM _OPT.CMM
PARMCH.CMM _DSIPARM.CMM
$(fcompile) ESP.FOR
Y:FANl.obj: FAN1.FOR ACCCIC.CMM COSTS.CMM INPUT.CMM PARM.CMM STREAM.CMM
_ESC.CMM FAN.CMM _XFER1.CMM CSTNDX.CMM
$(fcompile) FAN1.FOR
YrFF.obj: FF.FOR _COSTS.CMM _ACCCIC.CMM MATBAL.CMM PARM.CMM INPUT.CMM
_I0.CMM _COALl.CMM ESC.CMM FAN.CMM JNSYSP.CMM OPT.CMM STREAM.CMM
_DSIPARM.CMM
$(fcompile) FF.FOR
Y:FILEX.obj: FILEX.FOR
$(fcompile) FILEX.FOR
Y:FIND.obj: FIND.FOR INDEX.CMM DBF.CMM SK.CMM _SAVNDX.CMM HELP.CMM
$(fcompile) FIND.FOR
Y:FIXATE.obj: FIXATE.FOR JNPUT.CMM _COSTS.CMM PARM.CMM _DSIPARM.CMM
$(fcompile) FIXATE.FOR
Y:GC.obj: GC.FOR _ACCCIC.CMM COSTS.CMM MATBAL.CMM _PARM.CMM JNPUT.CMM
_I0.CMM _C0AL1 .CMM JAN.CMM _INSYSP.CMM _OPT.CMM JSC.CMM STREAM.CMM
$(fcompile) GC.FOR
Y:GSUB.obj: GSUB.FOR JNSYSP.CMM JOAL1.CMM JOSTS.CMM STREAM.CMM JNPUT.CMM
PARM.CMM JSC. CMM ACCCIC.CMM J FACT. CMM JO. CMM
$(fcompile) GSUB.FOR
Y:HLPFND.obj: HLPFND.FOR helpinit.int hlpdsp.int help.cmm helptxt.cmm
_savndx.cmm,_mmenu.cmm
$(fcompile) HLPFND.FOR
Y:HLPOPN.obj: HLPOPN.FOR Jelp.cmm
$(fcompile) HLPOPN.FOR
YtHOTGAS.obj: HOTGAS.FOR JARM.CMM _OPT.CMM Jlyash.cmm
$(fcompile) HOTGAS.FOR
Y:HOWMANY.obj: HOWMANY.FOR
$(fcompile) HOWMANY.FOR
Y:IAPPAS.obj: IAPPAS.FOR JOSTS.CMM JARM.CMM JNPUT.CMM _OPT.CMM Jlyash.cmm
$(fcompile) IAPPAS.FOR
YrlNSTRM.obj: INSTRM.FOR JSTNDX.CMM
$(fcompile) INSTRM.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-31
-------
Y:INTRPL.obj: INTRPL.FOR
$(fcompile) INTRPL.FOR
YrKCALC.obj: KCALC.FOR
$(fcompile) KCALC.FOR
Y:LIMB.obj: LIMB.FOR _ACCCIC.CMM _C0STS.CMM STREAM.CMM MATBAL.CMM _PARM.CMM
_INPUT.CMM_IO.CMM_COAL1.CMM_INSYSP.CMM_OPT.CMM ESC.CMM FAN.CMM
CSTNDX.CMM
$(fcompile) LIMB.FOR
Y:LIMEPR.obj: LIMEPR.FOR _CSTNDX.CMM
$(fcompile) LIMEPR.FOR
Y:LNBOF.obj: LNBOF.FOR _ACCCIC.CMM _COSTS.CMM MATBAL.CMM INPUT.CMM _PARM.CMM
_I0.CMM _C0AL1.CMM _ESC.CMM _FAN.CMM _INSYSP.CMM _OPT.CMM STREAM.CMM
$(fcompile) LNBOF.FOR
Y:LSD.obj: LSD.FOR _ACCCIC.CMM _COSTS.CMM MATBAL.CMM _PARM.CMM _INPUT.CMM
_IO.CMM _ESC.CMM COAL1.CMM _FAN.CMM INSYSP.CMM _OPT.CMM STREAM.CMM
$(fcompile) LSD.FOR
Y:LSPREP.obj: LSPREP.FOR _CSTNDX.cmm
$(fcompile) LSPREP.FOR
Y:MAIN2.obj: MAIN2.F0R _COSTS.CMM _INPUT.CMM _FAN.CMM
$(fcompile) MAIN2.F0R
Y:MATBL.obj: MATBL.FOR
$(fcompile) MATBL.FOR
Y:MNUINT.obj: MNUINT.FOR iapmnu.int _mmenu.cmm
$(fcompile) MNUINT.FOR
Y:MODEL.obj: MODEL.FOR _COSTS.CMM _FAN.CMM _STREAM.CMM _INPUT.CMM _XFER2.CMM
ACCCIC.CMM PARM.CMM MATBAL.CMM _COMM.CMM _OPT.CMM _INSYSP.CMM _C0AL1.CMM
DBF.CMM PLAB.CMM _PARMCH.CMM _BIN.CMM _INDEX.CMM _SPC.CMM _ESC.CMM
XFERl.CMM _CSTNDX.CMM _DSIPARM.CMM SYSTEM.CMM _HELP.CMM NEW.CMM _BATCHC.CMM
$(fcompile) MODEL.FOR
Y:NBLANK.obj: NBLANK.FOR
$(fcompile) NBLANK.FOR
Y:NDXINF.obj: NDXINF.FOR _DBF.CMM _INDEX.CMM
$(fcompile) NDXINF.FOR
Y:NGR.obj: NGR.FOR _ACCCIC.CMM _COSTS.CMM _PARM.CMM EFACT.CMM _INPUT.CMM
STREAM.CMM _INSYSP.CMM _C0AL1.CMM _ESC.CMM _10.CMM
$(fcompile) NGR.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-32
-------
Y:OUTEPR.obj: OUTEPR.FOR _COSTS.CMM _OUTH.CMM _INPUT.CMM PARM.CMM _XFER2.CMM
XFER2B.CMM _XFER7.CMM _ACCCCE.CMM FAN.CMM _INSYSP.CMM _ESC.CMM _MATBAL.CMM
_COALl.CMM STREAM.CMM _COMM.CMM
$(fcompile) OUTEPR.FOR
Y:OUTTVA.obj: OUTTVA.FOR _OUTH.CMM _COSTS.CMM _XFER7.CMM _XFER3B.CMM _PARM.CMM
INPUT.CMM STREAM.CMM _COALl.CMM FAN.CMM _MATBAL.CMM ACCCCE.CMM ESC.CMM
JNSYSP.CMM
$(fcompile) OUTTVA.FOR
YrPARMIN.obj: PARMIN.FOR parm.cmm parmch.cmm
$(fcompile) PARMIN.FOR
YrPDUMPS.obj: PDUMPS.FOR _COMM.CMM _INPUT.CMM PARM.CMM PLAB.CMM _PARMCH.CMM
$(fcompile) PDUMPS.FOR
Y:PIPES.obj: PIPES.FOR _XFER4.CMM _CSTNDX.CMM
$(fcompile) PIPES.FOR
Y:RAT.obj: RAT.FOR PARM.CMM
$(fcompile) RAT.FOR
Y:READIN.obj: READIN.FOR EFACT.CMM PARM.CMM _INPUT.CMM MATBAL.CMM
_COALl.CMM _INSYSP.CMM _OPT.CMM _CSTNDX.CMM _NEW.CMM _flyash.cmm
$(fcompile) READIN.FOR
Y:RETRO.obj: RETRO.FOR _INPUT.CMM PARM.CMM _PARMCH.CMM
$(fcompile) RETRO.FOR
Y:SCACAL.obj: SCACAL.FOR _COSTS.CMM _INPUT.CMM PARM.CMM _MATBAL.CMM _FAN.CMM
INSYSP.CMM _COALl.CMM STREAM.CMM
$(fcompile) SCACAL.FOR
Y:SCR.obj: SCR.FOR _COSTS.CMM _STREAM.CMM _INPUT.CMM _PARM.CMM _ESC.CMM
FAN.CMM ACCCIC.CMM _IO.CMM
$(fcompile) SCR.FOR
Y:SCRNUP.obj: SCRNUP.FOR _COMM.CMM SPC.CMM
$(fcompile) SCRNUP.FOR
Y:SHADD.obj: SHADD.FOR
$(fcompile) SHADD.FOR
Y:SLPUMP.obj: SLPUMP.FOR
$(fcompile) SLPUMP.FOR
Y:SRMOD.obj: SRMOD.FOR
$(fcompile) SRMOD.FOR
Y:STRMS.obj: STRMS.FOR
$(fcompile) STRMS.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-33
-------
Y:TOTALS.obj: TOTALS.FOR
$(fcompile) TOTALS.FOR
Y:TVAFGD.obj: TVAFGD.FOR PARM.CMM _INPUT.CMM _IO.CMM _OPT.CMM _flyash.cmm
$(fcompile) TVAFGD.FOR
Y:TVAIN.obj: TVAIN.FOR _CSTNDX.CMM
$(fcompile) TVAIN.FOR
YrUNCNTL.obj: UNCNTL.FOR _INPUT.CMM PARM.CMM STREAM.CMM COAL1.CMM
_EFACT.CMM _INSYSP.CMM
$(fcompile) UNCNTL.FOR
Y:WASTE.obj: WASTE.FOR COSTS.CMM _ACCCIC.CMM PARM.CMM _INPUT.CMM _CSTNDX.CMM
flyash.cmm
$(fcompile) WASTE.FOR
YrWETGAS.obj: WETGAS.FOR
$(fcompile) WETGAS.FOR
Y:WORKCP.obj: WORKCP.FOR COSTS.CMM INPUT.CMM
$(fcompi!e) WORKCP.FOR
Y:WRDBND.obj: WRDBND.FOR
$(fcompile) WRDBND.FOR
Y:ZCOSTS.obj: ZCOSTS.FOR ACCCIC.CMM
$(fcompile) ZCOSTS.FOR
Y:ZERO.obj: ZERO.FOR flyash.cmm
$(fcompile) ZERO.FOR
Listing 1-1 Microsoft MAKE File for Compiling IAPCS FORTRAN Routines
1-34
-------
#
# IAP-C.MAK - MakeFile for Compiling IAPCS 4.0 C Routines
it
# SYNTAX: MAKE IAP-C.MAK
# -
# -
# *** Compilation for DEBUG/CODEVIEW:
#
# ccompile = cl /AH /Zi /Od /c /Id:\wfd /FoY:$*
#
# *** Compilation for OPTIMIZATION - SPEED (8087?):
ccompile = cl /AH /Ot /c /Id:\wfd /FoY:$*
Y:BATCHW.obj: BATCHW.C global.h comm.h parm.h parmch.h
$(ccompile) BATCHW.C
Y:CATIN.obj: CATIN.C global.h
$(ccompile) CATIN.C
Y:CHKIN.obj: CHKIN.C iapcxmnu.h global.h rundata.h
$(ccompile) CHKIN.C
Y:COMENT.obj: COMENT.C iapcxmnu.h comm.h
$(ccompile) COMENT.C
Y:FRONT.obj: FRONT.C parm.h
$(ccompile) FRONT.C
Y:GETINP.obj: GETINP.C
$(ccompile) GETINP.C
Y:HELPINIT.obj: HELPINIT.C iapcxhlp.h
$(ccompile) HELPINIT.C
Y:HLPDSP.obj: HLPDSP.C iapcxhlp.h
$(ccompile) HLPDSP.C
Y:IAPMNU.obj: IAPMNU.C iapcxmnu.h global.h cmmnblk.h rundata.h comm.h parm.h
load.h readparm.h
$(ccompile) IAPMNU.C
Y:INFACE.obj: INFACE.C
$(ccompile) INFACE.C
Y:INFILE.obj: INFILE.C iapcxmnu.h global.h rundata.h
$(ccompile) INFILE.C
Listing 1-2 Microsoft MAKE File for Compiling IAPCS C Routines
1-35
-------
YrKEYLST.obj: KEYLST.C readparm.h rundata.h
S(ccompile) KEYLST.C
Y:MAKINPW.obj: MAKINPW.C
$(ccompile) MAKINPW.C
Y:MENUZ.obj: MENUZ.C global.h
$(ccompile) MENUZ.C
Y:MFLOCATE.obj: MFLOCATE.C
$(ccompile) MFLOCATE.C
Y:NEW_PATH.obj: NEWPATH.C iapcxmnu.h
$(ccompile) NEW_PATH.C
Y:PARMCHNG.obj: PARMCHNG.C global.h load.h parm.h partnch.h
$(ccompile) PARMCHNG.C
Y:PARMSET.obj: PARMSET.C rundata.h comm.h parm.h readparm.h
S(ccompile) PARMSET.C
Y:PGFRM.obj: PGFRM.C readparm.h
$(ccompile) PGFRM.C
YrRATMOD.obj: RATMOD.C global.h parm.h iapcxmnu.h readparm.h
$(ccompile) RATMOD.C
Y:RD_LINE.obj: RDLINE.C
$(ccompile) RDLINE.C
Y:READPARM.obj: READPARM.C
$(ccompile) READPARM.C
Y:SAVFIL.obj: SAVFIL.C iapcxmnu.h global.h rundata.h
$(ccompile) SAVFIL.C
Y:STATS.obj: STATS.C cmmnblk.h rundata.h
$(ccompile) STATS.C
Y:TCHIMP.obj: TCHIMP.C iapcxmnu.h global.h cmmnblk.h rundata.h
$(ccompile) TCHIMP.C
Y:TCHOPT.obj: TCHOPT.C iapcxmnu.h global.h cmmnblk.h rundata.h
$(ccompile) TCHOPT.C
Y:TIMSET.obj: TIMSET.C
$(ccompile) TIMSET.C
Listing 1-2 Microsoft MAKE File for Compiling IAPCS C Routines
1-36
-------
Y:V_LIST.obj: V_LIST.C readparm.h global.h
S(ccompile) V_LIST.C
Y:WRITEP.obj: WRITEP.C
$(ccompile) WRITEP.C
Y:WRITSCCS.obj: WRITSCCS.C iapcxmnu.h global.h rundata.h
$(ccompile) WRITSCCS.C
Listing 1-2 Microsoft MAKE File for Compiling IAPCS C Routines
1-37
-------
# - -
# IAPCX30.LNK - LinkFile for Linking IAPCS 4.0 FORTRAN & C Routines
#
# SYNTAX: LINK 0IAPCX4O.LNK
# - -
front + mnuint +
helpinit +
hlpfnd +
catin +
(infile +
(coment) +
(tchimp) +
(tchopt) +
(savfil +
writep +
hlpopn
cref
hlpdsp
chkin
menuz
find
nblank
rat
wrdbnd
i apmnu
newpath) +
(readparm)
(getinp +
keylst +
(bsearch +
(model
DRIVERB
SCRNUP
(LIMEPR
(ZCOSTS
OUTTVA
CORSET
(BATCH3
(NGR) +
(GSUB) +
(LNBOF) +
(LIMB) +
(SCR) +
(GC) +
(ESP + SCACAL
(LSD) +
(CSB) +
(DSI +
(TVAFGD +
SLPUMP +
(DUCWRK +
WORKCP +
(HOTGAS +
BEQ +
WETGAS +
parmset +
writsccs)
+
+ makinpw +
+ pgfrm +
+ coal mat)
+ block
+ MAIN2
+ READIN
+ LSPREP)
+ PARMIN
+ OUTEPR
+ SHADD)
HOWMANY)
batchw
+
+ parmchng +
mflocate
v_list
pdumps
FAN1
RETRO
INTRPL
EPECON
+
+
+
+
+
+ FIXATE + FF) +
DSIEQN)
TVAIN
PIPES)
INSTRM
BECHTL)
BYPASS
KCALC
STRMS
MATBL
SRMOD
IAPPAS
#-
#
#
#-
z:iapcz /NOEXT /SE:1024 /INFO /NODE
nul
EQCALL
ADIPID
ZERO)
ratmod
dbread
timset
rdline +
binfnd +
stats +
inface) +
UNCNTL +
WASTE +
APPFIL) +
EQUIPT + ADAMGO +
ELECTR + TOTALS +
for use of CODEVIEW
z:iapcz /NOEXT /CO /SE:1024 /INFO /NODE
Listing 1-3 Microsoft LINK File for IAPCS
1-38
-------
\wfd\wfdl + \wfd\wfcl +
\c\lib\11ibce + \c\1ib\llibc7 + \c\lib\graphics +
\fortran\li b\l1ibfor7
nul
Listing 1-3 Microsoft LINK File for IAPCS
1-39
-------
3. Restore all Files into the IAPCS Directory.
The user would enter the following command to install IAPCS on the
C hard drive:
RESTORE A: C:\IAPCS4
The user will be prompted to insert the program distribution
diskettes in sequence.
4. The IAPCS installation is now complete. The program may be
executed from this point on by using the following DOS commands
each time the PC is booted up.
CD \IAPCS4
IAPCS4
1.9 Program Requirements and Installation
1-41
-------
1.10 REFERENCES
1. Demarco, T. Structured Analysis and System Specification. Yourdon Press,
New York. 1979.
1.10 References
1-42
-------
SECTION 2.0
FORTRAN MODEL CODE
2.1 FORTRAN LANGUAGE SOURCE CODE FILES
Presently the FORTRAN portion of IAPCS 3.0 consists of approximately:
21,500 lines of FORTRAN source (.FOR)
8,900 FORTRAN code statement lines.
In addition, the following includes Common Block Definition code (.cmm) form part
of the FORTRAN source:
1,200 lines of included source (.cmm)
800 statement lines.
IAPCS includes the following FORTRAN language source code files. These
files all use the file name extension '.FOR' At compile time these source files
are compiled into Object Modules by the Microsoft FORTRAN Compiler (version 5.0).
ADAMG0
DSIEQN
KCALC
READIN
ADIPID
DUCWRK
LIMB
RETRO
AFBC
ELECTR
LIMEPR
SCACAL
APPFIL
EPECON
LNBOF
SCR
BATCH3
EQCALL
LSD
SCRNUP
BECHTL
EQUIPT
LSPREP
SHADD
BEQ
ESP
MAIN2
SLPUMP
BINFND
FAN1
MATBL
SRMOD
BLOCK
FF
MNUINT
STRMS
BSEARCH
FILEX
MOD
TEMP
BYPASS
FINDFIXATE
MODEL
TOTALS
CHKFMT
GC
NBLANK
TVAFGD
COALMAT
GSUB
NDXINF
TVAIN
CORSET
HLPDRV
NGR
UNCNTL
CREF
HLPFND
OUTEPR
WASTE
CSB
HLPOPN
OUTTVA
WETGAS
DBFINF
HOTGAS
PARMIN
WORKCP
DBIN
HOWMANY
PCBB
WRDBND
DBREAD
IAPPAS
PDUMPS
ZCOSTS
DEBUG
IGCC
PFBC
ZERO
DRIVERB
INSTRM
PIPES
DSI
INTRPL
RAT
2.1 FORTRAN Source Code File Names
2-1
-------
FORTRAN Include Files
Included COMMON Block Definitions -
These files define the FORTRAN common blocks which are used to store input
data, accumulate results, and transfer data between FORTRAN subroutines as the
model executes at run-time. The accepted FORTRAN coding practice is put these
Common Block definitions into separate disk files. This practiced is used to
avoid program errors which would result if duplicate definitions of a given
Common Block did not match identically. In the IAPCS all of these Common
definintion files have the file name extension '.CMM.' Each FORTRAN source file
(above) which uses a given Common Block will have an Include Statement for the
file containing the definition of that Common Block. At compile-time, these
Include Files are read from disk whenever the compiler encounters an Include
statement, and the contents are placed in-stream into the object module which the
compiler produces.
ACCCCE
FLOWS
MESS23
SYSTEM
ACCCIC
FLYASH
MMENU
TRAN
BATCHC
HELP
NEW
TYPE
BIN
HELPTXT
OPT
XFER1
C0AL1
IND
OUTH
XFER14
COMM
INDEX
PARM
XFER2
COSTS
INPUT
PARMCH
XFER2B
CSTNDX
INSYSP
PLAB
XFER3B
DSIPARM
10
SAVNDX
XFER4
EFACT
ISIDAT
SK
XFER5
EQCOST
LS
SLFCNT
XFER7
ESC
MATBAL
SPC
DBF
FAN
MATRIX
STREAM
REC
Included FORTRAN - C language interface descriptors -
These include files contain inter-language interface descriptors which allow
the C language program subroutines to communicate with FORTRAN language program
subroutines throught the FORTRAN Common Blocks. All of these type Include Files
have the file name extension '.INT.'
HELPINIT HLPDSP IAPMNU
2.1 FORTRAN Source Code File Names
2-2
-------
2.2 FORTRAN SUBROUTINE SUMMARY
ADAMGO Design additive equipment
ADIPID Scrub paramters, Adipic Acid addition.
AFBC Calculate design parameters, capital and annual operating costs,
and materials balance for atmospheric fluid bed combustion (AFBC)
system.
APPFIL Sets unit to end of file and backspace for append write.
File must be opened with APPEND priveleges (MODE = READWRITE).
BATCH3 Set AUSM coal wash parameters - database coal. Read boiler,
control, and run information read coal characteristics from
AUSM database matrix for ROM coal and user-defined coal.
BECHTL Combustion products - gas, temp, pressure values.
BEQ Determines aqueous solution equilibria for the system S02,
C02, S03, N205, CA, MG, NA, CL, Adipic Acid.
BINFND Does a binary search on an array of index key entries searching
for a match to the driver index key. Called by FIND for a
maximum of three times based on the level of cross-referencing.
BSEARCH Uses the sorted coalwashing matrix to search for the
appropriate cost, weight recovery, higher heating value (HHV),
ash content, and technical proparation level for the combination
of the HHV categeory(rnak), initial sulfur category, and coal
supply region passed. Two separate searches are preformed
depending on the value of the parameter CSCOL.
BYPASS Designs for partial scrubbing
CHKFMT Check for proper field format and correct if necessary
COALMAT Based on input parameters determine the necessary coal
characteristics from the AUSM coal washing model/database
CORSET Sets correspondence between parameter file input variables and
actual IAPCX input variables
CREF Creates a cross-reference table from the index file, IAPCXHLP.NDX, for
indexed file access by number code for menu/help text items. The
table usually appears at the end of the index file. A cross reference
entry can be identified by the first four byte integer of the record
2.2 FORTRAN Subroutine Summary
2-3
-------
CSB
DBFINF
DBIN
DBREAD
DEFDB
DRIVERB
DSI
DSIEQN
DUCWRK
ELECTR
EPECON
EQCALL
EQUIPT
being non-zero. This number represents the node in which this key
is the last entry. The nth entry is off by plus one. That is,
the mini-cross reference entry of node n actually represents
node n-1.
Coal Subtitution/Blending. Determines annual coal use with
respect to any other secondary fuels combusted. Determines the
fuel cost premium.
Reads the header record of a dBASE III file and sets up arrays
consisting of field name [NAME], type [FTYPE], width [FL],
decimal portion [FDC]
Used to obtain proper database record and parse into proper
variables.
Reads the database record pointed to by its record number.
The record number has been read in by subroutine FIND which
searched the index file for a match of the driver key.
Part of the dBASE III interface for IAPCX. Reads the batch
file created by the user for input to IAPCX. Executed only
once, upon initial call to DBIN.
Controls cost calculation routines.
Reflects updated cost and performance estimating algorithms
for Dry Sorbent Injection (DSI) as presented in
"Economic Evaluation of Dry Injection Flue Gas Desulfurization
Technology", published for EPRI CS-4373, January 1986 by
Stearns Catalytic Corporation.
Curve fit Cost Estimating and Performance equations for Duct
Sorbent Injection. Equations fit to data with Statgraphics
using simple regression.
Duct work values.
Electric motor values.
Calculates the charge on capital and O&M levelization factors
Based on the EPRI tag documant dated 5/82.
Sets up variable for the aqueous solution equlibria calculations.
Tank, fdn, agitators calculations.
2.2 FORTRAN Subroutine Summary
-------
ESP Calculates design parameters, capital and annual operating costs,
and material balance for electrostatic precipitators (esp).
FAN1 Calculates the system's capital and annual fan cost (if any).
FF Calculates design parameters, capital and annual operating costs,
and material balance for fabric filters.
FILEX Checks for the existence of a file
FIND Part of the interface between database file(s) and their
associated index file(s). Based on the key index field entry
from the main driver database, search the remaining indexes for
a matching record.
FIXATE Calculates material balance considerations due to the presence
of the duct sorbent injection module in tandem with a particulate
control device.
GC Calculates design parameters, capital and annual operating costs,
and material balance for gas conditioning
GSUB Gas substitution routine.
HLPDRV Calls help menu C language routine.
HLPFND HLPFND determines the location of a particular HELP screen database
record based on the correpsonding index file.
HLPOPN Opens IAPCX help files - composed of dBASE III database with
corresponding memo file. These help files contain both descriptive
text for the context-sensitive help windows activated by the F1 key,
and all text used for constructing the on-screen control menus.
After opening the necessary files, HLPOPN reads the file headers and
checks for file errors.
HOTGAS Calculate hot gas compositino and flow rate.
HOWMANY Counts the total number of IAPCX runs for use by the screen
update subroutine.
IAPPAS Costs in particulate removal
IGCC Catalytic design parameter, capital and annual operating costs, and
material balance for Integrated Gasification Combined Cycle (IGCC).
INSTRM Scrubber solids disposal.
2.2 FORTRAN Subroutine Summary
2-5
-------
INTRPL Linear Interpolation of value Y given value x and corresponding
X and Y data sets.
KCALC Determines activity coefficients, gam, and equilibrium constants,
k, for the so2,co2,so3,n2o5,ca,mg,na,cl
LIFE Life extension (LE) involves the replacement/maintenance of an
existing coal fired power plant; the object being to extend the
life of the plant while also enhancing/upgrading the existing
performance at the plant.
LIMB Calculates design parameters, capital and annual operating costs,
and material balance for lime injection multi-stageburner with and
without ADVACATE.
LIMEPR Designs lime preparation area.
LNBOF Calculates design parameters, capital and annual operating costs,
and material balance for low nox burners and overfire air ports.
LSD Calculates design parameters, capital and annual operating costs,
and material balance for lime spray dryers (Isd).
LSPREP Designs limestone preparation area.
MAIN2 Main output driver handles fans, waste disposal, and economic
options.
MATBL CAS03, CAS04, H20 constituents
MNUINT Initialize front-end menuing system, loads menu screens from
C memory file. When completed, passes control to IAPMNU.
MOD Input driver for IAPCX.
MODEL Main routine for execution modual for the IAPCX system.
NBLANK Writes spaces to a character string.
NDXINF Reads the header information from each specified index file.
NGR Calculates design parameters, capital and annual operating costs,
and material balance for natural gas reburning (ngr) systems.
OUTEPR Prints out Boiler/system performance, system material balance,
emmision summary, capital costs, and annual costs.
2.2 FORTRAN Subroutine Summary
2-6
-------
OUTTVA Prints out Boiler/system performance, system material balance,
emmision summary, capital costs, and annual costs.
PARMIN Makes paramter value updates spcified by an index
PCBB Calculate design parameter, capital and annual operating costs, and
material balance for pulverized coal burning boiler (PCBB).
PDUMPS Determine if error call from IAPCX in batch file read. Print
message and exit if error.
PFBC Calculate design parameter, capital and annual operating costs, and
material balance for pressurized fluid bed combine cycle (PFBC).
PIPES Drain, water piping.
POSLOG Determines the existence of a spcified field, its database and
its offset.
RAT Calculates cost adjustment factors for any of the four cost
categories used in iapcs:
1. ce plant costs (used for all modules except lfgd)
2. material costs (ce equipment, machinery and supports)
3. installation labor costs (ce construction labor)
4. o&m costs (pei defined; index of 100 is 1982)
READIN Sets variables from array P (parameters)
REPOWER Repowering modual.
RETRO Retrofit difficulty assignment.
SCACAL Calculates specific collection area (sea) for an electrostatic
precipitator (esp).
SCR NH3:N0X performance calculations, direct and indirect capital cost
calculations, annual cost calculations, material balance
calculations.
SCRNUP Provides a screen update of program performance.
SHADD Pre combution, post combustion technology.
SLPUMP Designs slurry pumps.
SRMOD Stoichiometrey, or ph, or 1/g model bechtel calculations.
2.2 FORTRAN Subroutine Summary
-------
STRMS Stream & components module.
TOTALS Equipment totals.
TVAFGD FGD Scrubber particulate.
TVAIN Equipment calculations.
UNCNTL Initial system performance calculations, bottom ash calculations,
and calculates uncontrolled emissions.
WASTE Offset, slope, cap, landfill, pile bottom, pond, clay
waste calculations.
WORKCP Working capital costs
ZCOSTS Zeros out capital, annual, and indirect cost arrays and total
plant cost used in local module subroutines
ZERO Initialise variables to zero
2.3 FORTRAN SUBROUTINE HIERARCHY CHART
Figure 2-1 Shows the Subroutine Hierarchy Chart for the FORTRAN model
subsystem of IAPCS. The routine MODEL is the main control subroutine for this
subsystem, in fact, MODEL was originally the main program routine for and earlier
version of the system.
The second tier of routines, below the routine DRIVER, are the so-called
Technology Modules. As shown in Figure 2-1 the Technology Module TVAFGD has a
hierarchy of routines beneath it. This is because the TVAFGD module is more
complex and also was once a separate model itself.
The routine MODEL may be called either in an interactive or batch mode from
the user interface (see Figure 3-1). The routines CORSET and BATCH are the first
subroutines called, in turn, by MODEL for the interactive and batch modes,
respectively. These routines process the Input Parameter (or Batch) File and set
up program variables for model execution. This includes a call to COALMAT which
retrieves the applicable coal and coal-cleaning factors from the coal factors
database (see Figure 1-1).
2.2 FORTRAN Subroutine Summary
2-8
-------
Figure 2-1. FORTRAN Subroutine Hierarchy Chart.
2.3 FORTRAN Subroutine Hierarchy Chart
2-9
-------
The routine RETRO is then called to determine a Retro-fit Difficulty Factor
for relating the costs of retrofitting to the costs for new construction.
Next, the routine UNCNTL is called to calculate the Uncontrolled Emissions
Level, which would result if there were no pollution control technologies
present. This Uncontrolled Emissions Estimate is used as the basis for all
subsequent emissions calculations and removal efficiency calculations.
The routine NGR is now called to perform all calculations for Natural
Gas Reburning systems, if applicable.
GSUB is then called to handle Gas Substitution calculations.
At this point, program control is passed to the routine DRIVER which
controls the execution of all applicable Technology modules for the run.
Technology modules are executed in the order in which they are named in the
program array AIAPCS().
After the execution of all Technology Modules, program control passes back
from DRIVER and goes to the routine MAIN2. MAIN2 performs some final induced
draft fan costs, off-site waste disposal costs, and then calls either OUTTVA or
OUTEPR depending on whether the run is set up for the TVA or EPRI format of
output. These routines perform the final step of levelization for annual costs
and output the results to the report file.
2.4 DESCRIPTION OF FORTRAN SUBROUTINES
The FORTRAN subroutines that are a part of IAPCS may be divided into
2 categories: 1) Those associated with the user-interface and input file
processing, and 2) those associated with the main cost calculation routine Model.
Figure 2-2 shows a FORTRAN calling tree for the routines that are associated with
the Model subroutine.
2.3 FORTRAN Subroutine Hierarchy Chart
2-10
-------
MODEL
*PDUMP
h GETFNM
APPFIL
h CORSET
- SCRNUP
COALMAT
GETDAT*
CHNGE
GETTIM
h HOWMANY
BATCH
L COALMAT
- RETRO
- UNCNTL
- ZCOSTS
NGR
GSUB
DRIVER
- ZCOSTS
- LNBOF
- LIMB
- LSPREP
- LIMEPR
L SHADD
|- CSB
I- PARMIN
|- SCR
GC
h ESP
FF
LSD
AFBC
h PFBC
p IGCC
- dump parameter errors to file
- construct disk file names
- setup to append file if required
- transfer parameter file variables to
IAPCX program variables
- read data from coal-cleaning Factors
Database
- update computer screen display with
processing time statistics
- get system date
- get system time
¦ count number of runs per screen update
- read data for one run from input
assigns retrofit difficult factor
according to selected technology
initial system performance calculates
bottom ash uncontrolled emissions
zero cost calculation data arrays
national gas reburning
¦ gas substitution calculations
¦ control routine for IAPCS technology
modules
• low-NOx burning with oven fired air
module
• Lime/limestone injected multi-stage
burner module + ADVACATE
- coal-cleaning-substitution/blending
module
- selective catalytic reduction module
- spray humidification module
- electrostatic precipitation module
- fabric filter module
- lime spray drying module
- atmospheric fluidized bed combustion
- pressurized fluidized bed combustion
integrated gasification combined cycle
~Additional subsequent calls are made from same routine
Figure 2-2. FORTRAN Subroutine Call Tree Diagram for MODEL Routine
2-11
-------
- PCBB - pulverized coal burning boiler
- TVAFGD - limestone FGD module
- ZERO
- READIN
- BECHTL
HOTGAS
BYPASS
MATBL - material balance calculations
L EQCALL
SRMOD
ADIPID
WETGAS
STRMS
L EQCALL
—TVAIN
- EQUIPT
LSPREP
LIMEPR
ADAMGO
SLPUMP
- PIPES
- DUCWRK
- INSTRM
- ELECTR
TOTALS
L WORKCP
IAPPAS
- dry sorbent injection module
DSI
•READIN
—MAIN2
- FAN1
- WASTE
- OUTTVA
L OUTEPR
- control routine for output reporting
- calculate capital and fan costs
- waste disposal costs (off-site)
- outputs TVA format report
- outputs EPRI format report
~Additional subsequent calls are made from same routine
Figure 2-2. (Concluded)
2-12
-------
2.4.1 Action Diagrams
2.4.1.1 Action Diagram for MODEL Subroutine--
—if batch run
initialize
—if batch run
print header to screen
set MAIN PARMFILE NAME from argument
set TVA NAME value from argument
set INPUT DATA FILE NAME from argument
—if batch run
open INPUT DATA FILE
open MAIN PARMFILE
read PARM values
if ERROR exit
initialize cost adjustment array
—if batch run
read MODE from INPUT DATA FILE
.-if MODE
set FILE true
close MAIN INPUT DATA FILE
— else
set MODE to interactive
Figure 2-3. Action Diagram for MODEL Subroutine
2-13
-------
set help file vars
set OUTPUT FILE NAME
set SUM FILE NAME
open SUM FILE
—if MODE is interactive
set PARM values from USER INPUT
— else
set PARM values from PARM file
r-if OPTION 4
close line printer
open .out file
load system date and time
pif NR is 2
determine retrofit difficulty factor
—if coal substitution/blending
i—if coal substitution/blending LSC coal type is not 3, 5, 6
set LSC coal type to 3
set clean coal cost differential
Figure 2-3. (Continued)
2-14
-------
-for OUTPUT = console and printer
print header to OUTPUT
if (database run and index key not found) print error message
if (database coal not found in coal washing matrix) print warning message
print TVA or EPRI
set uncontrolled stream characteristics
initialize stream and system performance calculations
set reburn facter to 0
-if OPTIMIZATION is 2
set limb efficiency
-else if OPTIMIZATION is 5
set esp efficiency
-else if OPTIMIZATION is 6
set bypass efficiency
-else if OPTIMIZATION is 7
set lsd efficiency
-else if OPTIMIZATION is 2
set fgd efficiency
-else if OPTIMIZATION is 2
set limb efficiency
-else
set limb efficiency
Figure 2-3. (Continued)
2-15
-------
if coal is cleaned, reset stream characteristics
save initial net heat rate
—if date of capital cost is zero
set year to 1986
set month to 6
—else
date is less than 8206 set date to 8206
set year of capital cost
set month of capital cost
—if date of 0&M is zero
set year to 1986
set month to 6
—el se
date is less than 8206 set date to 8206
set year of O&M cost
set month of O&M cost
calculate materials rate modifier
calculate labor rate modifier
calculate plant rate modifier
calculate operation and maintenance
Figure 2-3. (Concluded)
2-16
-------
pif NGR
recalculate coal contribution
-else if GAS SUBSTITUTION
setup gas subtitution
recalculate coal contribution
modular cost calculations
output
2.4.1.2 Action Diagram for DRIVER Subroutine--
—for i from 1 to 8
pif SYSTEM is LOW NOX BURNERS
zero out cost values
calculate cost values for low nox burners
pif SYSTEM is LIMB
zero out cost values
calculate cost values for LIMB + ADVACATE (if desired)
r-if SYSTEM is CSB
zero out cost values
calculate cost values for coal cleaning - subtitution/blending
r-if SYSTEM is REBURING
zero out cost values
increment IAHE
Figure 2-4. Action Diagram for DRIVER Subroutine
2-17
-------
pif SYSTEM is GAS SUBSTITUTION
zero out cost values
increment IAHE
r-if SYSTEM is SCR
zero out cost values
calculate cost values for selective catalytic reduction
pif SYSTEM is REPOWER
zero out cost values
(commented out) calculate cost values for repowering
—for i from 1 to 9
set second entry in material balance table
—while post air heater exit calculations
calculate costs for gas conditioning, electrostatic precipitatiors,
fabric filter, lime spary drying, limestone fgd, and
dry sorben injection.
set next entry in material balance table
set displosal costs
Figure 2-4. (Concluded)
2.4.2 FORTRAN Module Descriptions
MODULE : BATCH
FUNCTION : Set AUSM coal wash parameters - database coal. Read
boiler, control, and run information read coal
characteristics from AUSM database matrix for ROM coal
and user-defined coal.
2-18
-------
CALLED FROM : MODEL
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
EXPORT
IMPORT
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
none
channel 14 - main input data file
none
INPUT.CMM
"PARM.CMM
"COMM.CMM
XFER1.CMM
"PARMCH.CMM
"SLFCNT.CMM
"BIN.CMM
"TYPE.CMM
"NEW.CMM
"BATCHC.CMM
$Argument_0001
EXB(L*4)
$Argument_0002
10(1*4)
$Argument_0003
SKIPRUN(L*4)
$Local
1(1*2) ITT(1*4) TTEMP(1*2)
TYPCT(R*4)
$Argument_0003
DE(R*4)
$Entry_Point
TYPARRAY(R*4) TYPCC(R*4)
CSB
Coal Subtitution/Blending. Determines annual coal use
with respect to any other secondary fuels combusted.
Determines the fuel cost premium.
DRIVER
PARMIN
none
none
2.4.2 FORTRAN Module Descriptions
2-19
-------
INCLUDE FILES :
input.cmm
acccic.cmm
costs.cmm
esc.cmm
_parm.cmm
_coall.cmm
insysp.cmm
parmch.cmm
IMPORT :
SArgumentOOOl
DE(R*4)
$Entry_Point
P(R*4)
MODULE
FUNCTION
CALLED FROM
CALLS
DRIVER
Controls cost calculation routines.
MODEL
ZCOSTS
LNBOF
LIMB
csb
SCR
GC
ESP
FF
LSD
TVAFGD
DSI
READIN
FILES ACCESSED : channel 14 - main input data file
FILES CREATED : none
INCLUDE FILES : STREAM.CMM
INPUT.CMM
_PARM.CMM
MATBAL.CMM
FAN.CMM
2.4.2 FORTRAN Module Descriptions
2-20
-------
EXPORT
IMPORT
$Common_Name
PCOSTS PND1
$Local
AHE(1*2) 1(1*2)
PCOSTS
PCLEAR(R*4)
PERIMM(R*4)
ROADMM(R*4)
PND1
CLAYIN(R*4)
HYPLMC(R*4)
PNDARW
WELLL(R*4)
PNDARW
J(1*2)
$Argument_0001
DE(R*4)
$Entry_Point
IAPCS(1*4)
PDEXEC(R*4)
RECLAM(R*4)
SODL(R*4)
PERIML(R*4)
R0ADLL(R*4)
S0DM(R*4)
CLAYUC(R*4) HYPLLC(R*4)
WELLM(R*4)
STREQ(R*4)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
ESP
Calculates design parameters, capital and annual
operating costs, and material balance for electrostatic
precipitators (esp).
DRIVER
none
none
none
ACCCIC.CMM
"COSTS.CMM
"INPUT.CMM
"PARM.CMM
"MATBAL.CMM
"FAN.CMM
"COAL1.CMM
"STREAM.CMM
10.CMM
"ESC.CMM
"INSYSP.CMM
"OPT.CMM
2.4.2 FORTRAN Module Descriptions
2-21
-------
_PARMCH.CMM
_DSIPARM.CMM
EXPORT :
SEntryPoint
P(R*4)
$Loca1
ASHIN(R*4) ASHRT(R*4) EFFESP(R*4)
EFFOLD(R*4) 1(1*4) PASS1(L*4) RESIS1(R*4)
SCA1(R*4) SYSTEM(L*4) UPGRAD(L*4)
IMPORT :
$Argument_0001
DE(R*4)
$Entry_Point
ALOG(R*4) IAPCS(1*4) IFIX(I*4) K0(I*4)
Q(R*4) TABLE(R*4)
$Local
RESIS2(R*4) SCA2(R*4)
MODULE : FF
FUNCTION : Calculates design parameters, capital and annual
operating costs, and material balance for fabric filters.
CALLED FROM : DRIVER
CALLS : none
FILES ACCESSED : none
FILES CREATED : none
INCLUDE FILES :
COSTS.CMM
ACCCIC.CMM
MATBAL.CMM
PARM.CMM
INPUT.CMM
_IO.CMM
COAL1.CMM
ESC.CMM
JAN. CMM
INSYSP.CMM
OPT.CMM
STREAM.CMM
DSIPARM.CMM
2.4.2 FORTRAN Module Descriptions
2-22
-------
EXPORT :
$Local
ASHIN(R*4) ASHRT(R*4) 1(1*4)
IMPORT :
$Argument_0001
DE(R*4)
$Entry_Point
AL0G(R*4) IAPCS(I*4) IFIX(I*4) K0(I*4)
P(R*4) Q(R*4)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
EXPORT
IMPORT
GC
Calculates design parameters, capital and annual
operating costs, and material balance for gas
conditioning
DRIVER
none
none
none
ACCCIC.CMM
"COSTS.CMM
"MATBAL.CMM
"PARM.CMM
"INPUT.CMM
"10.CMM
"COAL1.CMM
"FAN.CMM
"INSYSP.CMM
"OPT.CMM
JSC. CMM
STREAM.CMM
$Local
ACFM(R*4) PI(R*4) SIZE(R*4)
$Argument_0001
DE(R*4)
2.4.2 FORTRAN Module Descriptions
2-23
-------
$Entry_Point
IFIX(1*4) INT(1*4) K0(1*4)
Q(R*4) SQRT(R*4)
P(R*4)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
EXPORT
IMPORT
GSUB
Gas substitution routine.
MODEL
none
none
none
INSYSP.CMM
"COAL1.CMM
"COSTS.CMM
"STREAM.CMM
"INPUT.CMM
PARM.CMM
"ESC.CMM
ACCCIC.CMM
"EFACT.CMM
"10.CMM
$Local
GPERC(R*4) NBC{I*4)
SArgumentOOOl
DE(R*4)
SEntryPoint
EFCT(R*4)
P(R*4) REAL(R*4)
$Local
BOTTOM(R*4) BSIZE(R*4)
FMB(R*4) NR(1*4)
K0(I*4) MOD(1*4) NINT(1*4)
CT(R*4)
MODULE
FUNCTION
HOWMANY
Counts the total number of IAPCX runs for use by the
screen update subroutine.
CALLED FROM
MODEL
2.4.2 FORTRAN Module Descriptions
2-24
-------
CALLS
FILES ACCESSED
FILES CREATED
EXPORT
none
channel 14 - main input data file
none
$Argument_0001
NREC(1*4)
MODULE
FUNCTION
LIMB
Calculates design parameters, capital and annual
operating costs, and material balance for LIMB or LIMB +
ADVACATE.
CALLED FROM : DRIVER
CALLS :
LSPREP
LIMEPR
SHADD
FILES ACCESSED : none
FILES CREATED : none
INCLUDE FILES :
_ACCCIC.CMM
COSTS.CMM
STREAM.CMM
_MATBAL.CMM
PARM.CMM
INPUT.CMM
_IO.CMM
COALl.CMM
INSYSP.CMM
_OPT.CMM
ESC.CMM
JAN. CMM
CSTNDX.CMM
2.4.2 FORTRAN Module Descriptions
2-25
-------
EXPORT
$Common_Name
BIG1 DUMM
$Entry_Point
P(R*4)
SLocal
ISTYPE(1*4)
BIG1
HPT0NW(R*4)
DUMM
NSUMPR(I*4)
LS
LIMEAD(R*4)
TRAN
NSPREP(I*4)
LS TRAN
IX(1*4)
WINDEX(R*4)
LSADD(R*4) SR(R*4)
IMPORT
$Argument_0001
DE(R*4)
$Common_Name
EQCOST ISIDAT
$Entry_Point
INT(1*4) K0(I*4) Q(R*4)
$Local
IAPCS(1*4) NM(1*4)
EQCOST
PEL(R*4) PEM(R*4)
ISIDAT
MWGT(1*4) TYPE(Char*)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
LNBOF
Calculates design parameters, capital and annual
operating costs, and material balance for low nox
burners and overfire air ports.
DRIVER
none
none
none
2.4.2 FORTRAN Module Descriptions
2-26
-------
INCLUDE FILES :
_ACCCIC.CMM
_COSTS.CMM
MATBAL.CMM
INPUT.CMM
PARM.CMM
_I0.CMM
COAL1.CMM
ESC.CMM
JAN. CMM
INSYSP.CMM
OPT.CMM
STREAM.CMM
EXPORT :
$Common_Name
LNC
LNC
COSTMM(R*4) FULCRED(R*4) MMBTU(R*4)
IMPORT :
$Argument_0001
DE(R*4)
$Entry Point
I FIX(1*4) K0(I*4) P(R*4)
$Loca1
QIN(R*4)
MODULE
FUNCTION
LSD
Calculates design parameters,
operating costs, and material
spray dryers (lsd).
capital
balance
and annual
for lime
CALLED FROM
DRIVER
CALLS : none
FILES ACCESSED : none
FILES CREATED : none
INCLUDE FILES :
_ACCCIC.CMM
COSTS.CMM
MATBAL.CMM
PARM.CMM
JNPUT.CMM
10.CMM
2.4.2 FORTRAN Module Descriptions
2-27
-------
ESC.CMM
_C0AL1.CMM
FAN.CMM
_INSYSP.CMM
OPT.CMM
STREAM.CMM
EXPORT :
$Common_Name
HYBRID
$Local
ACFM(R*4) BYPFAC(R*4) MLMPPH(R*4)
PPHPRT(R*4)
HYBRID
SVLSDC(R*4)
IMPORT :
$Argument_0001
DE(R*4)
$Entry_Point
IFIX(I*4) KO(I*4) P(R*4) Q(R*4)
$Local
CT(R*4)
MODULE
: MODEL
FUNCTION
: Main execution module
for the IAPCX
CALLED FROM
: n/a
CALLS
fcls
Flocate
Fprints
pdump
GETFNM
APPFIL
DBIN
corset
SCRNUP
HOWMANY
BATCH
SCRNUP
APPFIL
GETDAT
GETTIM
retro
PDUMP
UNCNTL
UNCNTL
ZCOSTS
NGR
UNCNTL
ZCOSTS
GSUB
UNCNTL
DRIVER
MAIN2
2.4.2 FORTRAN Module Descriptions
2-28
-------
FILES ACCESSED
FILES CREATED
INCLUDE FILES
IMPORT
channel 8
channel 14
channel 15
none
COSTS.CMM
"STREAM.CMM
XFER2.CMM
PARM.CMM
"COMM.CMM
"INSYSP.CMM
"DBF. CMM
PARMCH.CMM
MAINDB.CMM
SPC.CMM
"REPOW.CMM
CSTNDX.CMM
"SYSTEM.CMM
"NEW.CMM
$Argument_0001
ARGl(Char*)
$Argument_0002
ARG2(Char*)
$Argument_0003
ARG3(Char*)
$Argument_0004
CMDLIN(I*2)
debug file for all modules
main input data file
output data (SUM) file
FAN.CMM
"INPUT.CMM
ACCCIC.CMM
MATBAL.CMM
"OPT.CMM
"COAL1.CMM
"PLAB.CMM
"BIN.CMM
"INDEX.CMM
ESC.CMM
"XFERl.CMM
DSIPARM.CMM
"HELP.CMM
BATCHC.CMM
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
NGR
Calculates design parameters, capital and annual
operating costs, and material balance for natural
gas reburning (ngr) systems.
MODEL
none
none
none
2.4.2 FORTRAN Module Descriptions
2-29
-------
INCLUDE FILES
IMPORT
ACCCIC.CMM
"COSTS.CMM
"PARM.CMM
~EFACT.CMM
"INPUT.CMM
"STREAM.CMM
"INSYSP.CMM
"COAL1.CMM
"ESC.CMM
"10.CMM
$Argument_0001
DE(R*4)
$Entry_Point
EFCT(R*4)
$Local
BOTTOM(R*4)
K0(I*4) P(R*4) Q(R*4)
CT(R*4) FMB(R*4)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
EXPORT
SCR
NH3:N0X performance calculations, direct and indirect
capital cost calculations, annual cost calculations,
material balance calculations.
DRIVER
none
none
none
COSTS.CMM
"STREAM.CMM
"INPUT.CMM
"PARM.CMM
"ESC.CMM
"FAN.CMM
ACCCIC.CMM
"10.CMM
$Local
ST0ICH(R*4)
IMPORT
2.4.2 FORTRAN Module Descriptions
2-30
-------
$Argument_0001
DE(R*4)
SEntryPoint
EXP(R*4) K0(I*4) P(R*4)
MODULE : TVAFGD
FUNCTION : Sets upstream particulate control system values if
present.
CALLED FROM : DRIVER
CALLS : ZERO
READIN
BECHTL
TVAIN
FILES ACCESSED : none
FILES CREATED : none
INCLUDE FILES :
PARM.CMM
_INPUT.CMM
_IO.CMM
_OPT.CMM
_MATBAL.CMM
STREAM.CMM
FLYASH.CMM
EXPORT :
$Common_Name
COMPLE FIXCOS
$Local
1(1*4) REB(L*4)
COMPLE
ICOMPL(1*4) NEXT(1*4)
FIXCOS
HPFIX(R*4)
IMPORT :
$Argument_0001
DE(R*4)
$Common_Name
LS SCRUB SCRUBR TRAN TRANS2
2.4.2 FORTRAN Module Descriptions
2-31
-------
$Entry_Point
IAPCS(I*4)
IRPT(I*4)
LS
IALK(1*4)
SCRUB
IADD(1*4)
SCRUBR
LG(R*4)
TRAN
NOREDN(1*4)
TRANS2
XXIADD(Char*)
K0(1*4) P(R*4) TABLE(R*4)
SR(R*4)
I FOX(1*4)
ISCRUB(1*4)
NOTRAN(1*4)
XXSCRB(Char*)
XXXALK(Char*)
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
EXPORT
IMPORT
UNCNTL
Initial system performance calculations, bottom ash
calculations, and calculates uncontrolled emissions.
MODEL
none
channel 14 - main input data file
none
INPUT.CMM
PARM.CMM
"STREAM.CMM
"COAL1.CMM
"EFACT.CMM
"INSYSP.CMM
$Argument_0002
RBF(R*4)
$Argument_0001
GASFLG(L*4)
$Argument_0002
DE(R*4)
$Entry_Point
EFCT(R*4)
$Local
BOTTOM(R*4)
P(R*4)
CT(R*4) FMB(R*4)
2.4.2 FORTRAN Module Descriptions
2-32
-------
2.5 FORTRAN CODING CONVENTIONS
The FORTRAN coded routines of the IAPCS model come from a variety of
sources. Several of the technology modules are adapted from other systems, the
largest of which is the TVA lime/limestone FGD technology module, which was the
kernel of the "Shawnee Model."
Additionally, the IAPCS model itself has undergone extensive revisions,
most recently the replacement of the FORTRAN user-interface with a more
sophisticated C language user-interface and the addition of new technology
modules.
Because of the evolution of IAPCS in this manner, there are no strictly
followed overall conventions for variable names, inter-module communications, or
coding practices. The FORTRAN code also includes many outdated and possibly
misleading comment statements which were inadvertently retained after the
corresponding segment of computer code was modified, "commented out", or deleted.
A single data structure is key in unifying the many dissimilar segments of
FORTRAN code. This data structure is a single-dimensional real array called P(),
standing for "Parameters." This Parameter Array corresponds in a one-to-one
fashion with the Parameter Input File. For example, array element number 114,
that is P(114), corresponds to line 114 of the Parameter File which contains the
value for limestone purity. Generally, each technology module in IAPCS first
transfers its required input values from the parameter array into its own local
variable names,and at the end of execution, the local variables which hold the
results of the calculations are transferred back into the Parameter Array. Some
technology modules, on the other hand, access the Parameter Array directly for
input and output values while performing calculations. Other modules mix the use
of local variables with direct use of the Parameter Array (P). This reflects the
individual coding style of the different programers who coded each section, or
at a later time revised the work of an earlier programmer.
2.5 FORTRAN Coding Conventions
2-33
-------
Module Coding Conventions
Recommendations
A wholesale cleanup of the FORTRAN code in IAPCS is warranted. Misleading
comments and blocks of "comment-out" obsolete code should be removed to eliminate
confusion and promote less-troublesome maintenance of the software. Obsolete
FORTRAN 66 coding style abounds and should be avoided and corrected in the
future.
A convention for inter-process communications, coding practices and
variable naming should be established for use in adding new Technology Modules
or revising existing ones. The following Section 2.5.1 recommends a standard
format for coding technology modules based partly on the more structured of the
existing modules.
Suggested references for improving the quality of the FORTRAN code include
the following:
(1) The Elements of Programming Style.1
(2) ADP System Documentation Standards.2
^rian W. Kernigan, McGraw-Hill, 1978.
2U.S. EPA, OIRM, 1980.
2.5 FORTRAN Coding Conventions
2-34
-------
2.6 MAIN FORTRAN VARIABLES
2.6.1 Arrays
IAPCS(9)
Array which holds the integer code numbers of the technology
modules to use, in sequence.
1 = Low NOx burners/overfired air
2 = Lime/Limestone Injected Multi-burner (LIMB)
3 = coal cleaning - substitution/blending
10 = Natural Gas Reburning
17 = Gas Substitution
16 = Selective Catalytic Reduction
Q(100)
P(600)
TABLE(8,9)
Capital Cost Adjustment Factors specific to Technology Module.
Set equal to 1.0 in current version of IAPCS and not
modifiable.
Parameter Array which initally holds input values from the .
Parameter File. The Elements of P() correspond exactly to the
line items in the Parameter File. Intermediate and Results
values are filled in during program execution.
Material Balance Table TABLE(x,y), where x is the tech. module,
and y corresponds to the following list:
(1) Flue Gas (#/hr)
(2) Flue Gas (ACFM)
(3) Temperature (deg. F)
(4) Moisture (#/hr)
(5) Alkalinity (#/hr)
(6) Particulate (#/hr)
(7) S02 (#/hr)
(8) NOx (#/hr)
(9) C02 (#/hr)
Annual Quantities and Costs:
AQ(40)
AQ1(40)
AQ2(40)
AC(40)
ANN(40)
Annual Quantity by process area. Accumulated into ANN().
Annual Quantity for each tech. module. Initialized in Block
Data.
2.6 Main FORTRAN Variables
2-35
-------
Annual Quantity and Cost Arrays are
indexed as
follows:
(1) SYSTEM
(21)
DOLOMITIC PRESSURE HYDRTE
(2) WASTE DISPOSAL FACILITY
(22)
NAHCOLITE
(3) ANALYSIS
(23)
SULFUR
(4) MAINTENANCE LABOR
(24)
MgO
(5) MAINTENANCE MATERIAL
(25)
ADIPIC ACID
(6) ADMIN. & SUPPORT LABOR
(26)
SODIUM HYDROXIDE
(7)
(27)
WATER
(8)
(28)
STEAM
(9)
(29)
ELECTRICITY
(10) FIXED COMPONENT
(30)
CATALYST
(11) VARIABLE COMPONENT
(31)
DIESEL FUEL
(12) SULFURIC ACID
(32)
FUEL COST PREMIUM
(13) SOLIDS DISPOSAL, WET
(33)
LIMESTONE
(14) SOLIDS DISPOSAL, DRY
(34)
LIME
(15)
(35)
AMMONIA
(16) CALCITIC LIMESTONE
(36)
TRONA
(17) DOLOMITIC LIMESTONE
(37)
(18) CALCITIC HYDRATE (LIME)
(38)
(19) DOLOMITIC HYDRATE (LIME)
(39)
(20) CALCITIC PRESSURE HYDRATE
(40)
Capital Costs:
CC(20)
Direct Capital Cost by process area for current tech. module.
The identity of each element in CC() differs for each
Technology Module. Accumulated into CAPCST().
CAPCST(25,8)
Capital Cost Table CAPCST(x,y), where yl is the total capital
cost for the module and 2-8 are process area sub-totals.
Indirect Costs:
IC(10)
Indirect Capital Cost by TVA or EPRI schedule for current tech.
module. Accumulated into INDCST(). Totals are also accumulated
(different order) into P(467..475).
(TVA)
IC( 1) eng. design & supervision
IC( 2) a-e contractor
IC( 3) construction expense
IC( 4) contractor fees
IC( 5) contingency
IC( 6) royalties
(EPRI)
general facilities
eng. and home office
project contingency
process contingency
sales tax
royalty allowance
fees
2.6 Main FORTRAN Variables
2-36
-------
IC( 7) working capital preproduction costs
IC( 8) iterest during construction inventory capital
IC( 9) allowance for startup & mods initial catalyst
IC(10) land land
INDCST(10)
Indirect Cost for each tech. module.
Flags :
MOPT(25)
KO(2)
Array of flags indicating which tech. modules to optimize.
Output options.
2.6.2 Scalar Numeric Variables -
CONSUM
CT
TYPCT
ITT
TYPIC
ISTYPE
Overall Total Indirect Cost of Consummables.
Coal Heating Type.
l=Bituminous
2=Sub-bituminous
3=Lignite
Coal Sulfur Type (1-6).
Coal Input Type(l=typical,2=user,>2 AUSM Database).
Typical Coal Type.
Limestone Type (1-6). THE FOLLOWING ARE POSSIBLE VALUES FOR ISTYPE:
1- CALCITIC LIMESTONE
2- DOLOMITIC LIMESTONE
3- CALCITIC HYDRATE
4- DOLOMITIC HYDRATE
5- CALCITIC PRESSURE HYDRATE
6- DOLOMITIC PRESSURE HYDRATE
BSIZE
CF
NR
FMB
Boiler Size.
Capacity Factor.
Retrofit Status.
Firing Method of Boiler.
1 wall
coal
2.6 Main FORTRAN Variables
2-37
-------
2
tangential
coal
3
cyclone
coal
4
stoker
coal
5
+hori zontal/front/face
residual oil
(grade 6)
6
tangential
residual oil
(grade 6)
7
+opposed
residual oil
(grade 6)
8
boilers under lOOmmbtu/hr exc tang.
natural gas
9
tangential
natural gas
IS In Service Data (YYYY).
SLNLVL
BOTTOM Boiler Bottom Configuration (l=dry, 2=wet).
NM
RDF Relative Difficulty Factor for Retrofitting.
TPC Total Plant Cost.
SR Stoichiometric Ratio.
EFFS02 Efficiency (percentage) S02 Removal.
PPH... Pounds Per Hour Process Material flow rates, where ... is S02 for
Sulfur Dioxide, NOX for Nitrogen Oxides, PRT for Particulate
Matter, and MST for Moisture.
2.6.3 Logical Flag Variables -
TVA Flag for TVA (else EPRI) Costing mode.
MODE Flag Batch or Interactive Operating mode.
2.7 USAGE OF FORTRAN COMMON BLOCKS
ACCCCE.CMM
DISCRIPTION:
Material costs array.
2.6 Main FORTRAN Variables
2-38
-------
SUBROUTINES:
OUTTVA.FOR
OUTEPR.FOR
ACCCIC.CMM
DISCRIPTION:
Annual cost array, capitol cost array, indirect cost array,
total plant cost array.
SUBROUTINES:
GC.FOR
GSUB.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
NGR.FOR
SCR.FOR
WASTE.FOR
ZCOSTS.FOR
MODEL.FOR
CSB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
BATCHC.CMM
DISCRETION:
Optimization flags.
SUBROUTINES:
BATCH3.FOR
CORSET.FOR
MODEL.FOR
2.7 Usage of FORTRAN Common Blocks
2-39
-------
BIN.CMM
DISCRETION:
SULFCAT - sulfur class category based on coal sulfur content (%)
HHVCAT - coal heating class category.
(1) Bituminuous
(2) Sub-bituminuous
(3) Lignite
REGION - coal supply region.
CSCOL - coal sulfur cleaning column, represents level of
cleaning within a cleaning method, higher value
represents lower end sulfur content.
PLEVEL - cleaning method/technology, higher value represents
lower end sulfur content. Several CSCOL levels may
exist within each cleaning method/technology.
COST - coal cost ($/ton) at the above levels
WEIGHT - weight recovery factor at the above levels
CHHV - coal heating value (btu/#) at the above levels
ASH - coal ash content (%) at the above levels
SUBROUTINES:
BATCH3.FOR
BSEARCH.FOR
COALMAT.FOR
CORSET.FOR
MODEL.FOR
C0AL1.CMM
DISCRETION:
Coal constants.
SUBROUTINES:
CSB.FOR
DSI.FOR
ESP.FOR
FF.FOR
GC.FOR
GSUB.FOR
LIMB.FOR
2.7 Usage of FORTRAN Common Blocks
2-40
-------
LNBOF.FOR
LSD.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
READIN.FOR
SCACAL.FOR
UNCNTL.FOR
COMM.CMM
DISCRETION:
Program general discription values.
SUBROUTINES:
BATCH3.FOR
CORSET.FOR
DEBUG.FOR
MODEL.FOR
OUTEPR.FOR
PDUMPS.FOR
SCRNUP.FOR
COSTS.CMM
DISCRIPTION:
Individual module capital costs, annual costs for all
technologies, indirect costs for all technologies,
and consumables indirect costs.
SUBROUTINES:
CSB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
FIXATE.FOR
GC.FOR
2.7 Usage of FORTRAN Common Blocks
2-41
-------
GSUB.FOR
IAPPAS.FOR
LIFE.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MAIN2.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
REPOWER.FOR
SCACAL.FOR
SCR.FOR
WASTE.FOR
WORKCP.FOR
CSTNDX.CMM
DISCRIPTION:
Database names and record numbers etc.
SUBROUTINES:
ADAMGO.FOR
DUCWRK.FOR
ELECTR.FOR
EQUIPT.FOR
FAN1.FOR
INSTRM.FOR
LIMB.FOR
LIMEPR.FOR
LSPREP.FOR
MODEL.FOR
PIPES.FOR
READIN.FOR
TVAIN.FOR
WASTE.FOR
2.7 Usage of FORTRAN Common Blocks
2-42
-------
DSIPARM.CMM
DISCRIPTION:
Duct sorbent injection parameters - DSI module flag, reagent
feed rate, S02, NOx removal efficiency and capture efficiency.
SUBROUTINES:
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
FIXATE.FOR
MODEL.FOR
EFACT.CMM
DISCRIPTION:
Coal type, emission factor, bottom type values.
SUBROUTINES:
BLOCK.FOR
GSUB.FOR
NGR.FOR
READIN.FOR
UNCNTL.FOR
ESC.CMM
DISCRIPTION:
Date values, materials, labor, plant rate modifiers.
SUBROUTINES:
CSB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
2.7 Usage of FORTRAN Common Blocks
2-43
-------
FF.FOR
GC.FOR
GSUB.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
SCR.FOR
FAN.CMM
DISCRIPTION:
Fan pressure values.
SUBROUTINES:
DRIVERB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
GC.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MAIN2.FOR
MODEL.FOR
OUTEPR.FOR
OUTTVA.FOR
SCACAL.FOR
SCR.FOR
FLYASH.CMM
DISCRIPTION:
Upstream particulate collector removal efficiency, FGD
scrubber particulate removal efficiency, actual system
upstream particulate removal collector efficiency.
2.7 Usage of FORTRAN Common Blocks
2-44
-------
SUBROUTINES:
BECHTL.FOR
DUCWRK.FOR
HOTGAS.FOR
IAPPAS.FOR
READIN.FOR
TVAFGD.FOR
WASTE.FOR
ZERO.FOR
HELP.CMM
DISCRIPTION:
Help screen and database variables.
SUBROUTINES:
CREF.FOR
FIND.FOR
HLPFND.FOR
HLPOPN.FOR
MODEL.FOR
HELPTXT.CMM
DISCRIPTION:
Help screen display data.
SUBROUTINES:
HLPFND.FOR
INDEX.CMM
DISCRIPTION:
Data base index file variables.
2.7 Usage of FORTRAN Common Blocks
2-45
-------
SUBROUTINES:
CREF.FOR
DBIN.FOR
DEFDB.FOR
FIND.FOR
MODEL.FOR
NDXINF.FOR
INPUT.CMM
DISCRIPTION:
Boiler control and run information.
SUBROUTINES:
BATCH3.FOR
BLOCK.FOR
COALMAT.FOR
CORSET.FOR
CSB.FOR
DEBUG.FOR
DRIVERB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
FIXATE.FOR
GC.FOR
GSUB.FOR
IAPPAS.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MAIN2.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
PDUMPS.FOR
READIN.FOR
RETRO.FOR
SCACAL.FOR
SCR.FOR
TVAFGD.FOR
2.7 Usage of FORTRAN Common Blocks
2-46
-------
UNCNTL.FOR
WASTE.FOR
WORKCP.FOR
INSYSP.CMM
DISCRIPTION:
Unit thermal efficiency, boiler net heat reate, heat input,
natural gas burning fraction.
SUBROUTINES:
CSB.FOR
DSI.FOR
ESP.FOR
FF.FOR
GC.FOR
GSUB.FOR
IAPPAS.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
READIN.FOR
SCACAL.FOR
UNCNTL.FOR
MATBAL.CMM
DISCRIPTION:
Contains material balence values, ESP plate area upgrade
for EDP tune-up option, capital cost upgrade for ESP ash
hoppers, life extension flag.
2.7 Usage of FORTRAN Common Blocks
2-47
-------
SUBROUTINES:
DRIVERB.FOR
DSI.FOR
EQUIPT.FOR
ESP.FOR
FF.FOR
GC.FOR
LIFE.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
OUTEPR.FOR
OUTTVA.FOR
READIN.FOR
SCACAL.FOR
TVAFGD.FOR
TVAIN.FOR
MMENU.CMM
DISCRETION:
Menu system variables.
SUBROUTINES:
HLPFND.FOR
MNUINT.FOR
NEW.CMM
DISCRETION:
None.
SUBROUTINES:
BATCH3.FOR
CORSET.FOR
MODEL.FOR
READIN.FOR
2.7 Usage of FORTRAN Common Blocks
2-48
-------
OPT.CMM
DISCRIPTION:
Efficiency optimization values.
SUBROUTINES:
DSI.FOR
ESP.FOR
FF.FOR
GC.FOR
HOTGAS.FOR
IAPPAS.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
READIN.FOR
TVAFGD.FOR
OUTH.CMM
DISCRETION:
Contains output headings.
NST - the number of subheadings for each module
HMOD - 4 character module abbreviation
HSTRM - stream variable titles
HCAP - module titles
SHCAP - array of 8 subheadings for each module
SUBROUTINES:
BLOCK.FOR
OUTEPR.FOR
OUTTVA.FOR
2.7 Usage of FORTRAN Common Blocks
2-49
-------
PARM.CMM
DISCRIPTION:
Array containing data from parameter file.
SUBROUTINES:
BATCH3.F0R
BLOCK.FOR
COALMAT.FOR
CORSET.FOR
CSB.FOR
DEBUG.FOR
DRIVERB.FOR
DSI.FOR
EPECON.FOR
ESP.FOR
FAN1.FOR
FF.FOR
FIXATE.FOR
GC.FOR
GSUB.FOR
HOTGAS.FOR
IAPPAS.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
PARMIN.FOR
PDUMPS.FOR
PIPES.FOR
RAT.FOR
READIN.FOR
RETRO.FOR
SCACAL.FOR
SCR.FOR
TVAFGD.FOR
UNCNTL.FOR
WASTE.FOR
2.7 Usage of FORTRAN Common Blocks
2-50
-------
PARMCH.CMM
DISCRIPTION:
Paramter file changes.
SUBROUTINES:
BATCH3.F0R
CORSET.FOR
CSB.FOR
DEBUG.FOR
ESP.FOR
MODEL.FOR
PARMIN.FOR
PDUMPS.FOR
RETRO.FOR
PLAB.CMM
DISCRIPTION:
Main paramter file name.
SUBROUTINES:
MODEL.FOR
PDUMPS.FOR
SAVNDX.CMM
DISCRIPTION:
Used as the last record found when searching for data base
records.
SUBROUTINES:
FIND.FOR
HLPFND.FOR
2.7 Usage of FORTRAN Common Blocks
2-51
-------
SK.CMM
DISCRIPTION:
Used for when searching for data base records.
SUBROUTINES:
CREF.FOR
FIND.FOR
SLFCNT.CMM
DISCRIPTION:
Sulfur contents array.
SUBROUTINES:
BATCH3.F0R
BLOCK.FOR
COALMAT.FOR
CORSET.FOR
SPC.CMM
DISCRIPTION:
Blank line.
SUBROUTINES:
BLOCK.FOR
DBFINF.FOR
MODEL.FOR
SCRNUP.FOR
2.7 Usage of FORTRAN Common Blocks
2-52
-------
STREAM.CMM
DISCRETION:
Air flow variables.
SUBROUTINES:
DRIVERB.FOR
DSI.FOR
ESP.FOR
FAN1.FOR
FF.FOR
GC.FOR
GSUB.FOR
HOTGAS.FOR
IAPPAS.FOR
LIMB.FOR
LNBOF.FOR
LSD.FOR
MODEL.FOR
NGR.FOR
OUTEPR.FOR
OUTTVA.FOR
READIN.FOR
SCACAL.FOR
SCR.FOR
TVAFGD.FOR
UNCNTL.FOR
SYSTEM.CMM
DISCRETION:
System date and time.
SUBROUTINES:
MODEL.FOR
TYPE.CMM
DISCRIPTION:
Typical coal characteristics.
2.7 Usage of FORTRAN Common Blocks
2-53
-------
SUBROUTINES:
BATCH3.FOR
COALMAT.FOR
CORSET.FOR
XFER2.CMM
DISCRIPTION:
Titles.
SUBROUTINES:
BLOCK.FOR
MODEL.FOR
OUTEPR.FOR
XFER3B.CMM
DISCRIPTION:
Titles.
SUBROUTINES:
BLOCK.FOR
OUTTVA.FOR
XFER4.CMM
DISCRETION:
Titles.
SUBROUTINES:
PIPES.FOR
2.7 Usage of FORTRAN Common Blocks
2-54
-------
XFER7.CMM
DISCRIPTION:
Titles.
SUBROUTINES:
BLOCK.FOR
OUTEPR.FOR
OUTTVA.FOR
2.8 USAGE OF FORTRAN TO C INTERFACE FILES
The interface definitions contained in these three FORTRAN Include Files
are used to support the Mixed Language Mode of the family of Microsoft computer
programming languages. In this case, these interface definitions tell FORTRAN in
what format to pass the subroutines list of calling arguments to C language.
The interface definitions are handled from the FORTRAN side of the language
interface owing to the fact that the FORTRAN compiler itself is written in the
Mixed-language combination of Assembler and C languages.
The FORTRAN addresses (integer*4) are mapped onto C pointers (char*). These
addresses correspond to the starting location in the computer memory for program
arrays and common blocks. Internally, both languages use the combination of a
starting address and an offset value to locate individual items in these
composite data types.
The 2-byte FORTRAN integer (integer*2) is equivalent to the short integer
(short int) in C.
HELPINIT.INT - Interface for calling C subroutine HELPINIT from FORTRAN
subroutine HLPFND.
FORTRAN FORTRAN C C
Variable Data Type Data Type Variable Description
hlpadd integer*4 char* (pointer) arr_point* Address of Help Screen
2.7 Usage of FORTRAN Common Blocks
2-55
-------
HLPDSP.INT- Interface for calling C subroutine HLPDSP from FORTRAN subroutine
HLPFND.
FORTRAN
Variable
FORTRAN
Data Type
Data Tvoe
Variable Description
nohelp
titadd
txtadd
hlpl in
integer*2
integer*4
integer*4
integer*2
short int
char* (pointer)
char* (pointer)
short int
nohelp
tit_point*
txtpoint*
line txt
IAPMNU.INT- Interface for calling C subroutine IAPMNU from FORTRAN subroutine
MNUINT.
FORTRAN
Variable
blkadd
FORTRAN
Data Type
integer*4
Data Type Variable
struct* (pointer) blkadd*
Description
Interface of FORTRAN COMMON
Block MENDAT to C
structure-type MENUDATA
The MENDAT common block contains the following:
NUMCHG - array of number of menu choices
MAXLNG - array of maximum length of menu text
ARRADD(1..9) - array of addresses for menu/window formatting
information
FORTRAN passes the address of the starting byte of this COMMON Block which C
recieves as a pointer. The pointer is declared to point to a C structure type
called MENUDATA which maps onto the FORTRAN common block MENDAT item-by-item in
a one-to-one correspondence.
2.8 Usage of FORTRAN to C Interface Files
2-56
-------
SECTION 3.0
FORTRAN CODE LISTINGS
3.1 FORTRAN SOURCE CODE FILE LISTINGS
Diskette 1 of this report contains all the executable files necessary to run
the model. FORTRAN and C Language source code files and other files necessary
to create an executable file are on Diskettes 2 and 3. The files are in an ASCII
format and can be viewed with a text-file editor.
3.1 FORTRAN Source File Listings
3-1
-------
-------
SECTION 4.0
C LANGUAGE CODE FOR USER INTERFACE
4.1 C LANGUAGE PROGRAM SOURCE CODE FILES
BATCHW
IAPMNU
PARMCHNG
STATS
CAT IN
INFACE
PARMLOAD
TCHIMP
CHKIN
INFILE
PARMSET
TCHOPT
COMENT
KEYLST
PGFRM
TIMSET
FRONT
MAKINPW
RATMOD
V LIST
FSIZE
MENUZ
RD LINE
WINDUP
GETINP
MFLOCATE
READPARM
WRITEP
HELPINIT
NEW PATH
SAVFIL
WRITSCCS
HLPDSP
C Languaqe Header Files
GETINP
READPARM
LOAD
RUNDATA
CMMNBLK
PARMCH
GLOBAL
IAPCXMNU
IAPCXHLP
PARM
COMM
4.2 SUMMARY OF C SUBROUTINES
INFILE Provides the user on-screen selection of an input parameter file
using MENUZ.
READPARM Reads parameter file of modification in interactive user screens
IAPMNU Main control routine for interactive user interface.
MENUZ Main interface routine between IAPCS and Windows for Data (WFD)
support routines. Takes a 'memory file' as input and calls the
appropriate WFD routines to create an on-screen window with data
selection/edit capabilities.
HLPDSP Displays context-sensitive help windows. Uses pointers to
appropriate help text, screen title, and window as input.
4.1 C Language Program Source Code Files
4-1
-------
TIMSET Get System Time and Date for on-screen display.
PARMSET Transfers data to and from the parameter array (P) and the
interactive User Interface data structures. Uses a flag argument
as input to determine the direction of transfer.
COMENT Allows interactive input of Run Comment Lines.
TCHINP Through MENUZ, allows user selection of technology modules using
cursor keys and a 3-tier hierarchy : pre-combustion, in situ, and
post-combustion technologies.
TCHOPT Provides interactive selection of optimization, entry of target
emission rate, and checks that any of currently selected
technologies may be optimized (*).
RATMOD Prompts user for base year costs and calculated Rates.
GETINP Bulids a list of elements for a given input serene using thier
parameter index numbers. The first element of the screen is stored
in structure ST. Also calls routine to construct the input window.
(MAKINPW). Works off of Menu Level and Screnn group number.
CHKNAM
SAVFILE Saves data from interactive session to New or Existing Parameter
Files, or Batch Data Files.
(*) Note: The term optimization, as currently used in IAPCS is a mis-nomer
and does not indicate a mathematical optimization algorithm. Instead,
optimizatation currently mean a re-execution of the model software with
operating parameters of the technology selected for "optimization"
adjusted
Associated FORTRAN Routines -
HLPOPN Opens IAPCX help files - composed of dBASE III database with
corresponding memo file. These help files contain both descriptive
text for the context-sensitive help windows activated by the F1 key,
and all text used for constructing the on-screen control menus.
After opening the necessary files, HLPOPN reads the file headers and
checks for file errors.
CREF Creates a cross-reference table from the index file, IAPCXHLP.NDX,
for indexed file access by number code for menu/help text items. The
table usually appears at the end of the index file. A cross
4.1 C Language Program Source Code Files
4.2 Summary of C Subroutines
4-2
-------
reference entry can be identified by the first four byte integer of
the record being non-zero. This number represents the node in which
this key is the last entry. The nth entry is off by plus one. That
is, the mini-cross reference entry of node n actually represents
node n-1.
HLPFND HLPFND determines the location of a particular HELP screen database
record based on the correpsonding index file.
HELPINIT
FIND Part of the interface between database file(s) and their
associated index file(s). Based on the key index field entry
from the main driver database, search the remaining indexes for
a matching record.
MNUINT Initialize front-end menuing system, loads menu screens from
C memory file. When completed, passes control to IAPMNU.
4.3 C SUBROUTINE HIERARCHY CHART
The interactive user interface of IAPCS is programmed chiefly in the C
language, with a few support routines in FORTRAN. These FORTRAN routines are
also discussed here. Figure 4-1 shows the Subroutine Hierarchy Chart for the
front-end system of IAPCS.
The main program routine is called FRONT.C which uses the presence of
command line arguments to trigger the system to execute in Batch mode or
Interactive mode.
If arguments are given, FRONT will call the routine MODEL directly and pass
the information to MODEL to indicate the batch mode and the identity of the Batch
Data Input File.
If no command line arguments are supplied by the user when the program is
started, the program will start up in Interactive mode. First the FORTRAN
routine HLPOPN is called to open the Help/Menu Text Database (see Figure 1-1).
Next control will pass to the FORTRAN routine MNUINT to initialize the computer
screen system. After this, control is passed to the C routine IAPMNU which
controls all subsequent steps in interactive operation, including calling the
model routine MODEL. In interactive mode MODEL will look into the user screen
4.1 C Language Program Source Code Files
4.2 Summary of C Subroutines
4-3
-------
data structures to get its input data instead of only to Parameter and Batch Data
Files.
CCCFOJcCCcccCc C C
* See Figure 2-1 for MODEL sub-system
** C = C Language Routine
FOR = Fortran Language Routine
Figure 4-1. C Subroutine Hierarchy Chart
4.3 C Subroutine Hierarchy
4-4
-------
4.4 DESCRIPTION OF C SUBROUTINES
The C subroutines that used in IAPCS are all associated with the
interactive user-interface.
The IAPCS menuing system is a combination of FORTRAN and C programs
which serve to create the basic structure of the menuing features
while the substance of the menus (text, borders, choices, etc.) are
contained in external files. The purpose of this document is to
outline the pertinent information contained in these files and the
general procedure use by the executable to obtain the information and
formulate the menu.
The information regarding the menu borders and the main and edit sub-
menus are loaded by the FORTRAN subroutine MNUINT into a common memory
block and control is passed to IAPMNU (a C function). IAPMNU performs
the maneuvers necessary to display the main menu screens and handle
the choices made by the user.
When the user selects the load parameter data selection, IAPMNU loads
all of the information in the (xxx) family of files into memory, keeping
track of the first occurrences of a screen group in the parameter files,
and the next entry entries in the DFFASC.xxx files. When the
user selects to edit or list (new) the parameter information, the
program obtains the screen group reference directly from the user and,
in turn, searches memory for the proper screen group entries by using
the first entry information it stored away and using the next entry
table obtained from DFFASC.xxx.
4.4.1 Action Diagrams for Ma.ior C Routines
FRONT Action Diagram
set TVA NAME value from argument
set INPUT DATA FILE NAME from argument
4.4 Description of C Subroutines
4-5
-------
-while no key hit
display intro screen
-if no command line arguments
call user interactive input routines
-if command line arguments
check economic format
check existence of PARAMETER file
check existence of DATA file
-if no error so far
call MODEL suboutine to perform cost calculations
4.4 Description of C Subroutines
4.4.1 Action Diagrams for Major C Routines
4-6
-------
IAPMNU Action Diagram
turn off cursor
clear screen
set text window
set time and date window
create memory files
set memory file to text window
set main menu choice window
set status window memory file
place system time and date in windows
set INPUT DATA FILE NAME from argument
-while not exit key
-if valid choice display intro screen
set selection in main category window
-if choice is 1
| set up memory file with ECONOMIC FORMAT
-if choice is 2
input file selection
check if field definition files exist
-if choice is 3
J input file editing
4.4 Description of C Subroutines
4.4.1 Action Diagrams for Major C Routines
4-7
-------
MENUZ Action Diagram
implement logical attributes
turn off "top" and "bottom of file" messages
set popup menu on screen
calculate file row and column coordinates
determine coordinates of the default item where cursor to go
determine memory file length and set initial hilite window
change attribute of text in highlight window to RE VERS E/LRE VERSE
-while not exit key
place system time and date in windows
-if IBM Extended key
processes apropriate help menu
-else if PgUp PgDn key
highlight item
return to calling routine
-else if ENTER key
return number of current highlighted item
-else if letter key
find matching item or ring bell
-else bad key
Action Diagram for IAPMNU.C
4-8
-------
4.4.2 C Subroutine Details
MODULE : CHKIN
FUNCTION : Determines if user has selected input file.
CALLED FROM : IAPMNU
CALLS :
none
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
iapcxmnu.h
global.h
rundata.h
MODULE : COMENT
FUNCTION : Sets up windows and reads in two run descriptor fields.
CALLED FROM : IAPMNU
CALLS :
none
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wf c. h
iapcxmnu.h
comm.h
4.4.2 C Subroutine Details
4-9
-------
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
MODULE
FUNCTION
CALLED FROM
CALLS
FILES ACCESSED
FILES CREATED
INCLUDE FILES
FRONT
Main IAPCS routine,
n/a
HLPOPN
MNUINT
MODEL
none
none
parm.h
GETINP
Accepts input to a input window.
IAPMNU
none
none
none
wfd.h
global.h
parm.h
iapcxmnu.h
readparm.h
4.4.2 C Subroutine Details
4-10
-------
MODULE : HELPINIT
FUNCTION : Main user interface menu routine.
CALLED FROM : IAPMNU
CALLS :
TIMSET
PARMSET
MODEL
READPARM
MENUZ
INFILE
CHKIN
COMMENT
TCHIMP
TCHOPT
RATMOD
GETINP
SAVFIL
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
iapcxmnu.h
global.h
cmmnblk.h
rundata.h
comm.h
parm.h
load.h
readparm.h
: INFILE
: Allows the user to select a file from a directory
1isting.
: IAPMNU
none
MODULE
FUNCTION
CALLED FROM
CALLS
4.4.2 C Subroutine Details
4-11
-------
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wfc.h
global.h
MODULE
FUNCTION
CALLED FROM
PARMSET
Set's parameter data set within user interactive
system into P array and set's loaded paramter file data
into users interactive system data arrays.
IAPMNU
CALLS :
none
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wfd.h
rundata.h
comm.h
parm.h
readparm.h
MODULE : SAVFIL
FUNCTION : Allows user to save data currently load in model to
a current file, a new file, or a batch data file.
CALLED FROM : IAPMNU
CALLS :
none
4.4.2 C Subroutine Details
4-12
-------
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wfd.h
global.h
parm.h
iapcxmnu.h
readparm.h
MODULE : TCHOPT
FUNCTION : Allows the user to select tchnologies from implemented
set to optimize (set a target emission rate).
CALLED FROM : IAPMNU
CALLS :
none
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wfc.h
global.h
cmmnblk.h
rundata.h
MODULE : TIMSET
FUNCTION : Sets the system time and date to previously defined
screen windows.
CALLED FROM : IAPMNU
CALLS :
none
4.4.2 C Subroutine Details
4-13
-------
FILES ACCESSED :
none
FILES CREATED :
none
INCLUDE FILES :
wfc.h
4.4.2 C Subroutine Details
4-14
-------
4.5 COMMERCIAL C LANGUAGE SUPPORT PACKAGES
The screen-oriented user interface of IAPCS 3.0 was developed using the
following commercial packages from Vermont Creative Software:1
windows for C (Version 4.15)
Windows for Data (Version 2.06)
All of the C routines below IAPMNU (see Figure 3-1) interact with the
Windows for Data Package to some extent. The main interface between IAPCS and
Windows for Data is, however, through the two C routines IAPMNU and MENUZ.
At the time of this writing, the Windows for Data is being replaced by an
enhanced release called 'Vermont Views'. In the future,the availability of,and
support for the Windows for Data package may disappear. At that time it will be
necessary to convert the IAPCS user-screen routines to the newer Vermont Views.
While, some automated conversion is provided, a test conversion showed that 153
program modifications are necessary for this conversion. However numerous, it
is not anticipated that the difficulty of accomplishing these program files will,
in itself, be prohibitive.
4.6 MAIN C VARIABLES
Routine FRONT.C
WINDOW Windows for data menu window structure
MFILEPTR Memory file name type
mench[12] Name of memory file. Menu text and data entry screen formats are
extracted from the Help Database, written to a memory file, and the
name of the memory passed to MENUZ for production of the computer
screen image.
Vermont Creative Software, Pinnacle Meadows, Richford, Vermont 05476.
802-848-7731.
4.6 Commercial C Language Support Packages
4-15
-------
parmitems Analogous to the FORTRAN Parameter array P(). The macros TECH-LOC
OPT-LOC, and DATA-LOC define the starting indices of technologies
optimizations and boiler/run data within this array.
load Holds unmodified values loaded from selected parameter file for
later comparison in order to determine changes made by user
interface.
Stat-bar Structure containing the following elements:
pfile - input parameter file name
inpath - disk directory
form - (1=TVA, 2=EPRI)
itech - array of tech. modules used
optimze - optimization flag
optmod - module to be optimized
target - optimized target emission rate
menu-data Equivalent structure to FORTRAN common block MNUINT.
parm-change Equivalent to FORMTARN common block PARMCH.
argv[] argv[l] - 1 = TVA
2 = EPRI
argv[2] - Main parameter file name.
argv[3] - Data file name,
qitems number of items in menu
itemlength number of char spaces per item
itemrow number of items per row
def _pos default position
hi pivl level of HELP entering menu
altpg alternate PgUP/PgDN processing flag
lattsw logical attributes flag
4.6 Commercial C Language Support Packages
4.7 Main C
4-16
-------
SECTION 5.0
C LANGUAGE CODE LISTINGS
5.1 C SOURCE CODE FILE LISTINGS
Diskette 1 of this report contains all the executable files necessary to
run the model. FORTRAN and C Language source code files as well as other
files necessary to create an executable file are on Diskettes 2 and 3. The
files are in an ASCII format and can be viewed with a text-file editor.
5.1 C Source Code File Listings
5-1
------- |