tinned States
Environmental Protection
Agency
EPA-600/8-88-097a
September 1988	
~EPA Research and
Development
INDOOR AIR QUALITY
MODEL VERSION 1.0
Prepared for
Office of Air and Radiation
Prepared by
Air and Energy Engineering Research
Laboratory
Research Triangle Park NC 27711

-------
RESEARCH REPORTING SERIES
Research reports of the Office of Research and Development. U.S. Environmental
Protection Agency, have been grouped into nine series. These nine broad cate-
gories were established to facilitate further development and application of
environmental technology. Elimination of traditional grouping was consciously
planned to foster technology transfer and a maximum interface in related fields.
The nine series are:
1.	Environmental Health Effects Research
2.	Environmental Protection Technology
3.	Ecological Research
4.	Environmental Monitoring
5.	Socioeconomic Environmental Studies
6.	Scientific and Technical Assessment Reports (STAR)
7.	Interagency Energy-Environment Research and Development
3.	"Special" Reports
9. Miscellaneous Reports
This report has been assigned to the SPECIAL REPORTS series. This series is
reserved for reports which are intended to meet the technical information needs
of specifically targeted user groups. Reports in this series include Problem Orient-
ed Reports. Research Application Reports, and Executive Summary Documents.
Typical of these reports include state-of-the-art analyses, technology assess-
ments. reports on the results of major research and development efforts, design
manuals, and user manuals.
EPA REVIEW NOTICE
This report has been reviewed by the U.S. Environmental Protection Agency, and
approved for publication. Approval does not signify that the contents necessarily
reflect the views and policy of the Agency, nor does mention of trade names or
commercial products constitute endorsement or recommendation for use.
This document is available to the public through the National Technical Informa-
tion Service. Springfield. Virginia 22161

-------
EPA-600 / 8-88-097 a
September 1988
Indoor Air Quality Model Version 1.0
by
Leslie E. Sparks
U. S. Environaental Protection Agency
Air and Energy Engineering Research Laboratory
Research Triangle Park, North Carolina 27711
Prepared for:
U. S. Environaental Protection Agency
Office of Research and Developaent
Office of Environaental Engineering and Technology Demonstration
Washington, D. C. 20460

-------
ABSTRACT
A aulti-rooa model for estiaating the impact of various sources
on indoor air quality (IAQ) is presented. The aodel is written
for use on IBN-PC and coapatlble aicrocoaputers. The aodel is
easy to use with a aenu driven user interface. Data entry is
handled with a "fill in a fori" interface. Model results are
presented in graphical and tabular fora. The aodel treats each
rooa as a well lixed chamber that can contain both sources and
sinks. The aodel allows analysis of the iapact of lnter-rooa air
flows, heating ventilating air conditioning (HVAC) air flows, and
air cleaners on IAQ. Model predictions are coapared with
experlaental data froa the EPA IAQ test house-. The aodel
predictions are in good agreement with the experlaental data.
The aodel is a useful tool for analyzing IAQ Issues.
The aodel requires an IBM-PC or coapatlble coaputer, DOS 2.1 or
higher, 1 disk drive, and at least 512 k-bytes of aeaory. A
graphics adapter and aonltor are required to display the
graphical output froa the aodel.
ii

-------
TABLE OF CONTENTS
Section 1. Model Overview 	 1
Introduction 	 l
The problem 	 1
The user interface 	 2
Using the Manual 	 2
Getting started 	 2
Making a backup copy 	 2
Installing on hard disk system 	 3
Installing on floppy disk system 	 4
In a hurry 	 4
Section 2. Theory and Numerical Techniques 	 5
Theory 	 5
Mass balances 	 5
Mixing 	 6
Pinal equations 	 7
Numerical techniques 	 8
Source terms 	 8
Cigarette smoking 	 9
Kerosene heaters 	 9
Unvented gas heaters 			 10
Moth crystals 	 10
Floor wax 	 10
Other 	 10
Sinks 	 10
The air handling system 	 11
Programming the model 	 12
User interface 	 13
Error handling 	 13
Section 3. User Guide 	 15
Getting started 	 15
The user interface 	 15
Define source strengths menus and forms 	 16
Indoor air model menus and forms 	 IB
Examples 	 38
Example l--single chamber study 	 38
Example 2--«ultiple chamber study	 49
Section 4. Case Studies 	 53
Case study 1Particulate loading in office 	 53
Case study 2. Random cigarette sources 	 55
Case study 3. Effect of 13% efficient fi1ter 	 55
Case study 4. Filtering for < 50 pg/m 	 55
Case study 5. No room exceeding 50 pg/m 	 56
Case study 6. Analysis of radon entry via soil gas ... 64
Case study 7. Radon driven by building depressurizat I on 65
Section 5. Application of Model to IAQ Test House 	 69
Introduction 	 69
Small chamber data 	 69
Test house 	 69
Modeling 	 73
Conclusions from modeling 	 	 77
C02 experiments 	 80
iii

-------
Follow-up experiments 			80
Additional Modeling 		83
Normal air handler operation 		83
Model analysis of Mitigation strategies 		35
Conclusions 		85
Reemitting sink 	91
Section A. Hints on using the model 		95
Pind the source 		95
Look for sinks 		95
References 		97
Appendix A Program listing 				A-l
Appendix B Contents of documentation files 		B-1
iv

-------
LIST OF FIGURES
1-1. Single roo« flows 	 l
1-2.	Master menu for AEERL indoor air model	 2
2-1.	Mass balance for a single room 	 5
2-2.	Floor wax emission factors 		14
3-1.	Master control menu 		16
3-2. Select source menu 		16
3-3. Source strength data entry form 		18
3-4. Main Menu for indoor air model 		18
.3-5. Data entry menu 		19
3-6. Pollutant menu 		19
3-7. Building definition form 		20
3-8. HVAC Menu 		21
3-9. General description form for HVAC 		21
3-10. Air cleaner data entry form 		22
3-11. HVAC source data entry 		22
3-12. HVAC air flow data entry form 		23
3-13. Room definition screen 		24
3-14. Room screen showing definition options 		25
3-15. Room screen ready to define size of room 		26
3-16. Room screen ready to define initial concentration ...	26
3-17. Room screen showing source options		27
3-18. Room screen showing cigarette data entry . ..>		28
3-19. Room screen showing kerosene heater data entry 		28
3-20. Room screen showing unvented stove data entry 		29
3-21. Rooa screen showing moth crystal data entry 			29
3-22. Floor wax data entry screen 		30
3-23. Room screen showing other source data entry 		30
3-24. Room screen showing sink data entry 		31
3-25. Room screen showing interconnections option 		32
3-26. Room screen showing HVAC flow data entry 			32
3-27. Room screen showing outdoor flow data entry 		33
3-28. Room flow data entry form 		33
3-29. Output options menu 				34
3-30. Plot menu 		35
3-31. Set up menu 		37
3-32. Master menu for example 1 		38
3-33. Define source menu for example 1 		39
3-34. Source strength data entry for example 1 		39
3-35. Main control menu for example 1 			40
3-35. Data entry menu for example 1 		40
3-37. Select pollutant menu for example 1 		41
3-38. Building definition menu for exaaple 1 				41
3-39. Room definition screen for example 1 		42
3-40. Rooa voluae screen for exaaple 1 		42
3-41. Define kerosene heater screen for example 1 		43
3-42. Air flow to outdoors for exaaple 1 			44
3-43. Setup form for example 1 		45
3-44. Plot menu for example l 		46
3-45. Screen dump of plot for example 1 		47
3-46. Comparision of model with Traynor, et al		48
3-47. HVAC menu for example 2 		49
v

-------
3-48. Building for example 2 	 		50
3-49. HVAC data entry form for example 2 		51
3-50.	Comparison of results with Axley calculations 		52
4-1.	Building layout for case study 1 		54
4-2. Model calculations for case study 1 		57
4-3. Particle concentrations for cigarette smoking 		58
4-4. Comparision of predicted and measured results 		59
4-5. Effect of 13* efficient filter 				60
4-6. Effect of air cleaner efficiency 		61
4-7. Results from case study S 		62
4-8. Instaneous particulate concentrations 		63
4-9. Building for case study 6 		64
4-10. Final version of model building for case study 6 ....	65
4-11. Calculated results for radon modeling 		67
4-12.	Results for case study 7 		68
5-1.	Small chambers used for moth crystal studies 		71
5-2. IAQ Test house 			72
5-3. Initial model results 				74
5-4. Model results with a large sink 			75
5-5. Model results with 4 m /h flow from closet 		76
5-6. Model results with moderate sink 		78
5-7. Final model results with measured flows 		79
5-8. C02 test data for AEERL IAQ test house 		81
5-9. Comparison of model predictions and C02 data 		82
5-10. Predicted p-dlchlorobenzene concentration with
normal air handler operation		84
5-11. Effect of reduced moth crystal usage 			87
5-12. Effect of reduced flow from closet 		88
5-13. Effect of reduced flow and moth crystal usage 		89
5-14. Effect of opening closet door 1 min an hour 		90
5-15. P-dichlorobenzene concentration after moth crystals
were removed 		92
5-16. Data from perchloroethylene sink experiment 		93
5-17. Model calculations and data for perchloroethylene ...	94
LIST OF TABLES
2-1. Baseline data from IAQ test house 		6
2-2. Emission factors for smoking 		9
2-3. Emission factors for kerosene heaters 		9
2-4. Emission factors for unvented gas heaters 		10
4-1.	Model input for case study 1 				53
5-1.	Results of p-dichlorobenzene measurements, mg/m 		70
5-2. Input data for initial moth crystal analysis 		73
5-3. Summary comparison of model predictions and measured
data 				77
5-4. Air handling system air flows in test house 		83
vi

-------
SECTION 1.
MODEL OVERVIEW
Introduction
This aodel provides an analysis tool for those involved in indoor
air problems. The aodel allows rapid analysis of pollutant
aigratlon in a building under specified air flow conditions. The
¦odel calculations have been compared with Halted experiaental
data and with predictions of other aodels. These coaparlsons
have been favorable. These coaparlsons show that the aodel is
calculating properly and that the predictions are in line with
the experiaental data.
Additional work Is necessary to fully validate the aodel.
The Problea
Indoor air quality is deteralned by the Interactions of sources,
sinks, and air aoveaent between rooas and between the building
and the outdoors. Sources aay be located in rooas, In the HVAC
systea, or outside the building. Sinks aay be located in the
saae locations. Sinks aay also act as sources whenvthe pollutant
concentrations drop below a given value.
Air aoveaent in a building consists of:
1.	Natural air.aoveaent between rooas.
2.	Air aoveaent driven by a forced air systea (HVAC).
3.	Air aoveaent between the building and the outdoors.
A«^in_>
Aeouaulated
Reaoved
Produced
Aaountout
Figure 1-1. Single rooa flows.
The pollutant concentration in a rooa is given by a aass balance
of the various pollutants flows. For the single rooa shown in
Figure It 1:
Aaount in - Aaount out + Aaount produced - Aaount reaoved -
Aaount accuaulated
The analysis can be extended to aultlple rooas by writing a
systea of equations for each rooa. The aaount of air entering a
rooa froa all sources (the HVAC, outdoors, and other rooas) aust
equal the aaount of air leaving the rooa.
1

-------
The aass balance equations for a building result In a series
of linear ordinary differential equations. These equations can
be solved with standard techniques. The current version of the
AEERL aodel uses a Modified aldpolnt «ethod given by Press et
al. (1987). This technique is somewhat faster than a fourth
order Runge Kutta numerical solution. The technique uses a fixed
tlae step. The Method appears to be both accurate and stable
when the tlae steps are not too large.
The User Interface
The AEERL Model uses a Menu-driven data-input user Interface and
a graphics-output user interface. This user Interface Is easy to
use and self prompting. The user interface allows the user to
change the Input parameters quickly and easily and allows rapid
analysis of the calculated results.
A master Menu controls the operation of the prograM. The Master
menu is shown in Figure 1-2.
Indoor A1r Nodal Control Manu
un Indoor air itodol
<0>«f1ns soure* strengths
onf1gur# systaa
u1t
Figure 1-2. Master Menu for AEERL Indoor air Model.
The Model can be configured for an IBM-PC, XT, AT, or coMpatlble.
The Model can run on a coMputer with a MonochroMe adapter, a
color graphics adapter (CQA), or an enhanced graphics adapter
(EQA). When the aodel is run with a monochrome adapter, all
graphics are disabled.
Using the Manual
The manual is divided into six sections. Section 1 (this
section) Is a brief overview of the entire model. Section 2
discusses the theory of the model and the numerical techniques
used in the computer program. Section 3 provides user
Instructions for running the model. Section 4 provides several
case studies and examples to help in using the aodel. Section 5
provides an extended case study based on research conducted in
the AEERL teat house. And Section 6 provides hints on using the
aodel.
Getting Started
Making a backup copy
The program is distributed on one disk. The files on this disk
are: INDOOR.EXE, CONFIG.IND, HELP.IND, DEFAULT.ROM, POLLUTIO.DAT
INDOOR.BAT, README.BAT, HURRY.BAT, INSTALL.BAT, READ.ME,
README.TOO, and FASTSTAR.DOC. You should make a backup copy of
2

-------
the disk. The backup copy can be Bade using the DOS DISKCOPY
coaaand. If you have two floppy disk drives, place the
distribution disk in drive A and a blank disk in drive B. Type
DISKCOPY A: B: and follow the on-screen instructions. If you
have one floppy disk drive, place the distribution disk in the
drive and type DISKCOPY A: A:, and follow the on-screen
instructions.
After you have aade the backup, place the distribution disk in a
safe place and work with the copy you aade.
Installing on hard disk systea
If you are installing the aodel on a computer with a hard disk,
you can use the Install procedures contained on the distribution
disk. Place the backup copy of the distribution disk In the
floppy disk. Make the floppy disk the active drive. Type
INSTALL and let the computer do the work.
The install procedure creates a subdirectory on your hard disk
called INDOOR. The procedure then copies the files INDOOR.EXE,
CONFIG.IND, HELP.IND, DEFAULT.ROM, and POLLUTIO.DAT from the
floppy disk to the subdirectory. The install procedure then
copies the file INDOOR.BAT to the root directory.
If you wish to install the prograa yourself, you should create a
subdirectory for the prograa and copy the following files to the
subdirectory: INDOOR.EXE, CONFIQ.IND, HELP.IND, DEFAULT.ROM, and
POLLUTIO.DAT.
If you use the install procedure you can execute the prograa by
typing INDOOR froa the DOS proapt at the root directory. This
activates the INDOOR.BAT procedure which switches froa the root
directory to the Indoor subdirectory and then loads the indoor
air quality aodel. If you have a PATH to the root directory, you
can execute the INDOOR.BAT file froa any subdirectory.
3

-------
Installing on floppy disk system
If you have a floppy disk systea, create a working copy of the
prograa by placing the distribution disk In drive A and a blank
foraatted disk in drive B. Then type the following coaaands fron
the DOS proapt:
copy a:*.exe b:
(wait until disk drive stops then type)
copy a:*.lnd b:
(wait until disk drive stops then type)
copy a:*.roa b:
(wait until disk drive stops then type)
copy a:*.dat b:
NOTE: Do not type until disk drive stops.
To run the prograa. Bake the disk drive containing the prograa
the active drive and then type INDOOR and press ENTER.
In a hurry
If you are In a hurry to run the model, read the README files on
the distribution disk. You can read these files by 1) making the
disk drive with the distribution disk the active drive and 2)
typing README froa the DOS proapt. The README files are also
given in Appendix B of this aanual.
The README files and the FASTSTAR.DOC file contain aufficlent
lnforaation to allow you to run the prograa.
4

-------
SECTION 2.
THEORY AND NUMERICAL TECHNIQUES
Theory
Mass balances
The pollutant flows Into and out of a building can be described
as shown in Figure 2-1.
cinQii
Accumulate
C
Reaoval
Production
coutQout
C refers to concentrations and Q refers to flow rates.
Figure 2-2. Mass balance for a single rooa.
These pollutant flows can be described by the aaas balance
equation
*"f1n * "•••productd " ""'out " *,,,r«aovsd " "•M«ccueul»t«d
where Mass^n is the aass entering the building, Massout is the
aass leaving the building, Nasspr0(juce(j is the aass produced in
the building (source), MassreBOVe(j is the aass reaoved in the
building (sink), and Massaccuaujated is the aass accuaulated in
the building. (Massin - CinQln, Massout - C0UtQ0Ut etc.)
This equation holds for the building as a whole and for each rooa
in the building. For exaaple, for a building with two rooas, the
aass balances are:
Rooa 1
"•••tnl * *,Mproducsd1 " ",Mout1 " "M,r«sov«d1 * ",,,1
Rooa 2
**M1n2 + """ppsdueidJ " "*,*out2 * "M,r«soved2 * ""'J
where Mass^ is the aass accuaulated in Rooa 1 and Maas2 is the
aass accuaulated in Rooa 2.
And for the whole building:
~ ""'in? + **Mproductd1 * "mprorfue«J2 "
"M'outl " N",out2 ""'rwovtdl " "mr«sovsd2 * """B
where Massg is the aass accuaulated in the building.
S

-------
Nixing
The type of aixing between the pollutant and the rooa air oust be
specified before the aass balance equations can be used in a
¦odel. Because aixing is a coaplex phenoaenon, the exact aixing
cannot be specified; slapllfying assuaptions Bust be Bade. Plug
flow aixing and well aixed aixing are two coaaon aixing
possibilities.
In the plug flow aixing aodel the pollutant concentration varies
froa point to point along the air flow path. In the well aixed
aodel the pollutant concentration is the saae for every point in
the rooa.
The current aodel uses the well aixed aodel. This aodel was
selected because data froa the AEERL test house Indicated that
pollutant concentrations within a rooa do not vary significantly.
Table 2-1 shows the baseline data froa the AEERL test house that
indicate that the test house is well aixed.
Table 2-
1. Baseline
data for
IAQ test
house.

Probe


CO
C02
NOx
THC(as
Location
& heleht
£££
PPB

£££
Outdoors


1.14
398
0.06
0.09
Den
15. 24
ca
1.21
422
0.06
0.10
Den
91.44
ca
1.24
436
0.06
0.10
Den
162.60
ca
1.23
438
0.06
0.10
Den
238.80
ca
1.24
439
0.06
0.10
Average
den

1.23
434
0.06
0. 10
Bedrooa
15.24
ca
1.22
455
0.06
0.09
Bedrooa
91.44
ca
1.20
442
0.06
0.09
Bedrooa
162.60
ca
1.11
393
0.06
0.09
Bedrooa
238.80
ca
1.11
393
0.06
0.09
Average
bedrooa
1.16
421
0.06
0.09
Section 4 of this report discusses ways of dealing with
situations where the well aixed aodel Is not appropriate.
6

-------
Final aquations
If we accept the wall alxed aodel, we can write a differential
equation for the eass balance equation for a rooa:
VdC/dt • ClnQln ~ ^outQout + S - R
by the well alxed aaauaptlon, Cout - C and the equation can be
rewritten as
VdC/dt • CjqQiu " CQggt ~ 8 - R
where V is the voluae of the rooa, Cjn la the pollutant
concentration entering the rooa, Qjn 1s the air flow entering the
rooa, Q0ut is the air	leaving the rooa, S is the source tern,
and R is the removal tera.
For a two rooa aodel with air entering Rooa 1 from Rooa 2 and the
outdoors and with air entering Rooa 2 froa Rooa 1 and the
outdoora, we have the following aet of equations:
Rooa 1
VjdCj/dt * Q2-1C2 + ^o^o-l ~	" **lQl-0 + Sj - Rj
Rooa 2
V2dC2/dt • Qx-2^x ~ QqCq-2 " ^2^2-1 " C2Q2-O + ®2 " ^2
With the air aaas balances:
Qo-1 + 92-1 ~ Ql-0 ~ Ql-2 " 0 an<*
Qo-2 * Ql-2 ~ Q2-0 " Q2-1 " 0
where Cj and C2 are the concentrations in Rooaa 1 and 2,
respectively, Q1-2 is the air flow froa Rooa 1 to Rooa 2, Q1-0 is
the air flow froa Rooa 1 to the outdoors, Q0-1 i» the air flow
froa the* outdoors to Rooa 1, Q0-2 it the air flow froa the outdoors
to Rooa 2, Q2-1 the air flow froa Rooa 2 to Rooa 1, and Q2-0
is the air flow froa Rooa 2 to the outdoors.
The systea of equations oan ba extended to any nuaber of rooaa.
An HVAC systea can be added by treating the BVAC as a rooa. (All
the eontlnulty equations that hold for the Individual rooaa also
aust hold for the HVAC..) Because a wide range of pollutant
concentrations can enter the HVAC systea froa various points, the
well alxed aodel eight not fit the HVAC systea as well as it does
individual rooaa. If the pollutant concantrationa entering the
HVAC systea froa various rooaa are very different, it aight be
appropriate to aodel tha HVAC aa a nuaber of saall rooas.
7

-------
Numerical Techniques
The various aass balances discussed above lead to a set of linear
differential equations. These equations can be solved with
¦any different techniques. The best known is a fourth order
Runge Kutta technique. Press et al. (1987) present a midpoint
¦ethod as an alternative to Runge Kutta. Both techniques were
prograaaed and the aldpolnt aethod was faster. Therefore, the
aldpolnt aethod was used in the final version of the prograa.
The reader interested in the details of the aldpolnt aethod
should consult Press et al.
The aldpolnt technique stability and accuracy are equivalent to
those of the Runge Kutta technique. This aeans that the aldpolnt
aethod will be stable and accurate, if the tlae step Is saall
enough. The stability and accuracy of the aethod in the context
of the Indoor air aodel were investigated over a wide range of
situations. The results of aodel runs were coapared with results
froa analytical calculations, other indoor air aodels, and aodel
runs with differing step sizes. The conclusions reached froa
these studies are:
1. When the rooi voluaes are of about the saae size, large
tlae steps (froa 30 to 120 seconds) can be used with little
difficulty (unless the source and sink teras exhibit short tera
tlae behavior).
2.	When the rooa voluaes differ by orders of aagnitude, as
is possible when an HVAC systea is included in the aodel, saall
tlae steps (20 to 30 seconds or less) are needed to avoid
nuaerical instabilities.
3.	When the aodel solutions were stable, the solutions were
also accurate.
A tlae step of 30 seconds works well in aost situations. If the
tlae step is too large, the solution becoaes unstable. The
prograa aonitors the solution to detect the onset of nuaerical
instability. When instability is detected, the prograa stops all
calculations and prints a warning aessage with Instructions to
reduce the tlae step. The prograa provides a suggested value
for the new tlae step. Note, however, that the prograa aay crash
in spite of the error checking provided by the prograa.
Teras
A wide range of source teras is necessary to aodel Indoor
sources of pollution. Possible source characteristics include
randoa on/off sources (cigarettes), sources that are on for a
specified period of tlae (heaters), steady state sources (aoth
crystals), and sources with high initial ealsslon rates followed
by low steady state (floor wax). The AEERL aodel accoaaodates
all of these possibilities in an idealized fashion.
8

-------
Each type of source behavior is represented by a type of source.
For example, the randoa on/off source is represented by cigarette
smoking. Each of the sources in the model is discussed below.
Cigarette smoking
Cigarette smoking is modeled as a randoa event with from 1 to n
cigarettes smoked per hour. The cigarette is turned on at some
randoa time during the hour. A second cigarette is not allowed
on until the first cigarette is smoked. Multiple smokers are
accommodated in the model. However, all smokers smoke at the
same time. Personal observations indicated that this is a
reasonable assumption about the habits of multiple smokers. If
one person starts smoking, other smokers tend to light up too.
A simple randoa number generator la used to determine if a
cigarette is on or off. Because of the randoa nature of this
source, it is possible to have more or fewer cigarettes smoked in
a specific hour than specified.
The emission factors for cigarette are based on data in the
Indoor Air Data Base and are shown In Table 2-2.
Table 2-2. Emission factors for smoking
Kerosene heaters
Kerosene heaters are a common source of Indoor air pollution.
These heaters are modeled as steady state on/off heaters. The
on and off times are part of the data input to the program. Up
to three on/off cycles per day are allowed.
The emission factors for kerosene heaters are based on work
conducted by AEERL and are shown in Table 2-3.
Table 2-3. Emission factors for keroeene heaters
Pollutant
Emissions ag/cjgfffttf
Particulate
CO
C02
24
10.33
38.49
Pollutant
Particulate
Emissions pg/kJ
Mai.	£o
-------
Unvented ffas heaters
Unvented gas heaters are another common on/off source of indoor
air poliution. These heaters are modeled like kerosene heaters.
The emission factors for unvented heaters are based on data from
the Indoor Air Data Base and are shown in Table 2-4.
Table 2-4. Emission	factors for unvented gas heaters
Pollutant	Emission factor ug/kJ
Particulate	0.20
CO	1-10
C02	51,000
N0X	15
VOC	No data
Moth crystals
Moth crystals can be an important source of VOC emissions
indoors. Moth crystals are long term steady state sources. TJie
emissions from moth crystals are a function of temperature and
the surface area of the crystals.
The emission factors are based on work conducted by AEERL and
equal 1.4 mg/h/cm of exposed surface.
Floor wax
Floor wax is an example of a "wet" source of VOC emissions.
Wet sources initally have a high emission factor, followed
by a low level steady state emission factor.
The emission factor for floor wax is based on data in Tichenor et
al. (198?) as shown in Figure 2-2. The curves in Figure 2-2 can
be approximated by equations of the form:
emission - al + a21n(t) + a31n(t)
where al, a2, and a3 are constants.
Other
The other source is provided as a user defined steady state
source. The source cannot be turned off.
Sinks
It is generally recognized that walls and furnishings can serve
as collectors (sinks) of indoor air pollutants. The model allows
investigation of the behavior of sinks by providing a single sink
that is a function of the surface area of the walls in the room.
This sink may be either a pure sink (i.e., pollutants trapped by
the sink are not reemitted) or a reemitting sink.
10

-------
For a pure sink, the amount of material per unit time removed by
the sink, Rs. is
R3 " K3ini1/2
where Dyis the diffusivity of the gas. The term
2(D/it) is the sink constant, Ksink'
T|e diffusivities of most gases in air range from 0.02 to 0.04
m /h. For a pure sink that has a capture efficiency of Ks ink
ranges from 0.16 to 0.25 m/h. This is in fair agreement with the
sink constant required to fit the limited experimental data on sink
effects.
The Air Handling System
Informal discussions with professionals in the design of
ventilating systems for commercial and residential buildings and
measurements in the AEERL test house indicate that the air flow
generated by an air handling system is several tines larger than
natural air flows. Thus when an HVAC system is on/the building
air flows are dominated by the HVAC.
11

-------
Air flow patterns in a building with the air handling system on
¦ay be significantly different from those in the same building
with the air handling system off. For example, many houses have a
s.ingle return vent for the air handling system. When the air
handling system is on, air flow is dominated by the flow to the
return vent. When the air handling system is off, air flow is
less directed.
The on/off behavior of the air handling system is modeled by
allowing two different air flow patterns to exist in the
building. One pattern (Case 1) is active when the air handling
system is on, and the other (Case 2) is active when the air
handling system is off. The model switches between these two
patterns depending on the state of the air handling system. The
state of the air handling system (on or off) is determined by a
random number generator designed to ensure that the air handling
system is on for a specified fraction of each hour. The air
handling system may switch from on to off and back several times
in an hour.
The function that switches the HVAC on or off is designed to
ensure that the HVAC state (on or off) does not change from on to
off or vice versa in rapid sucession. After the state of the
HVAC changes, it stays at the new state for a set number of time
steps in the model. This forcing the HVAC to remain at one state
for a set time reduces the random nature of switching.
This random switching from on to off and back appears to provide
good modeling of actual air handling system behavior.
The two air flow patterns provided by the model can be used for
changes in air flow due to causes other than HVAC on or off. For
example, Case 1 might be used to describe the air flow pattern
with a door open and Case 2' to describe the air flow pattern wlt.h
the same door closed.
Programming the Model
The model is written in Microsoft QuickBasic 4.0 for the IBM-PC
and compatible family of microcomputers. This language is
similar to the interpreted Basic that comes with most MS-DOS
computers. However, it has many features not present In the
interpreted version of the model. The language is mostly
compatible with TurboBasic from Borland International.
The main features of the language which are different from the
interpreted version are:
block if/then/else statements
numerous looping structures
select case
multiple line user defined functions
subroutines that are isolated from the program
local and global variables
line numbers are not required
programs can be larger than 64 k-bytes
12

-------
All of these features of the language are used in the program.
Note that the program on the disk is a compiled program and does
not require QuickBasic to run. QuickBasic is required to modify
the model.
User interface
The user interface is the portion of the program that most
tightly ties the program to the IBM-PC standard. The user
interface uses BIOS call and writes directly to the screen to
provide acceptable speed. A translation of the program to run on
another computer would have to include a rewrite of the user
interface to adapt it to the new computer.
Error handling
The program recognizes disk file I/O errors and allows you to
recover from them without crashing the program. If you attempt
to read a file that does not exist, the program will inform you
that the file does not exist and ask you to reenter the file
name. Most other disk I/O errors are trapped by returning you to
one of the program menus.
Mathematical errors are not trapped in the current version of the
program. The program is written to check for and avoid many
common mathematical errors such as divide by 0, and log of 0 or a
negative number. However, on occasion a mathematical error
may occur and cause the system to crash. In most cases the
QuickBasic error handler will return you to DOS.
13

-------
iaooo
1000
200

0.1
0.02
i. i i i i
0.1
20
TIm 
-------
SECTION 3.
USER GUIDE
Get tine Started
The first step in using the model is to read the README.DOC file
on the distribution disk. You can do this by typing README from
the DOS prompt. The README.DOC file will tell you how to install
the program on a hard disk and how to configure the program for
your computer.
Note that, if you have a hard disk, the installation program
creates a subdirectory called INDOOR. The program and all
necessary files are stored in the INDOOR subdirectory.
Once you have installed the program, you can run it by:
a)	If you are running from a floppy disk:
1.	Establishing the disk drive with the indoor air program as
the active disk drive. (For example if the program disk is in
disk drive A, typing A: from the DOS prompt.)
2.	Typing INDOOR to load the program.
b)	If you are running from a hard disk:
1.	Establishing the root directory as the activf subdirectory
by typing cd\ (use uppper or lower case; it doesn't matter).
2.	Typing INDOOR to load the program.
Once the program is loaded, you control program flow by selecting
options from the various menus of the program. Each menu and
data entry form is discussed below.
XHe User Interface
The AEERL model provides an easy-to-use Interface between the user
and the computer. The user interface allows the user to change
the input parameters quickly and easily, and rapid analysis of
the calculated results.
In a menu-driven interface, you control the flow of the program by
selecting options fro* a menu. The menu options may transfer
control to a data entry form, to a sub-menu (indicated by
trailing ... on the main menu), or to a program execution portion
of the program.
Program operation is controlled by the master menu shown in
Figure 3-1. The active menu option is indicated by a highlight
bar (shown as fg in the figure). The highlight bar is moved up
and down the menu by the cursor control keys. When the highlight
bar is over the option you wish to execute, press  to
transfer control to the selected option. You may also transfer
control by pressing the letter in <>. Each master control option
is discussed below.
15

-------
| Indoor Air Modal Control Menu
j:un indoor air mod*!
efine source strengths
onf1gure systea
uit
Figure 3-1. Master control menu.
The first menu option is Run indoor air model. This option
transfers control to the indoor air model. It is the most used
option in the master menu.
The second option is Define source strengths. This option is
used to define sources used as defaults for the model
calculations. Note that the default source strengths used in
this option can be overwritten during data entry for the model.
The third option is Configure system. This option is used to
tell the program what hardware you are using to run the program.
Normally you need to run this option only once.
Define source strengths menus and forms
When Define source strengths is selected, program control is
passed to the Define source strengths portion of the model. This
portion of the model allows you to enter new default emission
factors for a wide range of sources.
Program control in this portion of the model is governed by the
Select Source menu shown in Figure 3-2.
Salact Source Menu
]|1garatte
eroaene haater
nvantad stova
oth crystals
ax
<0>ther
uit
Use arrow keys to nova cursor. Press ENTER to execute. ESC to return.
Figure 3-2. Select source menu.
16

-------
The sources shown in Figure 3-2 are those currently supported by
the model. When you select a source from the menu, you are
transferred to an emission factor data entry form such as shown
in Figure 3-3.
Emission factors are entered for each of the pollutants shown.
Note that some sources do not emit all pollutants. For example,
moth crystals are sources of VOCs but not particulate. In these
cases the appropriate emission factor is 0.
17

-------
ft-heater
3333333*33333333333333333331
Pollutant
S33333SS8SS3333S33S3S3SSS33S3333SSSSSS33S3S3333:
[particulate
CO
C02
NOX
VOC
::SSSSSSS3SS33ZS3Z:
Value
i333333333333333333333S33333
24
30
5000
54900
20
Figure 3-3. Source strength data entry form.
Indoor air model menus and forms
When Run indoor air model is selected from the master menu,
control is passed to the main indoor air model menu. This menu
controls the operation of the indoor air model and is shown in
Figure 3-4.
Main control awnu
jjnttr data.
"a1culat»
<0>utput ...

lot ... at up uit Lisa arrow keys to nova cursor. Prtss ENTER to axacuta. ESC to raturn. Figure 3-4. Main menu for indoor air model The first item on the main menu is Enter data. This option transfers control to the data entry menu. The data entry menu shown in Figure 3-S. 18


-------
r
i
Data «ntry
jppacify 

o11utant Otflnt <8>u11d1ng Define VAC Define <0>utdoors Define ooas cora data on disk et data from disk u1t Figure 3-5. Data entry aenu. The first option is Specify Pollutant. This option allows you to specify the pollutant that is being modeled. When you press P, you are transferred to the pollutant aenu shown In Figure 3-6. Salact Pollutant Avallabia pollutants 1 Particulate 2 CO 3 COS 4 Nfflt 5 VOC S Radon Press nunbar corresponding to the pollutant you wish to use Figure 3-6. Pollutant aenu. The six pollutants listed are soae of the aost coaaon indoor air pollutants. Source data for each pollutant, except radon, are provided in the default data files. The next option is Define Building. When you select this option, the data entry form shown in Figure 3-7 is loaded. 19


-------
1
! Building definition
[33SSSSSZSSSSSSSSS
I tat	Valut
33SSSS333S333SS3S3SSS333SSS3S3333833SS83S333S3S33S3833S3333333333333333333
jfluabtr of rooms max 3 10	7
Total ventilation rat# air changes/h 0
Figure 3-7. Building definition form.
This form is used to enter the number of rooms in the building
and the total ventilation rate.
The total ventilation rate is the air exchange between the entire
building and the outdoors. The normal units are air changes per
hour. The computer evehly distributes the air flow you specify
here between rooms based on the volume of the rooms. You can
modify this air flow distribution later if you desire.
The HVAC option is used to enter data related to the air
or HVAC system. When this option is selected control is
to the HVAC menu shown in Figure 3-8.
handling
passed
20

-------
Menu for HVAC
ji«5>anaral description
" Oafins ir cleanar
Dafina ourcas
Oaflnt rooa low»
uit
Us# arrow keys to nova cursor. Prass ENTER to txscuta. ESC to return.
Figure 3-8. HVAC Menu.
General Description is used to enter general information about
the HVAC system. When this option is selected, control is passed
to the General Description data entry form, Figure 3-9.
I		i	i
HVAC
jjQparatinq flow air changas/h	0
'% Makeup air	0
Fraction of tin# on (0-1)	1
VoIum	'•!
Figure 3-9. General description for* for HVAC.
Operating flow air changes/h Is the recirculating air flow for
the HVAC system. Normal values are between 4 and 7.
* Makeup air is the amount of outdoors air entering the HVAC
system. This amount of air replaces a like amount of building
air.
21

-------
Fraction of time on is a fraction used to indicate the fraction
of the time that the HVAC system is on. In a commercial
building this is normally 1. In a residence this is some
fraction less than 1. Fraction of time on determines how often
the HVAC system is on.
Volume is the volume of the HVAC system.
The model allows the HVAC to contain an air cleaner. The air
cleaner performance is specified by selecting the Define Air
Cleaner option from the HVAC menu. The air cleaner data entry
form is shown in Figure 3-10. The current version of the model
assumes that the air cleaner performance can be described by a
single efficiency. Later versions of the model will relax this
cons traint.
Air cleaner
Operating efficiency \
Figure 3-10. Air cleaner data entry form.
The model allows the HVAC to include a source of pollution. Vou
specify the source by selecting the Define Sources option from
the HVAC menu. The present version of the model restricts the
HVAC pollution sources to those shown in Figure 3-11.
Define source in HVAC
Select type of source
1.	Constant rate = 20 mg/h
2.	0 if cone >5 mg/m3, 30 if cone <5 mg/m3
3.	No source
Press key corresponding to your selection.
Figure 3-11. HVAC source data entry.
22

-------
The air flows between the various rooms and the HVAC system can
be specified either by filling in the form for the HVAC system,
or by filling in a form for each room. The HVAC flow form is
selected by selecting the Define Room Flows option from the HVAC
menu. When this option is selected, control is passed to the
HVAC room flow data entry form. Figure 3-12. Note that flows may
be specified for two cases: in Case 1, the HVAC is on as
determined by the fraction of time on; and in Case 2. the HVAC is
off as determined by the fraction ot time off. The flows entered
here can be adjusted when air flows for individual rooms are
specified.
Normally the two air flow cases will be used to describe flows
when the HVAC in on or off. In this case the flows for Case 2
(HVAC off) will be zero. gThe example shows a four room house
with HVAC providingglOO m /h to each room. The HVAC return is in
Room 4 and is 400 m /h. The Case 2 flows are all zero.
The two air flow patterns can also be used to simulate other
situations where the air flow patterns could be changed
periodically; e.g., opening and closing a door between
rooms .
Enter data for air entering and	leaving poo# 0 «3/h
Case 1	Case 2	Case 1 Case 2
Room number Air entering from Air exiting to
¦3/h	u3/h
•;1 100	0	0 9
'2 100	0	0 0
3 100	0	0 0
i 100	0	400 0
Figure 3-12. HVAC air flow data entry form.
The most complicated menu option is Define Room. This option is
used to define the size, sources, sinks, and air flows in
individual rooms. When this option is selected, control is
passed to the room definition screen. This screen is a Lotus
type screen shown in Figure 3-13.
23

-------
jjrooflijiufnber definition sources sinks interconnections done
>.
3
4
!	[Status of Rooa !]—
ISuilding vol !S0 «3 Ci
I Vol. 150 s3 Wall 77 n2
J Sources selected
: k-heater
3.0 nq/n3
sink 0
.[Interconnections]-
Roont Air out to
Air in froa
	[Air flows ]	
Air flows Case 1 Case I
Air from HVAC 3.0 0.0
Air to HVAC	3.0 0.0
Air from outdoors 150.0 0.0
Air to outdoors 150.0 0.0
—(Air balances]	
Case 1
j Air entering 150.0
¦ Air leaving 150.0
! Balance	0.0
Case 2
0.0
0.0
0.3
Pollutant being modeled Particulate
' Figure 3-13. Rooa definition screen.
This figure shows the overall room definition screen. The
options available from this screen are:
Select room number
Define room size and initial concentration (definition)
Define sources
Define sinks
Define interconnections with outdoors. HVAC, and other rooms.
The various options are selected by moving the highlight bar
across the top of the screen using the left and right arrow keys.
When the highlight bar is over an option, all the choices
available under that option are displayed. For example, the
highlight bar is over room number in Figure 3-13 and the
available room numbers are displayed. Choices are selected by
moving the highlight bar up and down with the up and down arrow
keys. When the highlight bar is over the desired choice, press
EN'TER to activate the desired option.
For example to work with Room 1. move the highlight bar over 1
and press ENTER. To define the volume and initial concentration
of Room 1, move the highlight bar to definition. The screen
display is changed to Figure 3-14.
24

-------
*oon_"iumoer ijdefinitian sources sinks interconnections done
volume
initia: canc
.."Status of Soon '1
[Air flows 1
ISuilding vol 150 m2 Ci 0.3 ing/m3
1 Vol. ISO *3 Wall 77 n2 sink 0
! . , ,
: Sources selected:
! k-heater
Air	7,-gin n»«v.	u. u	y. 'J
Air	to HVAC	0.0	0.0
Air	from outdoors	150.0	0.0
Air	to outdoors	150.0	0.0
l—1
l $rv
—{Interconnect 1ons]	
Room# Air out to Air in fro#
[Air balances]	
Case 1 Case 2
Air entering 150.0 0.0
Air leaving 150.0 0.0
Balance	0.0 0.0
2ollutant being node lad Particulate
Figure 3-14. Room screen showing definition options.
Room volume is selected by moving the highlight bar down to
volume and pressing ENTER. The screen changes to Figure 3-15.
Note that a data entry window containing the room size form opens
in the middle right portion of the screen. This data entry form
operates the same as every other data entry from in the program.
Move up and down the form by pressing the up and down arrows.
When all the data are entered, press ESC to return to the room
definition form.
If a volume for the room is entered, the program assumes that the
room is square with 2.44 m high walls.
25

-------
-oon number definition sources sinks interconnections done
volume
I	(Status of Room 1]-
|Building vol 240 f»2 Ci
vol. 150 n3 Hall 77 m2
Sources selected:
Cigs
0.0 isg/ffl3
sink 1
r
[Interconnections]-.
Room# Air out to
2	30.0 0.0
	[Air flows )-
|Define rooa size
jlength m
'width ib
Height m
Volume m3
Air in from
30.0 0.0
7.84062S
7.840625
2.44
ISO
Air entering
Air leaving
Balance
105.0
105.0
0.0
75.0
75.0
0.0
Figure 3-15. Room screen ready to define size of room.
The initial pollutant concentration in a room can be specified by
selecting the initial cone option and pressing ENTER. This gives
Figure 3-16. Note that the initial concentration data entry form
now appears in the data entry window after Ci .
room_number definition sources sinks interconnections done
initial cone
		[Status of Room 1]-
I	'	J
'Building vol 240 m2 Ci
1 vol. 150 I»3 Wall 77 ®2
! Sources selected:
Cigs
	1	[Air flows ]-
0.0 mgj.[Def1ne initial cone]
sink 1 ^Initial concentration
it
—(Interconnectlons]-
Room# Air out to
2	30.0 0.3
Air in from
30.0 0.0
,-[Air balances]	
Case 1 Case 2
Air entering 105.0 75.0
Air leaving 105.0 75.0
Balance	0.0 0.0
Figure 3-16. Room screen ready to define initial concentration
26

-------
The next set of options is select sources
sources is shown in Figure 3-17.
The screen for select
coon number
definition
j-sources
Ci as
K-heater
Unvanted stove
Moth crystals
Wax
Other
sinKs
interconnections
done
	[Status of Room 1]		
8uild1ng vol 210 i»2 Ci 0.0 mg/«3
vol. 150 0)3 Mall 77 m2 sink 1
Sources selected:
—11 n t erconnect i ons ]-
Room Air out to
2	30.0 0.0
	[Air fIons ]	
Air flows Case 1 Case 2
Air from HVAC 0.0 0.0
Air to HVAC 0.0 0.0
Air froa outdoors 75.0 75.0
Air to outdoors 75.0 75.0
Air in from
30.0 0.0
—[Air balances].
Case 1	Case 2
Air entering 105.0	75.0
Air leaving 105.0	75.0
Balance 0.0	0.0
Pollutant being modeled Particulate
Figure 3-17. Room screen showing source options.
When a source is selected, the data entry form for that source
is displayed in the data entry window. Data entry screens for
all sources are shown in Figures 3-18 through 3-23.
27

-------
.-oomnuabar definition sources sinks interconnections done
Cigs
.(Status of Rood 1]			(Air flows ]
Building vol 240 n2 Ci 0.0 ag
{[Define cig source strength] 	
vol. 150 n3 Mall 77 m2 sink 1
Single cig ng
24
Sources selected:
No. dgs/h
2
Cigs
No. smokers
1

Start tine
0
|
Stop tine
3
—(Interconnections]


Rooal Air out to Air in froa


2 30.0 0.0 30.0 0.	2
A1r entering 105.0	75.0
Air leaving 105.0	75.0
j 8a lance 0.0	0.0
I	'
i
Figure 3-18. Room screen showing cigarette	data entry.
roo«_nuaber definition sources sinks interconnections	done
K-heater
! (Status of Room 1]-
IBuilding vol 2(0 »2 CI
vol. 150 n3 Wall 77 n2
Sources selected:
Cigs
0.0
sink 1
		(Air flows ]	
A—Define k-heater source strength
(Interconnections]-
Roonl Air out to
2	30.0 0.0
Air in fron
30.0 C
ffng/kJ
'Size of heater
fine on 24 h
Time off 24 h
2nd tine on
2nd tine off
3rd tine on
3rd time off
kJ/h
| Balance	0.0 0.0
Figure 3-19. Room screen showing kerosene heater data entry.
(The text "Balance 0.0 O.O" shown above and similar text in
later figures is from the main screen that is overlayed by the
data entry window.)
28

-------
^aom number definition sources sinks interconnections done
Jnventeti stove
		[Status of Room 1]	
.Building vol 240 m2 Ci 0.0
1 vol. !50 ,n3 Hall 77 «2 sink 1
! Sources selected:
.{Air flow ]-
I
[Interconnect ions ]-
Room# Air out to
2	30.0 0.0
Air in fro#
30.0 0
ip-Oefine stove source strength
{Sug/kJ	0
'Size heater kJ/h	0
Tine on 24 hr	0
Time off 24 hr	0
2nd time on	0
2nd time off	0
3rd tine on	0
3rd time off	0
3alance
0.0
2
J 0
0
0.0
Figure 3-20. Room screen showing unvented stove data entry
room^number definition sources sinks interconnections done
Moth crystals
	[Status of Soon !]-
Building vol 240 n2 Ci
vol. 150 oi3 Wall 7T m2
Sources selected:
-[Air flows ]«
sink
j	i	uwa j	j
0.0 mg^flefine moth crystal source strength-.
; 1 -Source factor nq/cn2/h 0
lAree of crystal	0	!
—[ 1nterconnect ions j-
ftoom# Air out to
2	30.0 0.0
Air in from
30.0 0.0
r£Air balances]	
Case 1 Case 2
Air entering 105.0 75.0
A1r leaving 105.0 75.0
Balance	0.0 0.0
Figure 3-21. Room screen showing moth crystal data entry.
29

-------
,-oora_numoer definition sources sinks interconnections done
Wax
, (Status of Room 1]—
[Building vol 240 m2 Ci
| vol. ISO a3 Wall 77 a2 sink 1
, Sources selected:
.[Air flows ]-
0.0 ng
-Define floor mx source strength	
[Interconnections]-
Rooatf Air out to
2	30.0 0.0
[Init strength
«2 of area
Init time
2nd constant
3rd constant
4th constant
100000
61.47541
0.5
11.6
42!
0.S7
Air in froe
30.0 0.0
r[Air balances]	
Case 1 Case 2
Air entering 105.0 75.0
Air leaving 105.0 75.0
Balance	0.0 0.0
Figure 3-22. Floor wax data entry screen.
rooa number definition sources sinks interconnections done
, [Status of Roor 1]—
! Sui Tdinq vol 240 nt2 Ci
j vol. 150 n3 Wall 77 n2
' Sources selected:
Other
		—.—[Air flows ]—
0.0 Define other source].
sink 1 jfSourct strength nig/h 0
f
i
[Interconnections]-
Room# Air out to
2	30.0 0.0
Air in fron
30.0 O.O
P-[Air balances]	
Case 1 Case 2
Air entering 105.0 75.0
Air leaving 105.0 75.0
Balance	O.Q 0.0
Figure 3-23. Room screen showing other source data entry
30

-------
The next option is the sink description option, shown in Figure
3-24 .
-oom_numDer definition sources sinks -interconnections done
Mils
	(Status of Room 1]—
^Bldg vol 200 m2 Ci
1 vol. 50 m3 Mall 44 m2
i
! Sources selected |
, Moth crystals
.—.[Interconnections],
j RoomS Air out to
2 210.0 3.0
r
.[Air flows ]-
0.0 mg/»r[ Define sink tern]
sink 0.
Air in from
10.0 0.
Rate to sink
Reemission factor
Reemission cone
Air leaving
Balance
264.3
0.0
<
_< _
2
3
54.3
0.0
Figure 3-24. Room screen showing sink data entry.
Data for the sink are entered using the form shown in Figure 3-
24. A sink is described by three terns — the rate to the sink,
the concentration at which reemission begins, and a reemission
constant. There are few data on sinks, and reasonable values of
the sink terms are difficult to estimate. Limited experimental
data from the EPA test house indicate that the rate to the sink
for many volatile organic compounds (VOCs) is between 0.16 and
0.35 m/h. Reasonable values.for the reemission concentrations
are between 30 and 1000 ug/m And reasonable values of the sink
reemission factor are between 5 and 50. The rate to the sink and
the sink reemission factor have units of concentration per hour
per unit area.
31

-------
The final option is the interconnections option. This option is
used to define the air flows entering and leaving the room. The
interconnections screen is shown in Figure 3-25.
room_nu«iber definition sources sinks ^interconnections
' HVAC :
HVAC 2
Outdoors 1
Outdoors 2
Other rooms
done
I	[Status of Rooa 1]	
!Building vol 240 i2 Ci 0.0 mg/«3
' vol. 150 m3 Mall 77 n2 sink 1
Sources selected:
Cigs
	[Air flows ]	
Air flows Case 1 Case 2
Air from HVAC 0.0 0.0
Air to HVAC 0.0 0.0
Air from outdoors 75.0 75.0
Air to outdoors 75.0 75.0
—[Interconnections]-
Room! Air out to
2	30.0 3.0
Air in from
30.0 0.0
"balances].
r-[Air
Case 1	Case 2
Air entering 105.0	75.0
Air leaving 105.0	75.0
8a lance 0.0	0.0
Pollutant being modeled Particulate
Figure 3-25. Room screen showing interconnections option.
The interconnections options HVAC 1, HVAC 2, Outdoors l. and
Outdoors 2 transfer control to a data entry form in the data entry
window. The screens for these options are shown in Figures 3-26
through 3-28.
room number
definition
sources sinks interconnections done
HVAC 1
I	[Status of Rooa !]-
Building vol 2t0 m2 Ci
vol. 150 i»3 Wall 77 n2
! Sources selected:
| Cigs
.[Air flows ]-
sink
jjAir entering from HVAC 0
"Air leaving to HVAC 0
I
[Interconnections].
Room# Air out to
2	30.0 0.0
Air in f
30.0 0.0
I Case 1	Case 2
Air entering 105.0	75.0
Air leaving 105.0	75.0
Balance 0.0	9.0
Figure 3-26. Room screen showing HVAC flow data entry.
32

-------
*oom numoer definition sources sinks interconnections done
Outdoors I
I	^'Status of Room Ij—
|Building vol 240 in2 Ci
vol. 150 m3 Wall 77 n2
Sources selected:
Ciqs
.{Air flows
sink jiAir fron outdoors 75
A1r leaving to outdoors 75
—[ Interconnections]-
Room# Air out to
2	30.0 0.0
Air in f
30.0 0.0
Case 1	Case 2
Air entering 105.0	75.0
Air leaving 105.0	75.0
Balance 0.0	0.0
Figure 3-27. Room screen showing outdoor flow data entry.
The data entry form for defining the flows between rooms is a
full screen data entry form as shown in Figure 3-28.
Enter data for air entering and	leaving room !	i#3/h
HVAC on	HVAC off	HVAC	on HVAC off
Room number Air entering fro«	Air exiting to
n3/h	m3/h
:j2 30	0	30	0
"!3 0	0	0	0
i 3	0	0	0
Figure 3-28. Room flow data entry form.
Note that the room definition screen shows all the flows and the
air flow balance. The air flow balance should be zero after all
air flows are defined.
When all data have been entered, the program can be run by
prnssing R for Run Program from the main menu. As soon as thr>
Run Program instruction is given, the program does a limited
chock of the consistency of the data you entered. If an
inconsistency is found, an error message is presented and you are
asked if you want to continue or reenter data. The most common
data inconsistency is that the overall ventilation rate specified
in thn define building form is different from the overall
33

-------
ventilation rate calculated by summing all the individual room
ventilation rates. In this case the computer asks if you want to
use the sum of the individual rooms as the ventilation rate. The
proper response is generally Y.
In general, respond to the error message by pressing Y, except
when the error message indicates that the flows do not balance.
In this case reenter the data.
While the program is running, a simple bar chart of pollutant
concentrations in each room is shown. If a source is on in the
room, the concentrations are displayed as +. If there is no
source on in the room, concentrations are shown as	The
cumulative emissions, cumulative amount leaving building,
cumulative amount in the sink, and the amount currently in the
building are also displayed. These allow you to check for
conservation of mass. (Note, however, that if the outdoor
concentration is greater than zero, you cannot check for
conservation.) The calculations can be stopped at any time by
pressing the ESC key.
When all calculations have been completed, program control is '
returned to the main menu.
The program provides several output options. These are selected
by pressing 0 on the main menu. When output is selected, program
control is passed to the output options menu, Figure 3-29.
Output options
:j<0>isp1ay results on CRT
"rite results to file

rint results <0>u1t 'Jse arrow keys to move cursor. Press ENTER to execute. ESC to return. Figure 3-29. Output options menu. The first output option is Display results on CRT. If you select this option, all the calculated results will be displayed on the CRT, a screen at a time. Advance the display by pressing aav key. Return to the output menu at any time, by pressing ESC. 34


-------
The second output option is Write results to file. If you select
this option, you will be asked for a file name. Enter any legal
DOS file name with less than six characters and without an
extension. The program will use this file name to create a
family of files for the calculated results. A file is created
for each room. The files all have the extension DAT.
The file name is created by adding: the room number and the
extension .DAT to the file name you supplied. The HVAC is filed
as Room 0. For example, if you have a four room model plus HVAC.
the program will create the following files:
TEST0.DAT	for the HVAC system
TEST1.DAT	for Room 1
TEST2.DAT	for Room 2
TEST3.DAT	for Room 3
TEST4.DAT	for Room 4.
The data are written to the file as time concentration pairs.
Data from the files can be recalled from the plot results menu
for comparison with other calculations. The data can also be
recalled for plotting by a plotting package.
The output of the calculations can be printed on a line
printer by selecting Print results.
The most generally useful display of results is provided by a
graph of the results. Graphs of the results can be obtained by
selecting Plot from the main menu. Figure 3-4. When Plot is
selected, control is passed to the Plot menu shown in Figure 3-
30 .
Plot options
[plot esu1ts
Plot electad rooms
Plot 

revious run u1t Figure 3-30. Plot menu. The first plotting option is Plot Results. This option plots all the results of the current calculation. If the program is configured for an EGA card and monitor, all the rooms are plotted at once. The curve for each room is shown as a different color. If the program is configured for a CGA, the rooms are plotted one room at a time. However, all rooms are plotted on the same plot. Graphics are not available for monochrome monitors. Plot Selected rooms allows you to plot one or more rooms. If you select this option, you will be asked for a list of the rooms you 35


-------
want plotted. Terminate the list with the word 'end. ' The
advantage of this option is that the graph will be scaled for the
results of the room or rooms of interest.
Plot Previous run allows you to recall and plot results from
previous calculations. This option allows you to compare results
from a number of calculations. When you select this option you
are asked for a file name where the previous results are stored.
You are then asked which room you want to plot the recalled data
as. When you respond to this question, the recalled data replace
the data for the indicated room.
For exaaple, when investigating the impact of ventilation on
pollution concentrations, you are only interested in Room 1 of a
four room building. Calculation 1 was stored as TESTA,
calculation 2 as TESTB, and calculation 3 as TESTC. Calculation
4 has been completed but not stored. You now wish to compare the
effects of the various ventilation rates on the pollution
concentrations in Room 1.
Select Plot Previous results. Tell the computer you wish to
recall TESTA1 (remember that the computer creates the data files
by adding the room number to your file name) and you want to plot
the data as Room 2. Now recall file TESTB1 and plot it as Room
3. Finally recall TESTC1 and plot it as Room 4.
Press ESC to return to the plot menu. Now press R to plot
results. The screen will clear and a plot showing the results
for all four runs will be displayed. The concentration in Room ]
for Run 1 (TESTA1) will be displayed as Room 2, Run 2 as Room 3.
Run 3 as Room 4, and the current run as Room 1.
Note that the time scale for all plots is based on the current:
calculation. If you recall data with a different time scale, the
plot may look strange. Therefore, ensure that all calculations
for a given situation cover the same time range. Use Set up to
make sure.
The last menu option is Set up, which transfers control to a
data entry form shown in Figure 3-31. The purpose of Set up is
to modify various items that control the execution of the
program. Each of these items is discussed below.
36

-------
! Set up defaults
sssa
Iteir	Value
S3S«33aSSS3SS3SSSSSS3SSSSS«3S«SSSZ8S3SS«:SS333«SSSSS8S«S:SSSSSSS
jSeltat	30
"Print step	SO
Maxroons	10
Maxsourcss	6
Maxtines	740
Maxdays	1
Hours for simulation	24
Figure 3-31. Set up data entry.
Deltat — Deltat is the tine step in seconds for the finite
difference solutions. Too large a value of Deltat will result in
numerical instability. A value of 30 is a good starting point.
The program will warn you to decrease Deltat if numerical
instability is detected.
Print step—Print step is the number of Deltat steps between
printouts. The program works by storing variables for later
printout. Computer memory limits the number of steps that can
be printed. The default means that after every 50 Deltat steps,
the calculated values will be saved for later printout. If you
are looking at short time simulations, say a few hours, set print
step to 5 or 10.
Maxrooms--Maxrooms is the maximum number of rooms allowed. You
may have to reduce this depending on how much user available
memory you have,
Maxsources--Maxsources is the maximum number of sources allowed
in Bach room.
Maxtimes--Maxtimes is the dimension of the array that holds the
calculated results for later printout. A value of 740 works on a
machine with 640K RAM and no memory resident programs. You may
have to reduce this if you have less RAM or memory resident
programs.
Maxdays--Maxdays is the maximum numbers of days for the
simulation.
Hours for simu1 ation--This is the number of hours for the
simulation when Maxdays = 1; e.g., if the simulation is to cover
4 hours, Maxdays ¦ 1 and Hours for simulation « 4. If
Maxdays > 1. then Hours for simulation * 24.
37

-------
Examples
The best way to learn to use the model is to run several
examples. The first example will lead you through most of the
screens and the screens will be displayed. Later examples will
present the input data and graphical output.
Example l--single chamber study
To determine if the numerical procedures of the model were
working properly, model predictions were compared to data from a
single chamber study of kerosene heater NO emissions. The data
for the example are:
Number of rooms 1
Room volume	27 m
Air exchange rate 0.39 ACH
Air flow to ambient 10.53
Air flow from ambient 10.53 m /h
Source strength	7830 kJ/h
Source on at time 0
Source off at time 1 hour
The data entry procedure for this example is:
From the DOS prompt, type INDOOR and pres9 ENTER.
The screen will clear and the master menu of Figure 3-32 will be
d i s piayed.
Indoor Air Model Control Menu
un indoor air nodal
|:<0>«fin« sourc# strengths
"onfigur« system
<0>uit
Figure 3-32. Master menu for example 1.
Press D to define the source strength. The screen will clear .icwi
Figure 3-33 will be displayed.
38

-------
I Select Source Menu
jKCMgarette
"erosene heater
nvented stove
<#>oth crystals
ax
<0>ther
uit
Use arrow keys to move cursor. Press ENTER to execute. ESC to return.
Figure 3-33. Define source menu for example 1.
Select kerosene heater by pressing K. The data entry form in
Figure 3-34 will be displayed.
T
K-heater
mg/kJ
SS333383333S333SSS3335S3333338333333333338338333:333333*33833333S333S233S33
Pollutant	Value
3SS:SS33S23SS3SSSSSSSSS:33S8SSS«8:»3S3ISS3S8S39nnSS8S»3l«SSSSSSSSSS3SS
'particulate	0
"cc	0
C02	0
HOX	0
VQC	0
Figure 3-34. Source strength data entry for example 1.
Use the down arrow key to move the highlight bar to NOX, type
0.0237, and press ENTER. Now press ESC to return to the main
source definition menu. Press Q to quit and return to the master
menu .
39

-------
Once back to the master menu, press R to run the indoor air
model. The screen will clear and display the main control menu
of Figure 3-35.
Main control ocnu
Unter data...
2*
alculat«
<0>utput ...

lot ... «tup uit Figure 3-35. Main control menu for example 1. Press E to enter data and to display data input menu Figure 3-36. 1 Data Input 1 {[Specify

o11utant Otf-fna <8>uild1ng 0«f1n« V*C Otflna <0>utdoors Oaf 1ns oon tore data on disk et data fron disk u1t Figure 3-36. Data input menu for example 1. Press P to specify the pollutant and to get the menu shown in Figure 3-37. Press 4 for NOX. The program will return you to the data input control menu. 40


-------
Select Pollutant
Available pollutants
!	Particulate
2	CO
3	C02
i	NOX
5	VOC
S	Radon
Press number corresponding to the pollutant you wish to use
Figure 3-37. Select pollutant menu for example 1.
When you are back to the data entry control menu, press B (for
define building) to display the building form, Figure 3-38. Use
the cursor control keys to move the highlight bar over Number of
rooms max. Type 1 and press ENTER. Use the down arrow key to
move to total ventilation rate. Type 0.39 and press ENTER.
Press ESC to return to the data entry control menu.
I
| 8uilding definition
333533333333333333333333333333333333333333333333
Value
S3333SS333333S3333333S3S3S3S3S3S3S3333333335S3S3
jJlumber of rooms max * 10	7
Total ventilation rate air changes/h 0
i
Figure 3-38. Building definition menu for example 1.
When you are back to the data entry control menu, press R to
define the room and display the room definition screen, Figure 3-
39 .
Use the left and right arrow keys to move the highlight bar to
definition; then use the down arrow key to move the highlight, bur-
over volume. Press ENTER. The form for entering data on the
room volume will be displayed on the screen, see Figure 3-40.
Use the down arrow key to move the highlight bar to Volume and
type 27. Press ENTER. Now press ESC to return to the? main room
f orm .
4 1

-------
jroon number definition sources sinks interconnections done
	[Status of Room 1]	
'Building vol 27 it2 Ci 0.0 «g/is3
! vol. 27 m3 Wall 32 m2 sink 0
I Sources selected :
i k-heater
l
—[Interconnections]-
Room! Air out to
	[Air flows ]	
Air flows Case 1 Case 2
Air fro* HVAC 0.0 0.0
Air to HVAC 0.0 0.0
Air from outdoors 10.5 10.S
Air to outdoors 10.5 10.5
Air in froe
—(Air balances]	
Case 1 Case 2
Air entering 10.5 10.5
Air leaving 10.5 10.5
Balance	0.0 0.0
'ollutant being modeled NOX
Figure 3-39. Room definition screen for example 1
~oom_mjmber definition sources sinks interconnections dene
volume
r
-[Status of Rood 1]-
!8uilding vol 27 m2 Ci 0.0 mg/raS
vol. 27 a3 Wall 32 m2 sink 0
Sources selected :
k-heater
—[Interconnections]-
Room« Air out to
Air in fron
M
-[Air flow ]-
ine rooa size
{length n
"Vidth ni
Height n
Volume m3
3.326496
3.326496
2.44
27
Air entering
Air leaving
Balance
10.5
10.5
0.0
10.5
10.5
0.0
Figure 3-40, Room volume screen for example l.
Use the left and right arrow keys to move the highlight bar over
sources. Use the down arrow key to move the highlight bar to k-
heater and thnn press ENTER. The source definition form will bo
displayed as shown in Figure 3-41.
42

-------
roon_number definition sources sinks interconnections done
K-heater
,	[Status of Room 1]—
I
'Building vol 27 n2 Ci
vol. 27 n3 Mall 32 n2 sink 0
Sources selected :
k-heater
.[Air flows ]-
0.0 a—Define K-heater source strength
[Interconnections]-
RoomK Air out to
Air in fro#
jimg/kj
Size of heater
Tine on 24 hr
Time off 24 hr
2nd tint on
2nd time off
3rd tine on
3rd tine off
kJ/h
.0237
0
0
1
0
0
0
0
Balance	0.0 0.0
Figure 3-41. Define kerosene heater screen for example 1.
Use the up and down arrow keys to move the highlight bar over
Size of heater kJ/h, type in 7830, and press ENTER. Use the
down arrow key to move the highlight bar to Time on, type 0. and
press ENTER. Use the down arrow key to move the highlight bar to
Time off, type 1, and press ENTER. Review the data you entered.
If you made an error, use the up and down arrow keys to move the
highlight bar to the data item that is in error. Type in the
correct value. When all the data are correct, press ESC to
return to the room definition form.
Use the left and right arrow keys to move the highlight bar over
Interconnections. Then use the down arrow key to move the
highlight bar over Outdoors 1 and press ENTER. This will display
the interconnection with the outdoors data form, Figure 3-42.
43

-------
room.number definition sources sinks interconnections done
Outdoors 1
I	[Status of Rooa 1]	
jBuilding vol 27 n2 Ci 0
j vol. 27 «3 Wall 32 «2 sink
Air fro* outdoors 10.S3
jiAir leaving to outdoors 10.53
[Air flows ]
! Sources selected :
k-heater
—[ 1nterconnections]	
Rooal Air out to Air in f
Case 1 Case 2
Air entering 10.5' 10.S
Air leaving 10.5 10.5
8alance	0.0 0.9
Figure 3-42. Air flow to outdoors for example 1.
Note that the air flows to and from the outdoors have been
calculated by the program based on the air exchange rate
specified in the building definition. If the air from the
outdoors is not 10.53, use the down arrow key to place the
highlight bar over Air from outdoors, type 10.53, and press ENTER.
Do the same for air leaving. Press ESC to return to the main
room definition form.
Ensure that the balance for the air flows is zero. If it is not.
you have made an error in the interconnections data entry and
should reenter the data.
Ensure that all the room data are correct. Either press ESC or
move the highlight bar to done and press ENTER to return to the
data entry control menu. Press ESC to return to the main menu.
44

-------
Press S for setup and get the setup form, Figure 3-43, on the
screen.
Setup defaults
333S33S33S83S33333S3SSSS33333333S333S3S3S3333S3SSSS833333SS333S33333333
Item	Value
3333333333333S333333333S3333333333333S333333333333333S333333333333S3HS
jDeltat
30
"Print step
2
Naxrooms
10
Maxsourcss
6
Waxtimes
740
Maxdays
1
Hours fop simulation
2
Figure 3-43. Setup form for example 1.
Use the cursor key to move the highlight bar over Maxdays and
then enter 1. Then move the highlight bar to Hours for
simulation and enter 2. This sets up the program to calculate the
concentrations for 2 hours. Press ESC to return to the main menu.
(Change the other numbers to agree with those shown in the figure
If necessary.)
Now press C to calculate the results of the model run.
While the model is calculating, a simple bar graph of pollution
is shown. This graph is intended to give a general Indication
of the relative pollution concentrations in the various rooms.
It is not an exact indication of the pollution levels in the
rooms. Note that the cumulative emissions and cumulative mass
leaving the building are also printed.
When the model has completed its calculations, the main menu is
displayed. Press P to obtain the plot menu, shown in Figure 3-
44. Press R to plot the results. A screen dump of the plot is
shown in Figure 3-45. Note that the concentrations are plotted
on a log scale.
45

-------
Plot options
jjplot esults
""Plot elected rooms
Plot 

revious run <0>uit Figure 3-44. Plot aenu for example 1. The results of the calculations are compared with the experimental results of Traynor, et al.(1983) in Figure 3-46. (Note that the plot in Figure 3-46 is linear-linear and the plot in Figure 3-45 is semi-log.) The agreement with the experimental data is quite good. This result indicates that the model Is operating correctly in a numerical sense. 46


-------
c
o
ri
c
ID
9
/
n3
10
0.1
0.01
0.001
Plot for NOX
0 0.2 0.4 0.6
0.8 1.0 1.2 1.4
Tine Hr
Press any key
Figure 3-45. Screen dunp of plot from example 1.
47

-------
__ Modal predictions
0 Oct a -From Traynar at al. (1983)
Tl ma (hr)
Figure 3-46. Comparison of model calculations with Traynor, et a 1.
48

-------
Example 2--raultiple chamber study
This example is for a multiple room situation and is taken from
Axley (1987). The rooms in the building are connected by the
HVAC system. The HVAC system is a small volume system.
Air flows are shown in Figure 3-48. The source is located in
Room 1 and has a source strength of 550,000 mg C02/h. The
source is operated for 130 minutes and then turned off. We want
to model 4 hours.
Step by step instructions are given for this example. However,
the data entry screens are not shown.
Prom the DOS prompt, type indoor to get the master menu. Since
the source term is not in normal units, do not use the Define
source strengths option. Press R to run the indoor air model and
get the main indoor model menu.
Press E to enter data. Specify the pollutant as CO2 • Press S to
get the setup menu. Because the HVAC system is a very small
volume system, a small time step is needed to ensure numerical
stability. Enter 5 for Deltat and enter 30 for print step.
Enter 1 for Maxdays and 4 for Hours for simulation. Press ESC to
return to the data entry control menu.
Press B to define the building. Enter 4 for number of rooms.
Enter 0 for ventilation rate. The ventilation rates will be
defined for individual rooms when room data are entered. Press
ESC to return to the data entry control menu.
Press H to get the HVAC menu (Figure 3-47). Press G to define
the general HVAC system. Enter 1 for fraction of time on. Enter
1.1 for volume and 0 for makeup air.
1	1
|
Menu for HVAC
jjeneral description
Oefine ir cleaning
Define ources
Oefine room lows
uit
'Jf "ow keys to move cursor. Press ENTER to execute. ESC to return.
Figure 3-47. HVAC Menu for example 2.
Press F to enter room flows. The room flow data entry form is
shown in Figure 3-49. Fill in the form as shown in Figure 3-49.
Press ESC when done to return to the HVAC menu. Press ESC to
return to the data entry control menu.
49

-------
20 m/h
20 m/h
70 m/h.
30 m3
ia&iiliiltiiiiil
J
70 m/h
40 m
4
70 m/h

-»70
m3/h

30
m3

4


70
m/h

40
m3

2

ne
F
SfiM
J 70
m3/h
HVAC system 1. lm3
20 m3/h
20 m /h
Figure 3-48. Building for exaaple 2*
50

-------
Enter data for air entering and leaving room 0 n3/h
HVAC on HVAC off HVAC on HVAC off
Room number	Air entiring froa Air exiting to
i
m	o o 70 o
0
0
0

¦3/h

¦3/h
1?
0
0
70
"2
3
0
70
3
70
0
0
4
70
0
0
Figure 3-49. HVAC data entry form for example 2.
Press R to define the rooms.
3
Select Room 1 and enter the volume (40 m ). Now enter the source
data for Room 1. Select K-heater and enter 5S0.000 as the source
strength. Enter 1 for the size of heater. Enter 0 for time on
and 2.167 for time off. Press ESC.
Now move highlight bar to interconnections. Use down arrow key
tg move highlight bar to Outdoors 1 and press ENTER. Enter 20
m /h for both air entering and air leaving. Press ESC.
Move highlight bar to other roaas and press ENTER. Use arrow
keys to move to air to Room 4 and enter 70 as air out. Press ESC
when done.
Check to see that the balance of air flows is zero.
Repeat data entry for the remaining rooms.
Run the program.
A plot of the model predictions and a comparison with the results
of Axley (1987) are shown in Figure 3-50. Note that the model
predictions agree with the calculations of Axley. This is
further indication that the numerical procedures in the model arc
working properly.
51

-------
11000
9000
\
01
7000
6000
5000
4000
Lines are EPA nodal
Ax ley (1987)
u
Numbers
1000
2.5
3.5
0.5
Time 
-------
SECTION 4.
CASE STUDIES
This section presents a series of case studies demonstrating tlie
use of the model. The case studies are based on real indoor air
situations and data. The results of these studies show that the
model predictions are close to measured data even where very
little is known about room-to - room flows.
Case Study 1. Particulate Loading in an Office Bui 1 ding
The model was used to estimate particulate loading due to smoking
in an office building. The building floor plan in shown in
Figure 4-1. The roons with smokers are marked with an S. The
ventilation design for the building is based on 10% makeup air
in the HVAC system and no additional outdoors air infiltration.
Each room is supplied with HVAC air. The HVAC return vents are
located in the hall. The areas in the figure marked as not
included are not served by the HVAC that serves the rest of the
building. Therefore, these areas are not included in the
modeling study.
Because there are more rooms in the building than are allowed in
the model, some grouping of rooms is required. The grouping was
based on:
1.	The hall i3 a separate room because It contains the only
return.
2.	Adjacent rooms with smokers would be grouped.
3.	Adjacent rooms without smokers would be grouped.
The result of the grouping is that the building was modeled as
3even rooms with an HVAC system. Cigarette smoking was assumed
to be the only source of pollution.
Data used in the model are shown in Table 4-1.
Table 4-1. Model input for case study 1
No. Rooms 7 No. Smokers 9 Makeup air 10*
Air cleaner efficiency
Room £	Voluae m~ No. Smokers
1 (201,202)
84
0
2 (203-205)
126
3
3 (all others)
100S
0
4 ( 2 1.1 .213)
84
2
5 (217 )
42
2
6 (234,235)
84
2
7 (hall)


Total

9
53

-------
^ r *
— »


2C'i S

C?r;4
w ^
2C3 si

J i n
^f.7
_ ^ i

W ^ w
209

210



\ • \ S


*** m £
. " \ m

i." .' ¦' • ?!v
• • i..
/' '
a
^
^ 1 c
~, 7ss
¦n7
a
2iz
2! S
a
?2C

a
^ «n
v * v
/ v —
a
224
^
y




OT18S


:"
nd^Urf.
229

230
- " 1


^

CpZA
+* Lm — *T
P - - s

^ •*
/ • rs
Hollwoy tc ancthsr
building sscticn
Hallway to another
building section
S Smoker
~ Return
Q Area not included
Figure 4-1. Building layout for case study 1.
54

-------
Predictions of particulate concentrations in each room for a full
day were desired. Cigarette smoking the the only source of
particulate matter. Because the model does not allow repeated on
and off smoking necessary to model the lunch hour, cigarette
smoking was simulated by the unvented stove source type. This
source type can be turned on and off three times a day and is
thus adequate to simulate the lunch hour effects. The model
predictions for design HVAC flows are shown in Figure 4-2.
Case Study 2. Random Cigarette Sources
The same building that was used for Case 1 was modeled with the
random cigarette source for the first 4 hours. As can be seen
from the results in Figure 4-3, the in-rooa peaks are very high
when cigarettes are modeled as a short duration source.
The model predictions were used to estimate in-room average
concentrations. These predicted time-averaged concentrations are
compared to experimental data in Figure 4-4. The agreement
between experiment and predictions is reasonable.
Both the predictions and the data show that particulate matter
generated in a few offices is spread throughout the building.
The particulate concentrations in all rooms exceed the proposed
ambient^air quality standard for respirable particulate matter of
50 pg/m .
Case Study 3. Effect of 13* Efficient Filter
The same building used above was used to estimate the effect: of
the 13* efficient filter on particulate loading in the building.
As shown from the results in Figure 4-5, the filter had a
significant impact on particulate concentrations.
The impact of the filter on particulate loading is due to the
high circulation rate (12 ACH) through the filter.
3
Case Study 4. Filtering for £ £0 ug/m
Estimate the filter efficiency necessary to ensure that the
particulate loading in all the rooms of the building is less than
50 ug/m (the proposed PM-10 standard) (The comparision with
the proposed PM-10 standard is reasonable because the particles
from smoking are all less than 10 mm in diameter.)
Solve this by running the program for filter efficiencies of 13.
50, 75, and 100*. Plot the particle concentration vs. efficiency
and pick the required efficiency from the curve. Sen Figure 4-6.
Note that even with 100* filtration the rooms with smokers can-
not be brought below 50 pg/nf even with the low assumed smoking
rate of one cigarette per hour.
55

-------
3
Case Studv 5. No Room Exceeding SO ug/in
Determine a methojj of allowing smoking in Case 4 with no room
exceeding 50 ng/m of particulate.
The Case 4 calculations showed that even 100% filtration
efficiency in the central duct would not allow 50 iig/m in the
smoking rooms with the assumed fresh air makeup rate and the
assumed air circulation rate. The loading in the smoking rooms
could be reduced either by increasing the infiltration of outdoors
air into the smoking rooms or by increasing the air circulation
into and out of the smoking rooms. Model runs shown in Figure 4-
7 show that a combination of 25% air infiltration and a doubling
of the air circulation for the smoking rooms is necessary to
achieve an average particulate concentration of 50 iig/m
The peak concentrations in the smoking rooms greatly exceed the
proposed PM-10 standard even under these conditions, Figure 4-8.
A higher smoking rate would also result in particulate
concentrations in excess of the proposed PM-10 standard.
56

-------
20C
s~\
E
D
U
ai
D
C
O
•H
~
L
+J
C
Ql
U
C
a
u
150+ / ~-
100
Tima (hr)
Flguro 4 2. Model calculations for case study 1

-------
350
300
250
200
150
100
50
0
0
<— Room 2
<- Room 3
0	0.5	1.0	1.5	2.0	2.5	3.0
Tima (hr)
Figure 4-3. Particle concent rat ions for cigarette smoking.

-------
s
?
w
8
*>
o
b
S
u
s
u
a
o
**
h
a.
Prodietad
Mooturad
Room No.
Figure 4-4. Conparialon of predicted and aeasured results.
59

-------
I	1 Efficiency * QZ
Efflolmjr " 13Z
Pigure 4-5. Effect of 13* efficient filter.
60

-------
E2 as
Ej ion
L
H^N>
1
Figure 4-6. Effect of air cleaner efficiency
61

-------
180
180
140
120
100
40
20
0
101 Infiltration
2SX infiltration
IZZ3

1
1
Figure 4-7. Results fro« case study 5.
62

-------
500
450
400
350
300
250
200
250
100
50
0
0
Room 7
Room 4
2. 5
3.5
3.0
2. 0
0
0. 5
Time (l»r)
FiKiir
-------
Case Study 6. Analysis o f Radon Entry Via Soil Gas
Radon is an important indoor air pollutant that generally enters
the indoor environment via soil gas. The source of radon is th«
radioactive decay of radium. The radon gas is mixed with air in
the soil. This air/radon mixture enters the building due to
pressure driven flow. This case models the radon/soil gas
situation for the simple building shown in Figure 4-9. Note that
the radon decay is not modeled. (Future versions of the model
will include the decay process.)
2nd floor 3
Vol -100 ¦
1st floor
Vol - 100 m
Basement
Vol - 100 m
Figure 4-9. Building for case study 6.
3
Tjje flows are 50 m /h between the first and second floors gnd 30
¦ /h between the first floor and the basement. Air at 50 m /h
is exchanged with the outdoors for the first and second floors.
The soil gas entry problem can be modeled by adding an additional
room that contains the radium source and a high radon gas
concentration. The final sketch of the model building is shown
in Figure 4-10.
64

-------
2nd floor
Vol »100 m
1st floor
Vol =» 100
m3
Basement
Vol - 100
»3
Soil room
Vol » 10,000
m3
Basement to
outdoors and outdoors
to basement 0
Basement to
first floor
40
First floor
to basement
30
First floor
to outdoors
50
Outdoors to
first floor
50
First floor
to second floor
60
Second floor
to first floor
50
Second floor
to outdoors
60
Outdoors to
second floor
50
Figure 4-10. Pinal version of model building for case study fi.
The initial concentration of radon in the sgil room is 80,000
pC/L. The soil gas room air flows are 10 m /h of air entering
from the outdoors and 10 m /h entering the basement. The rest
of the air flows in the building are now:
ml/h
ml/h
¦r/h
»:/h
¦ ,/fc
m /h
m / h
The initial concentration in all rooas in the building is 0 pC/L.
The model predictions for this situation are shown in Figure 4-
11 .
Case Study 7. Radon Driven by Building Depressur1zation
In many situations the radon gas flow into the building is driven
by periods of depressurization of the building. This situation
can be modeled by using the HVAC on/HVAC off flows provided by
the model. For HVAC on (Case 1 flows) the flows in Case 6 are
used. For HVAC off (Case 2 flows) the flows below are used:
3
Soil room to basement	0 »,>/h
Basement to soil room	0 "-/h
Basement to and from outdoors	0 m./h
Basement to first floor	30 m»/h
First floor to basement	30 m_/h
First floor to and from outdoors 50 m./h
First floor to second floor	50 ®-/h
Second floor to first floor	50 ®-/h
Second floor to and from outdoors 50 m /h
65

-------
The fraction of time on for thg HVAC system is 0.1. Thus for 103>
of the time in each hour, 10 m / h of soil gas enters the
building.
The results of the modeling are shown in Figure 4-12.
Note that the modeling in Cases 6 and 7 for radon ignores the
radioactive decay of radon. Also note that the results and
techniques shown in these two examples can be used for pollutants
other than radon, such as pesticides, that enter a building via
soil gas.
66

-------
30000
27000 --
<— Baeemarrt
24000 --
\ 21000--
a-
^ 18000--
15000--
12000 --
9000 --
6000 --
<— Firet floor
<- Second floor
3000 --
0
2
4
6
0
10
12
14
Time (hr)
I' i j;ti r s: » I I
Ca i c n I a i <;
-------

CO
/N
E
D
(J
X
en
E
C
O
•r-»
+J
~
L
C
(V
o
c
o
(_>
700-r
BOO--
500-•

400 -¦
300 - ¦
200-
1 i in; 1 : I -i" )
f 4 \ z < | rii I .i I erf ri-unlta I n, man 7

-------
SECTION 5.
APPLICATION OF MODEL TO IAQ TEST HOUSE
Introduction
This section describes case studies demonstrating the use of the
modei in an IAQ study. The case studies also demonstrate the use;
of small chamber emission factors in the model for predicting IAQ
pollutant concentrations. The .model is applied to fairly
straightforward situations and to a situation where there is a
reemitting sink. These data sets provide a good test of
the model.
An objective of the indoor air program is to develop emission
factors from snail chamber studies that can be applied to full
scale buildings. As part of this effort, AEERL is conducting
small chamber and test house studies. One of the sources studied
is moth crystals, the first source where AEERL emission factors
and test house data are available.
Sua 11 Chamber Data
The emission factors for moth crystals were developed using 166 L
test chambers. The basic components of the system, shown
schematically in Figure 5-1, include the following sub-systems:
clean air conditioning and delivery, Environmental Test Chambers
(two at 166 L each), sampling manifolds, a sample concentration
system using either Tenax or charcoal, and a permeation system
for quality control standard addition. The environmental
variables are monitored and controlled by a microcomputer (IBM
PC) based system. Organic analyses are conducted by thermal
desorption from Tenax traps to the concentrator column of a purge-
and-trap device, followed by rapid thermal desorption to the
column of a gas chromatagraph equipped with a flame ionization
detector.
The p-dichlorobenzene emissions from the moth crystals were
measured in the test chamber. The experimental techniques are
described by Nelms et al.(1987). The emission factor developed
by Nelms et al. for the conditions in the test house is 1.4
mg/cra /h.
Test House
AEERL has rented a three bedroom ranch style house to serve as a
test house for IAQ studies. The floor plan of the test house is
shown in Figure 5-2.
Blower door and SF6 tracer experiments were conducted to
determine the air infiltration rates for the test house. Those
experiments established an infiltration rate of 0.35 ACH for the
house under the conditions of the moth crystal studies.
69

-------
For the moth crystal experiments, five cakes of moth crystais were
placed in the closet in the corner bedroom. The moth crystals
were laid on the shelves which reduced the gurface area for
emission by about 50* (from 980 to 570 cm ). The air
conditioning system operated continuously for the entire
exper intent.
Concentrations of p-dichlorobenzene were measured in the closet,
in the corner bed room, in the master bedroom, and in the den.
The p-dichlorobenzene measurements were made by direct injection
into the GC. The neasureaents were made once a day for 4 days.
The first measurement was made 3 days after the moth crystals
were placed in the closet.
The results of the 4 days measurements are shown in Table 5-1.
3
Table 5-1. Results of p-dich1orobenzene measurements, mg/m
Dav/Room
Closet
Corner Bedroom
Master Bedroom
Den
1
107
4.72
3 .49
3 . 84
2
53 . 6
4.41
3 . 50
3 . 30
3
70 . 9
5.51
4 . 18
3 . 80
4
63 . 0
5.61
4 . 27
4 . 02
Average
73 . 6
5 .06
3 . 86
3 . 74
Standard




deviation
27.5%
10*
9 . 2%
7,1
70

-------
SORBENT
SORBENT
GAS
CHROM.
TEST
CHAMBER
CLEAN
AIR
SYSTEM
Figure 5-1
Saa11 chambers used for aoth crystal studies

-------
E
OJ
i
E
m
T
E
tJ-
3. 8m
Master bedroom

CU
Clc
12. 8ra-
Master
bath
Bath
6. 4m-
j—f
^ Clo.
Utll
Clom I 
-------
Modeling
Several model calculations were run with a range of assumptions
about flow from the closet and the effects of sinks. The model
calculations were stopped after several hours of simulated time
because steady state was reached. The model calculations are
compared with the average measured concentrations in each room.
The measurements are arbitrarily plotted at some time after
3teady state is reached. Each of the model runs is discussed
below.
The input data for the first model run are shown in Table 5-2.
Table 5-2. Input data for initial moth crystal analysis
2
Source strength 1.4 mg/cn /h from Nelms et al.(1987)
Air exchange with outdoors 0.35 ACH (SF6 data^
Air exchange between closet and bedroom 0.5 m /h (assumed)
Air circulation to air handling system 7 ACH (rule of thumb)
All air flow to air handling system is from hallway.
Air exchange with outdoors is evenly divided between rooms.
Air handling system air is evenly distributed between rooms.
No sink effeet.
The results of this run are shown in Figure 5-3. Note that the
agreement between the model and the measured data is poor for the
closet but reasonable for the other rooms. The model predictions
for the closet are a factor of 20 too high and are a factor of 2
too high for the other rooms. The model also predicts too large
a spread between the concentrations in the corner bedroom and
those in the rest of the house.
The fact that the model predictions are all too high suggests
that a sink is present. A run was made with the same data input
as shown in Table 5-2 except that the sink factor was 1 m/h
with no reemissions. This result is shown in Figure 5-4. Tho
predicted and measured values of closet concentrations are in
good agreement, but the other rooms are only 3 to 4% of the
measured concentrations. Although there is certainly a sink for
the p-dich1 orobenzene. it is not the major cause of the
relatively low p-dichlorobenzene concentration in the closet.
The in-closet concentrations can be reduced by allowing more air-
flow between the closet and the bedroom. Since the concentration
in the closet needs to be reduced by over an order of magnitude,
a good starting place is to increase the flow between the closet
and the bedroom from 0.5 to 4 m /h. The model predictions for
this situation (no sink) are shown in Figure 5-5. Note that,
although the agreement between predictions and measurements is
quite good, the model overprcdicts the concentrations. Possible
reasons for the overprediction are underestimation of air
infiltration from outdoors and the presence of a sink.
73

-------
10000
0 Closet , ,
* Corner bedroom
U Master bedroom
+ Dan
1000--
<- ClosQt
07
100-
Cornar bedroom
10- -
//<- Dan & master badroom
I'
46
0
24
72
96
Timo (hr)
Figure 5-3. Initial ¦odel results

-------
100
10--
1.0--
0. 1-
<- Closet
*
•*1-
,Corner bedroom
<- Don & master bedroom
0 Closet
*	Corner bedroom
#	Master bedroom
+ Den
0. 01 -f—i » » * < | i » « * > |—•—i—i—* » |—§—i—i >
24
46
72
96
T i me (hr)
Figure 5-4. Node] results wJth a large sink

-------
1000
0)
3
o
\
D1
E
V/
C
o
•H
•P
o
L
•P
C
o
o
c
o
L)
100-
<- Closet
Corner bedroom
I
v.
10+
'/
|<- Den & master bedroom
*
0 Closet
*	Corner bedroom
#	Master bedroom
~	Oen
0. 1
0
H
24
48
72
H	H
96
T i me (hr>
Figure 5 5. Mode] results with 4»3/h flow fro« closet.

-------
The SFg data indicate that the air infiltration is on the order
of 0.35 ACH: thus, there is no reason to expect a major
underestimation of air infiltration. The data for p-
dich1 orobenzene concentration after the moth crystals are removed
clearly show that p-dichlorobenzene is being emitted. The most
likely source of the emissions is a sink that has become a
source.
The model was rerun with a sink rate of 0.35 m/h and no
reemissions. (This results in the sinks' collecting about 50% of
the total emissions.) The results of this run are shown in
Figure 5-6. The agreement between the model and the data is
quite good. Note, however, that the model underpredicts the p-
dichlorobenzene concentrations in the den and master bedroom.
The probable reason for this underprediction is that some of the
closet air flow is directly exchanged with the hallway before it
is mixed with the bedroom air. The floor plan for the house
shows that the closet is next to the door to the hallway. Thus
it is reasonable to assume that some of the air from the closet
is exchanged directly with the hallway. As noted later the CO2
data also support this conclusion.
The final model run, which includes a sink and flow between the
closet and the hallway, i3 shown in Figure 5-7. Note that the
agreement between model and data is excellent. A summary
comparision of model predictions and measured data is shown in
Table 5-3.
Table 5-3	Summary comparison of model	predictions and measured
data
Ratio	of predicted to	measured concentration
Case	Closet	Corner Bedroom Master Bedroom Den
1	23	2.35	2.8	2.2
2	1.1	0.048	0.025	0.027
3	3	1.8	2.2	2.2
4	0.998	0.89	0.97	0.93
(a) Measured concentration is average of all measurements:
Case 1: Low flow from closet, no sink.
Case 2: Low3flow from closet and large sink.
Case 3: 5 m /h flow from closet, no sink.
Case 4: Measured flows and moderate sink.
Conclusions from Mode ling
The experimental data and the model predictions show that, the
small chamber emission factors for p-dichlorobenzene can be used
with the model to estimate p-dichlorobenzene concentrations in a
building. Even if the sink term is neglected, the agreement
between predictions and experimental data is reasonable. The
inclusion of the sink term brings the agreement within 15*^.
77

-------
1000
-I
00
E
D
U
\
ID
E
C
0
•H
-p
o
L
+»
C
Q»
O
C
o
u
100
10--
1. 0
D. 1
Q
<— Closet.
ner bedroom...
-!/
<- Master bedroom & den
0 Closet
*	Corner bedroom
#	Master bedroom
+ Den
0
12
24
36
48
60
72
84
96
TiniQ (hr)
Figure 5-6. ModeJ results with Moderate sink.

-------
100
-8-
<- Closet
to
E
3
CI
\
m
e
c
o
tI
¦p
O
L
4*
c
o
a
c
a
CJ
Corner bedroom
l
<- Den & mo«t«r bedroom
1.0
0.1-

0 Closet
*	Corner bedroom
0 Master bedroom
~	Den
0.01
24
46
72
96
T1me (hr)
Figure 5-7. Final nodel results with Measured flows

-------
The model calculations indicate that there is a large (4 to 3
m /h ) air flow between the closet and the rest of the house.
The air flow from the closet is divided between Che corner
bedroom, the hallway, and the master bedroom. This flow is
higher than originally estimated.
COg Experiments
COg was injected into the closet to serve as a non-reactive
tracer for calculating air flow from the closet. The COg data
have a much finer time resolution than do the p-dichlorobenzene
data. Thus it is possible to compare model calculations with
measurements for short time periods. The COg is easier to model
because there is no need for a sink term.
The decay of COg from the closet and the rest of the house was
modeled. The experimental data are shown in Figure 5-8.
The model input was the same as that used for the moth crystal
final run. The model predictions are compared with the
experimental data in Pigure 5-9. Note that the model predicts
the initial decay rate for all rooms quite well. However, the
steady state value predicted by the model is much lower than that
measured.
The reason for the model's failure to predict the steady state
value is that two sources of COg were not included in the
model input: the pilot lights for both the gas furnace and the
gas hot water heater.
Fo 11ow-up Experiments
Experiments were conducted to better define the air flows in the
test house and to determine the reasonableness of the values used
in the model. During these experiments the air handling system
flows were measured. Flow visualization studies to determine thu
nature of the in-room and room-to-room mixing were conducted with
neutral density balloons and with neutral density helium bubbles.
The air handling system measured flows are shown in Table 5-4,
along with estimates used in the model. Note that the measured
flows are close to those used in the model except for the front
bedroom. The vents in the front bedroom were closed, accounting
for the difference between measured and estimated flow.
80

-------
3000
E
CL
Q.
C
o
•H
-P
O
(_
¦P
C
a
o
c
o
(J
(\J
a
(_»
2500 - -
+
+
~ Closet
0 Connor bedroom
+
2000 - -
++
1500 --
+
o +
tDQ
Q
%
1000"
x

500
' >G 0
+ + A0+ ? ?+ 0 A0 J 0
H	1	1	1	1	1	1	1—i i	1—T • I—T M—T+ I
6
8
10
12
Time (hr)
Figure 5-8. C02 test data for ABBRL IAQ teat houae.

-------
3000
Closet.
0 Corner bedroom
» Master bedroom
2000 --
¦ 9.8 o
1000 --
O
0
0
Time (hr)
Figure 5-9. Conparlson of «odei predJctJons and Measured CO2
da ta

-------
Table 5-4. Air handling system air flows in test house
Room
Measured ^
Air flow m /h
Air flow m— ih
Estimate^

Middle bedroom
Corner bedroom
Master bedroom
Den
679
38
278
280
900
210
210
210
The balloon and bubble experiments showed that, even with the air
handling system on, considerable mixing existed between room(5.
These experiments also indicated that there was a substantial air
flow into and out of the closet. Finally the visualization
studies indicated that there was flow between the closet and the
hallway and between the closet and the master bedroom.
Hot-wire anemometer measurements of the air flow velocities
through the cracks in the closet door showed tha£ the air flow
into and out of the closet was between 4 and 9 ra /h. This is in
excellent agreement with the air flows required by the model.
A final model run was conducted to determine the estimated p-
dichlorobenzene concentrations in each room. The results of this
run are shown in Table 5-3. The agreement between predictions
and measurements Improves slightly. However, because the rule of
thumb estimates and the actual air handling system flows are
quite close, there is no dramatic change in the model
predictions.
Addlt ional Mode ling
An additional model run was made to determine the impact of the
moth crystals on inhouse p-dichlorobcnzene concentrations with
normal (on/off) air handler system operation and to evaluate
methods for reducing the in-house p-dich1orobenzene
concentrat i ons.
Normal Air Handler Operation
In a normal house the air handling system is on only part of the
time. Thus the experimental data and model runs above are for an
abnormal condition. The model can be used to estimate the p-
dichlorobenze concentrations under normal operating conditions.
These runs were based on the assumption that the air flows with
the air handler on were the same as discussed above. When the
air handler was off, however, it was assumed that there was no
air exchange between the closet and the house. Air handler oft"
interroom air flows wgrc assumed to be 70 m /h between the
and the hall and 30 m /h between the hall and other rooms. The
results of this model run are shown in Figure 5-10. (Recent
experiments in the test house with the air handler off indicate
that there is significant flow from the closet even with the door
closed .
83

-------
1000
100
Closet
D
O
10 —
Corner bedroom
07
uJj Master bedroom
Den
0. 01 -
0. 001
20
4
8
12
16
24
0
Time (hr)
Figure 5-10. Predicted p-dichiorobenzene concentration with
normal air handler operation.

-------
The in-closet p-dichlorobenzene concentration increased slightly
and the p-dichlorobenzene concentrations in the rest of the house
dropped slightly. However, there were no major changes in the
distribution of p-dichlorobenzene throughout the house.
Model Analysis of Mitigation Strategies
The model can be used to estimate the effectiveness of various
strategies for reducing the p-dichlorobenzene concentrations in
the house. The most obvious strategy is to remove the moth
crystals. However, for this analysis it is assumed that the Both
crystals must be used. It is also assumed that the p-
dichlorQbenzene concentration in the closet must' not drop below
25 mg/m	Finally it is assumed that the maximug allowable
concentration in the rest of the house is 0.5 mg/m All runs
will be for normal air handling system operation; i.e., air
handler on 10% of the time.
The options analyzed are:
1.	Reduce the source strength (i.e.. use fewer moth crystals).
2.	Seal the closet more effectively.
3.	A combination of 1 and 2.
If the moth crystals are used at about 20* of the manufacturer's
recommendation, the in-closet concentration can be maintained at
the assumed value. However, as shown in Figure 5-11, the bedroom
and den concentrations all exceed 0*. 5 mg/m .
The analysis of closet sealing assumes that the closet flow can
b<| reduced to zero when the air handling system is off and to 0.1
m /h when the air handling system is on. The amount of moth
crystal used is based on the manufacturer's recommendation. The
results are shown in Figure 5-12.3 In this case the in-house
concentrations are below 0.5 mg/m ^ Note that the den
concentrations were below 0.1 mg/m and are not shown in Figure
5- 12 .
The analysis of option 3 is shown in Figure 5-13. In this case^
the in-house concentrations are slightly greater than 0.01 mg/m
and the in-closet concentrations are above 25 mg/m .
In an actual situation the closet is opened periodically and then
closed. This situation can be simulated by assuming that the
closet is open about 1 minute an hour. During this minut§ the
air flow into and out of the closet is assumed to be 18 iu/h,
The results of this simulation are shown in Figure 5-14.
Conclusions
The p-dichlorobenzene experiments show that emission factors from
small chambers can be used with the model to provide useful
estimates of the pollution concentrations found in a house for a
single source. The model predictions based on rule of thumb
factors (air exchange between rooms and the air handling system
was estimated as 7 ACR) are in good agreement with the
85

-------
measurements. and the model predictions based on actual flow
measurements are in excellent agreement with the data.
The model runs demonstrate how the model can be used to guide
experiments to discover causes of unexpected concentrations. The
model can be used to evaluate different hypotheses as to causes
and to discover the most reasonable hypothesis. For example, in
the moth crystal example the possible explanations for t.he
measured concentrations are the existence of a large sink for p-
dichlorobenzene or considerable air flow from the closet. The
model runs show that a large sink does not produce the measured
room-to-roon distribution of p-dichlorobenzene. The model runs
show that air flow from the closet does produce the measured room-
to-room distribution of p-dichlorobenzene. Subsequent
measurements confirmed the existence of the air flows from the
closet.
The model can also be used to quickly evaluate control options
and to guide selection of appropriate control options.
86

-------
100'
3
o
V
cn
<- Cloaat
10--
S
¦w
0
L
+1
c
o
0
§
.Corner bedroom
~an & moatar bedroom
Tima Chr)
Figure 5-11. Effect of reduced moth crys'tal usage.
87

-------
1000
100--I <- Closet
00
00
S
3
O)
J
c
o
•H


-------
100
E
D
o
\
O)
E
[<— Closat
0»

-------
1G00
<0
o
E
U
v
X
~")
E
C
O
•r-|
+J
o
L
+J
r
ui
u
c
o
o
100
<— Closet
,,| A ru^\AvWA^VA/MAx
/ v
|<- Corner jDedroQm
~.14
H ,

J
<- Den
^ N N ^ ^
~
12
18
24
Tlme (hr)
Figure 5-14. Effect of opening closet, door 1 ¦ j n nn hour

-------
Reemi 11 lng S i nk
Under some conditions sinks can become sources because the
material collected in them is reemitted. An example of thu
effects of a reemitting sink on pollution concentrations indoors
is shown in Figure 5-15. This figure shows the measured p-
di chl orobenzene concentration in the test house after the inoth
crystals were removed from the closet. Note that the p-
dichlorobenzene concentration does not rapidly drop to zero as
would be expected once the source is removed. The p-
dichlorobenzene concentration drops rapidly at first, and then
drops very slowly, if at all, for several days.
Another data set for a reemitting sink is shown in Figure 5-16.
These data are from a study of perchloroethylene concentrations
in the test house. In this experiment a spike of
perchloroethylene was released and the concentration measured as
it decayed. The decay is initially much faster than expected due
to dilution (evidence of a sink). The decay then becomes much
slower than expected for pure dilution because the material
collected in the sink is reemitted. The data indicate that
perchloroethylene is reemitted when the3in-room perchloroethylene
concentration drops below about 15 ug/m .
The effect of the reemitting perchloroethylene sink on in-room
perchloroethylene concentration is shown in Figure 5-17. In this
case the perchloroethylene source is in the bedroom closet. The
perchloroethylene emission rate, Ep, is:
Ep - 19000e"°•03tAreacloth
The reemission rate, Rp is:
Rp - 35(Croon-15)ArearoomMa33sink ^or Croom - 15 Ug/m
0	for Croon > 15 utJ/m3
The effect of the reemitting sink is to reduce the initial
concentration of perchloroethylene as material goes- to the sink.
Then when the perchloroethylene is reemitted, the sink maintains
the perchloroethylene concentration at a relatively constant
level until the sink is exhausted. The model predictions arc? in
good agreement with the experimental data.
91

-------
6
(0
to
ss
E
D
U
\
CD
E
C
0
•ft
¦P
~
L
¦P
C
(0
u
c
o
L)
5--Q
Q
4 --
G
3--
2--
1 --
0
OO
Q
Q
0 Q Q
Q Q.
Q° 0
Q
qq Q
Q
Qq
Qq
Q
GG Q
12
24
36
48
Time (hr)
F if; lire 5- 15. p d j cii I orobenzane confer) i i ti t i on after molli crystals
wore removed.

-------
19
10	-
17 -
16
IS -
14 -
13 -
12 -
11	-
10 -
9 -
a -
¦ ¦
¦ badreea
+ dan
~ hall
2.4 2.6
T 1m (hp)
Figure 5-16. Data from perchlorocthylene sink experiment.
93

-------
40
35
30
25
20
15
10
5
0
5 I
QI
e
o
%
%
o.
Q
Q
	 Model predictions
0 Experimental data
a
B
+
+
24
48
72	96
Time (hr)
120
144
16
Mode] ca J cuJ a t i ons and data for per cliJl oroethy I «:n«;

-------
SECTION 6.
HINTS ON USING THE MODEL
Efficient use of the model depends on the user's ability to
recognize the important features that need to be modeled in
detail and on the user's ability to simplify all aspects of tin;
problem so that the model can deal with the problem. The
sugsestions in this section are based on the experience of
working with the model in many situations.
F1nd the Source
Rooms with strong sources should be handled in some detail. The
air flows into and out of these rooms play a major role in
determining the quality of the air in the rest of the building:
The moth crystal example clearly demonstrates the important of
flows out of the source room.
The important source characteristics should be determined and
included in the model. The important source characteristics
often depend on the time frame being modeled. For example, the
initial short duration high emission rate of wet sources should
be modeled if the time frame of the model (and the effects) is a
few hours. If the time frame of the model were several days or
weeks, the initial high emission rate might not be important, but
the long term emission Tate would be.
Source characterization can be done in small chambers if th<>
experiments are well designed and if the experimental data are
carefully analyzed..
The air flow characteristics of the source room can be estimated
by a number of techniques. Direct measurement with low flow
anemometers is one possibility. Another possibility is the use
of tracer gases. CO2 is a good tracer gas for many practical
situations. The instruments are real time and not too expensive
A suggested way of using CO2 is to add C02 to the room to
increase the concentration to 1,000 to 2,000 ppm. Turn off the
CO2 and monitor the decrease in the source room and the increase
in the rooms near the source room. Use the model to estimate
flows necessary to give the measured results.
CO2 can also be used as a tracer by adding a known constant
amount of CO2 to the room. The decay experiment is easier to run
and model because there is no need to know the COg generation
rate.
Look for Sinks
Sinks are one of the most important factors in indoor air
quality. Unfortunately not much is known about them. Sinks show
up as consistently lower than predicted pollutant concentrations
(see the moth crystal study for an example). When a sink i ^
suspected, use a value for the sink constant of about 0.25 to
95

-------
0.5. This will generally result in about 50% of the total
material emitted going to the sink. A value much above 0.5 will
generally result in too much material going to the sink.
Remember that many sinks are reversible and can become sources
when a strong source is removed from the building. For example,
the moth crystal study showed significant reversible sink effects
when the moth crystals were removed from the test house.
96

-------
References
Ax ley. J. (1987) "Indoor Air Quality Modeling Phase II Report,"
NBSIR 87-3661. U. S. Dept. of Commerce, Gaithersburg, MD 20899.
Nelms, L. H., M. A.. Mason, and B. A. Tichenor (1987)
"Determination of Emission Rates and Concentration Levels of p-
Dichlorobenzene from Moth Repellant," Presented at 80th Annual
Meeting of APCA, New York, NY June 1987.
Press, W. H., B. P. Flannery, S. A. Teukolsky, and W. T.
Vetterling (1987), Numerical Recipes The Art of Scientific
Computing. Cambridge University Press, New York, NY.
Tichenor. B. A., J. E. Bunch, and M. A. Mason (1987) "Evaluation
of Organic Emissions to the Indoor Environment via Small Chamber
Testing," in Proceedings of the 1987 EPA/APCA Symposium on
Measurement of Toxic and Related Air Pollutants, Research
Triangle Park, NC May 1987.
Traynor, G. W., J. R. Allen, M. G. Apte. J. R. Girman, and C. D.
Hollowell (1983), "Pollution Emissions from Portable Kerosene -
Fired Space Heaters," ES&T. 17, 369-371.
97

-------
APPENDIX A
PROGRAM LISTING
DECLARE SUB dterror (deltat!)
REM Indoor air model version 1.2
QuickBasic 4.0 version
REM converted to use midpoint
method from Numerical Recipes
REM May 2 1988
REM faster than RK4
REM converted from QuickBasic
3.0 25 January 1988
REM converted to use RK4 April
20 1988
DECLARE SUB sinkdef (sinkrate!,
remit!, reconc!)
DECLARE SUB massbal (deltat!,
second!, hr!, rs*, strength!(),
dmass!. concen!(), vambout! (),
ihv*. dmassout!, dsinkmass!)
DECLARE SUB sinkl (cone!, area!,
c!, xr, xc! , sink!, sinkmass!,
emiss!)
DECLARE SUB concroom (rs*,
concen!(), cout!(), second!,
hr!, jhv*. strength(), pt(),
sourcfIag*(), sflag*)
DECLARE SUB house 7)
DECLARE SUB indS? )
DECLARE SUB main (
DECLARE SUB findmax
xmax!, xmin!, npoints*)
DECLARE SUB plot (x!()
npoints*, xmax!, xmin!,
Xmin!, room*)
ECLARE SUB getkey (y$, v*)
DECLARE SUB windmake (mon*, fc*,
be*, ul*, ur*, 11*, lr*, f*)
DECLARE SUB getmove (curon*, y$,
Jy*, row*, col*, cursors,
blcur$)
DECLARE SUB movecursor (curon*,
row*, col*, dir$, upstep*,
downstep*, leftstep*,
rightstep*J
DECLARE SUB getdata (outans$,
y$, row*, col*)
DECLARE SUB cwind
ur*. uc*, 11*, ar*)
DECLARE SUB form
be*, title$n,
numtitles*, yaix!()
(x! ()
?!()
ymax!
!*)
(fc*, be*,
(mon*, fc*,
namtitle$,
rowstart*,
rowfinish*, colstart*
formtitle$)
DECLARE SUB plotem (tirae(),
pconc(), tmax*, nrooms*)
DECLARE SUB menu (fc*, be*, ok$,
mainmen$(), startrow*, newrow*,
startcol*, nummtitle*,
menutitle$, choice*)
DECLARE SUB gconfig (monS, mon*)
DECLARE SUB constsetup (cflag*,
deltain!, prntstep*, maxrooms*,
maxsources*, maxtimes*,
maxdays*, hrsday!, sinkst!)
DECLARE SuB init2 ()
DECLARE SUB menuin (al$(), n*)
DECLARE SUB setup (menudatS(),
nchoices*, sub i terns as ( ) )
DECLARE SUB pollution (waxl!,
wax2!, wax3!, wax4!, wtime1!)
DECLARE SUB default (nrooms*)
SUB setupl (cflag*)
SUB defpol ()
SUB building (nrooms*,
newl*)
SUB hvac (newl*
, thvac!, ambair!, cO!
pthvac!, volume!
vin!(), vout!())
SUB outside
DECLARE
DECLARE
DECLARE
vtotal!,
DECLARE
fracton!
opcyc!,
nrooms*,
DECLARE
newl*}
DECLARE
bal!(),
DECLARE
Bollutant*)
ECLARE SUB
Bollutant*,
ECLARE SUB
DECLARE
tmax*,
nrooms*,
DECLARE
tmax*,
nrooms*)
DECLARE
tmax*,
nrooms*)
DECLARE
SUB sbalance
nrooms*)
SUB storedat
(concen!
(vin!()
(nrooms*
(nroomsSS
readdat
filenames}
calculate
SUB displ
concentration 1
volume!())
SUB lprnt (time!()
concentrat ion! ()
( )
< time!(j
SUB fileit (time!{)
concentration!()
SUB
:x! ()
opcyc!,
DECLARE
plotroom
zl[), tmax*, nrooms*)
DECLARE SUB retriveit (time!()
tmax*, concentration!())
DECLARE SUB ghvac (newl*
fracton!, thvac!, ambair!
volume!)
SUB gasclean (pthvac!)
DECLARE SUB inter (roomnr*,
nrooms*, vin!(), vout!())
DECLARE SUB hvacsourc (j*)
DECLARE SUB buildingdef
(nrooms*, vtotal!, newl*)
DECLARE SUB distrib (nrooms*
vtotal!, vambin!(), vambout!()
vol!{))
DECLARE SUB curstatus (rn*
vot!, volume!, cO! , area!, n*
sinks!U, nsink*, subitems*()
sources$(), vin!(), vout!
hvacin!{j, hvacout!(), ambin!()
ambout!())
DECLARE SUB barmenu (oldcol*
oldj*, title$(), nchoices*
nitems*(), j*, row*J
DECLARE SUB
area!, floor!)
DECLARE SUB cOdef (cO!)
DECLARE SUB sourcedef (soS, ss!
xnsource!, room*, a! , B! , c!
d!, floor!)
DECLARE SUB hflow (roomnr*
vin!, vout!, case$)
DECLARE SUB ambflow (roomnr*
rder (volume!
A-l

-------
vin! , vout!, case$)
DECLARE SUB formr (title$(),
numtitles*, valx!(), rowstart*,
rowfinishX, colstart*,
colfinish*, formtitle$)
DECLARE SUB cigdef (onecig!,
ss! , nsmokers*, cigon!, cigofr!)
DECLARE SUB kheatdef (ss!, btu! ,
onl!, of f 1!, on2!, off2!, on3!,
DECLARE SUB stovedef (ss!, btu!,
onl!, of f 1!, on2!, off2!, on3!,
off3!)
DECLARE SUB moth (ss!, gms!)
DECLARE SUB other2def (a!, B!,
c!, d!, ss!)
DECLARE SUB waxdef (ss!, floor!,
wtime!, waxl!, wax2!, wax3!,
wax4!, waxS!)
DECLARE SUB otherdef (ss!)
DECLARE SUB formw (title$(),
numtitles*, valx!(), rowstart*,
rowf inishX, colstart*,
colfinish*, formtitle$)
DECLARE SUB highlight (row*,
col*, title$)
DECLARE SUB subtitles (title$(),
n*(), j*. row*, col*)
DECLARE SUB getchr (y$)
DECLARE SUB udim (row*, col*,
DECLARE SUB wipesub (n*, col*)
DECLARE SUB gfile (filenames)
DECLARE SUB checkflow
(flowerror*)
DECLARE SUB calconc ()
DECLARE SUB zero (pthvac!,
pt!(), xmassout!, xmassemit!,
sinkmass!)
DECLARE SUB scale (pollutant*,
scalel!)
irsday!
DECLARE SUB hvac2 (fracton!,
ncycles*, jhv*, rs*, pthvac!,
Bec^ARE SUB roomcal (rs*, jhv*,
second!, hr! , concen!(),
sourcflag*(), pt!(),
strength!(j » xmassout!
xmassemit!, sinkmass!, dtflag*)
DECLARE SUB update (t*, ihv*)
DECLARE SUB source (room*,
aourc!, second!, hr!, sflag*)
DECLARE SUB cigsourc (deltat!,
room*, hr!, sourc!)
DECLARE SUB massin (con!(),
nrooms*, volume!(), xmass!, t*)
DECLARE SUB inout (a$)
DECLARE SUB getrooms (nrooms*,
inplot*, jroom*())
DECLARE SUB sroom ()
COMMON SHARED /cO/ erflag*
COMMON SHARED /cl/ pollutant$(),
pollutant*, pstrength()
COMMON SHARED /c2/ a(), B(),
c(), d(), calflag*, colr*()
COMMON SHARED /c3/ cigon()
cigoff(), stoveon(), stoveoffn
kheatonf , kheatoff(), cookonM
cookoff(), hour, calstep*
prntstep*
COMMON SHARED /c4/ maxrooms*
maxsources*,	naxt imes^s
maxdavs*, hrsday, mon*, mcn$
sinkst, deltat
COMMON SHARED /c5/ fc*, be*
fracton, endflag, day*, second
deltain, onecig, xaxismin*
COMMON SHARED /c6/ yaxismin*
yaxismax*, xaxismax*, xstep*
ystep*, pthvac
COMMON SHARED /c7/ mainmen$()
inmenu$(), nmenu$(), vin()
vout(), menudat()
COMMON SHARED /c9/ sourcesS()
nsources*(), sinks(), nsinks*()
nchoices*
COMMON SHARED /c8/ subitems*()
volume(), c0(), area(), floor()
COMMON SHARED /clO/ vhvacan()
vhvacout(), vambin(), vambout()
DIM ncig*(10), stobtu(lO)
kheatbtuflO1<	gmoth(lO)
time(740), pollutants(10)
DIM cigon(lO), cigoff(lO)
stoveon(10. 3)
DIM stoveorf(10, 3), kheaton(10
3), kheatoff(10, 3)
DIM a(10) , B(10), c(10), d(10)
colr*(10)
DIM cookon(10, 3), cookoff(lO
3)
DIM waxl(10), wax2(10)
wax3(10), wax4(10), wax5(10)
DIM wtimel(10), xr(20), xc(20)
DIM snkl(20). snk2(20)
remisl!(20), remis2!(20)
CONST maxpoints » 720
CONST maxpollutants = 1
CONST maxsinks ¦ 1
CONST ciglife » 10
REM end common
REM set up user functions
DEF fnhvon (f, ncycles*)
IP ncycles* > 0 THEN
i* » 1
ELSE
fl - RND(l)
IP f - fl > 0 THEN 1* = 1 ELSE
j* - 0
END IP
fnhvon » 1*
END DEF
REM def fnsink2(a,b,c,d)
REM a is pollution concentration
REM b is area term
REM c is limit concentration
REM d is source strength
REM if a
-------
DEF fnstove (a, B, c, t)
IF a <> B THEN
h =« t * 2.77778E-04 + hour
IF h >» a AND h <» B THEN s - 1
ELSE s - 0
fnstove = c * s
ELSE
S * 0
END IF
END DEF
DEF fnkero (a, B, c, t)
REM a is start time, b is finish
time, c is source strength
h » t * 2.77778E-04 + hour
IF a <> B THEN
IF h >» a AND h <¦ B THEN s - 1
ELSE s =» 0
ELSE
S » 0
END IF
fnkero * c * s
END DEF
DEF fnoth (a, B)
fnoth =• B
END DEF
DEF fnwax (time, area)
REM a is area and b is time in
hours
REM wax data based on Tichnor's
work
REM modified for pere
experiments
s » wl * area * EXP(-w2 * time)
fnwax » s
END DEF
DEF fnsouree2 (a, B, c, d, x)
fnsource2 =»a + B*x+c*
EXP (d * x)
END DEF
DEFSTR M
DEFINT J, N
REM end user function area
REM error trapping
maxroomsft =» 10
1 REM indoor air model
CALL gconfig(mon$, monfc)
CALL constsetup{-99, deltain,
prntstep*, maxrcoms*,
maxsourcas9S , maxtimes*,
maxdays*, hrsday, sinkst)
max* 3 maxsources*
maxr* * maxrooms*
maxaSS 3 maxrooms*
REM $DYNAMIC
DIM xnsource(10, 6, 6),
sstrength(10, 6, 6)
REM $DYNAMIC
DIM mainmen$(8), inmenuS(8),
outmenuS(4), plotmenu$(4)
REM $DYNAMIC
DIM nlit*(maxa*, 25),
lit*(maxr*)
REM $DYNAMIC
DZM menudat $ ( raaxr oomsft,
maxroomsSS) ,
subiterns*(maxrooms*),
sources? (maxrooms*, maxrooms!H) ,
nsources*(maxroomsX),
volume(maxrooms*)
REM $DYNAMIC
DIM title$(maxrooms*), x(10),
mtitle$(20), vin(maxrooms*,
maxrooms*, 2) , vout (maxrooms*,
maxrooms*,	2 h •
v h v ac i n ( m ax r o o m s as ,	2) ,
vhvacout(maxrooms*, 2),
pambin{10)
kEM $DYNAMIC
DIM vambin(maxrooms%, 2),
vambout(maxrooms*, 2 ) , nmenu(5)
REM $DYNAMIC
DIM rsinkmass!(maxrooms*),
concen(maxX, m a x a % ) ,
sourer lag* (maxa*) ,
ssource(maxr*)
REM SDYNAMIC
DIM area(naxrooms^),
sinks (maxrooms*, maxsinks),
f loor (maxrooms*)
REM $DYNAMIC
DIM pconc(maxpollutants,
maxrooms*, maxtimesSs) ,
nsinks* (maxrooms*)
REM $DYNAMIC
DIM cO(maxrooms*), pstrength(10,
10), nsmokers*(10)
DIM emisl(maxrooms*),
emis2( maxrooms*) ,
emis3( maxrooms*)
emis4(maxrooms*)
REM main program
CALL init2
CALL menuin(inmenuS(), nmenu(2))
CALL menuin(outmenu$(),
nmenu(3))
CALL menuin(plotmenuS(),
nmenu(4))
CLS
FOR j* ¦ 1 TO maxrooms*:
nsources*M*) * maxsources*
nsinks*(j) * maxsinks: NEXT 1*
CALL setup{menudat$f),
nchoices*, subItems*())
CALL pollution (wl, w2 , w3 , w4,
wt)'get pollutants and source
strengths
pollutant* * 1
pthvac ¦ 1
roomnr* « 1
oldcol* ¦ 1
oldj* « 1
d$ « ""
CALL default(nrooms*)
CALL house
CLS
SCREEN 0: COLOR fc*, be*
WIDTH 80
CALL main
END
DEFINT E, R
DATA	< E > n t e r
data. . . ,alculate,<0>utput
, < F > 1 o t
. . .,etup,uit,end
DATA Specify 

ollutant,Define A-3


-------
uilding,Define VAC,Define
<0>utside,Define ooms
DATA tore Data on Disk,et
Data from Disk,uit,end
DATA isplay results on
CRT,rite results to file,

rint results,uit,end DATA

lot Results DATA Plot elected rooms,et Previous run,uit,end DATA room number,definition,sources, sinks,interconnections,done,end DATA 1,2,3,4,5,6,7,8,9,10,end DATA volume,initial cone,end DATA C i gs,K-heater,Unvented-stove,Mo th crystals,Wax,Other,end DATA walIs,rugs,other,end DATA HVAC 1,HVAC 2,Outdoors I,Outdoors 2,Other rooms,end DATA end DEPSNG E, R SOB ambflow (roomnr*, vin, vout, caseS) STATIC REDIMx(2), title$(2) CALL winamake (mon*, fc*, be*, 10, 33, 16, 80, -1) x(11 a vin: x(2) ¦ vout titles(1) » "Air from outdoor" title$(2) - "Air leaving to outdoor" ftitleS » "[Define ambient flow case ]" +¦ caseS CALL rormw(titles(), 2, x(), 10, II, 41, 73, ftitle$) vin » x(1): vout • x(2) IP v$ <> THEN vout » VAL (v$) CALL cwind(fc*, be*, 10, 35, 16, 80) 2ND SOB SUB barmenu (oldcol*, oldj*, title$(), nchoices*, nitems*() , cj*. crow*) STATIC COLOR fc*, be* row* » l: col* » 1 FOR 1* ¦ l TO nchoices* LOCATE row*, col*: PRINT title$(1*, 0); col* - 5 + LEN(title$(j*, 0)) + col* NEXT j* row* * 1: col* old j* CALL highlight(row*, col*, title$(j*, 0)T CALL subti11es(1111e$( ) , nitems*f), j*, row*, col*) y$ = " " WHILE ASC(vS) <> 13 CALL cretcnr(y$) IP ASC(y$) - 27 THEN j* ¦ nchoices* y$ « CHR$(13) ELSE oldcol*: j* IP LEN(V$) > 1 THEN v$ = RIGHTS(y$, 1) CALL udim(row*, col*, " 111 SELECT CASE jj CASE 80 'down IP row* <= nitems*{j*) THEN row* ¦ row* + 1 CALL highlight(row*, col*, title$(1*, row* - l)) CASE 72 'up IP row* > 2 THEN row* = row* - 1 CALL highlight(row*, col*, title$(j*, row* - 1)) CASE 7? 'right IF 1* < nchoices* THEN CALL wipesub(niterns*(j*), col*) col* * col* + 5 + LEN(title$(j*, 0)): oldcol* = col* row* ¦ l 1* " j* + 1: oldj* = j* CI" JALL highlight(l, title$(j*, 0)f CALL col*, nitems*(] ELSE subtitles(titles(), j*, row*, col*} CALL highlight(1 title$(j*, 0)f col*, wipesub(niterns*{j*; j* END IP CASE 75 'left IP 1* > 1 THEN CALL col*] j* - j* - 1: oldj* col* J - col* 5 LEN{tltle$(j*, 0)): oldcol* » col* row* * 1 CALL highlight(1, col*, title$(j*, 0)1 CALL subtitles(title$(), nitems*(), j*, row*, col*) ELSE CALL hichlight(l, col*, CASE ELSE END SELECT END IP END IP WEND CALL wipesub(nitems*(j*) , col*) CALL wipesub(niterns*(j*} , col*) r J ' CALL udim(row*, col*, title$(j*, row* - l)) cj* » j*: crow* ¦ row* END SUB SUB building newl*) STATfc SHARED volume() (nrooras*, vtotal, vambin{), vambout(), A-4


-------
CALL bui ldingdef (nrooms*,
vtotal, newl*T
CALL distrib(nrooms*, vtotal,
vambin(}, vambout(), volume())
END SUB
SUB buildingdef (nrooms*,
vtotal, newl*) STATIC
REDIM title$(10), x(20)
new1X ¦ 1
v* * "1
WHILE v* - -1
v* - 0
At e
titleS(l) » "Number of rooms
Max ¦ " + STRS(maxrooms*)
x(1) * nrooms*
1111 e$(2) « "Total
ventilation rate air changes/hr"
cAl£
' vtotal
form(mon*, fc*, be*,
title$()/ "Item", 2. x(), 12,
13, 10, ''Building definition")
nrooms* » INTfx(l)): vtotal ¦
x(2)
IF nrooms* > maxrooms* THEN
COLOR fc*, be*
PRINT
PRINT
PRINT "ERROR ERROR. Number
of rooms exceeds maximum of ";
maxrooms*
PRINT "Press any key to
reenter data"
CALL getkey(y$, y*)
y* - -1
END IF
COLOR fc*, be*
CLS
COLOR fc*, be*
WEND
END SUB
DEFINT E, R
SUB cOdef (cO) STATIC
REDIM title$(2), x(2)
CALL windmakefmon*, fc*, be*,
10, 40, 15, 75, -1)
L06ATE 9, 41: PRINT "[Define
initial cone] ";
titles(1) - "Initial
concentration"
x(lT ¦ cO
CALL formw(titles(), 1, x(), 10,
10, 41, 75, "[Initial cone]")
CALL cwind(fc*, be*, 10, 40, 15,
75)
cO « x(1)
END SUB
DEFSNG R
SUB calconc STATIC
SHARED wl, w2, w3, w4, w5, wt
SHARED waxl(), wax2(), wax3(),
wax4(), wax5(), wtimel()
SHARED sstrength(), xnsource(),
sinkmass
SHARED time(), tmax*, nrooms*
cone, ventotal, thvac, ambair
Eollutant*, pstrength()
HARED fracton. partcont
orgcont, pconc(), concent)
pollutants()
SHARED sources$(), nsourcesSSO
sinks(), nsinks*(), volume
c0(), xmassout, xmassemit
"\RI
SHARED area(), floor(), vin(
vout{), vhvacin ( ) , vhvacout()
vambin(), vambout()
SHARED ncig%(), stobtu()
kheatbtuO, gmoth(), . sealel
sourcflag*(), nlit*(), lit*()
SHARED xc f), xr()
REDIM deltaconc(maxpollutants
nrooms*), concentmaxpollutants
nrooms*)
REDIM pambin(nrooms*)
REDIM sourcflag*(nrooms*)
fhvac(nrooms*, nrooms*)
REDIM nlit*(nrooms*, 25)
lit*(nrooms*), pt(nrooms*)
strength(nrooms*)
DEFINT J, N, R
tmax* * maxpoints
CALL zerofpthvac, pt ( ) ,
xmassout, xmassemit, sinkmass)
FOR room* ¦ 1 TO nrooms*
IF concent 1, room*) < 1E-08
THEN concen(l, room*) = 1E-08
NEXT room*
IF scalel <- 0 THEN scalel = .01
time(0) ¦ 0
tmax* * 1
deltaflag* - 0
CALL scale(pollutant*, scalel)
deltat * deltain
az$ ¦ STRINGS(76, " ")
lenaz* ¦ 76
endflag ¦ 0
CLS
ncycles* =¦ 0
LOCATE 1, 1: PRINT "ROOM
CONCENTRATION
mg/m3 " ,*
LOCATE 1, 71: PRINT ">
SCftlfil*
r* « l': FOR r* ¦ 0 TO nrooms*:
LOCATE r* + 2, 1: PRINT r*;
NEXT r*
t* ¦ 1
LOCATE 25, 2: PRINT "Press esc
to abort calculations";
REM start calculation loop
psink - 0
hrsec » 3600!
prntcount* » prntstep*
FOR 1r* - 1 TO nrooms*:
strength(jr*) ¦ 0
FOR js* - 1 TO 5: FOR jp* = 1
TO 6:
strength(jr*) * xnsource(jr*,
js*, 1p*7 * sstrengthtjr*, js*,
jp*) + strengthtjr*)
NEXT jp*: NEXT js*: NEXT jr*
A-5

-------
FOR day* = 1 TO maxdays*
hour * 0
IP endflag » -1 THEN EXIT
FOR'exit if esc pressed
WHILE hour < hrsday
LOCATE 22, 2: PRINT "Time:
Dav "; day*; " hour "; hour;
LOCATE 24, 2: PRINT "+ shows
source on in room - shows no
source in room.";
FOR 1* = 0 TO nrooms*:
nlit*(j*, hour) - 0: NEXT j*
jhv - 1
second * 0
timon » 0
tfract ¦ 0
WHILE second < hrsec
2$ - INKEYS:
IF Z$ <> "" THEN
IF ASC(Z$) - 27 THEN
CALL endit(endflag. day*,
maxdays*, second, hour, hrsday,
tmax*, t*, timel)
END IF
END IF
prntcount* » prntcount* +
1: deltaflag* » -1
IF tfract <¦ fracton THEN
IF fracton < 1 THEN
IF tfract > fracton THEN
ncycles* ¦ -10
IF ncycles* <* 0 THEN
CALL hvac2(fracton,
ncycles*, jhv, rs*, pthvac,
pt(0))
ELSE
ncycles* - ncycles* - 1
END IF
IF jhv - 1 THEN
timon » timon + deltat
tfract ¦ timon / hrsec
END IF
END IF
ELSE
jhv ¦ 0
END IF
IF hour > hrsday THEN hour
* hrsday
hr ¦ second * 2.77778E-04
+ hour
CALL roomcal(rs*, jhv,
second, hr, concent ) ,
sourcflag*(), pt(), strength(),
xmassout, xmassemi t, s inkmass,
dtflag*)
CALL massbal(deltat,
second, hr, rs*, strength(),
dmass, concent), vambout(), jhv,
dmassout, ds inkmass)
IF dtflag* » -1 THEN
CALL dterror(deltat)
EXIT SUB
END IF
xmassemit * xmassemit +
dmass
xmassout « xmassout +
dmassout
sinkmass = dsinkmass
IF prntcount* >» prntstep*
THEN
IF t* < maxtimes* THEN
time(t*) ¦ second + 3600 * (hour
+ 24 * (day* - 1)) ELSE t* =
maxtimes*
deltatflag* » -1
CALL update(t*, jhv)
t* « t* + 1: prntcount* = 0
END IF
second =¦ second + deltat
WEND
hour « hour + 1
IF hour >» 23 THEN
deltat ¦ deltain
END IF
WEND
NEXT day*
time(t*) ¦ second + 3600 *
([hour - 1) +24 » (day* -2))
CALL update(t*, jhv)
tmax* * t*
END SUB
REM $STATIC
DEFSNG E, R
SUB calculate STATIC
SHARED time(), tmax*, nrooms*
cone, ventotal, thvac, ambair
fracton, partcont
SHARED orgcont, sourcesS()
nsources*(), sinks(), nsinks*()
volume()
SHARED c0(), area(), floor()
vin(), vout(), vhvacin()
vhvacout(), vambin()
SHARED vambout(), pconc()
REM SHARED ncig*f), stobtu( )
kheatbtu(), gmoth(), xnsource()
sstrength()
REM first check flow
flowerror* ¦ 0
CALL checkflow(flowerror*)
IF flowerror* - 0 THEN
CALL calconc
END IF
END SUB
REM SDYNAMIC
SUB checkflow (flowerror*)
STATIC
SHARED ventotal, thvac,
vambout(). vambin(), vhvacin(),
vhvacout()
SHARED nrooms*, volume()
DEFINT E, J
errortotal ¦ 1
CLS
totalambout ¦ 0
totalambin - 0
totalhvin » 0: totalhvout = 0
bvolume " 0
jhv » 1
FOR j* ¦ 1 TO nrooms*
totalambout » totalambout +
vambout(j*, jhv)
totalambin ¦ totalambin +

-------
totalhvout
JhVJ totalhvin
vhvacin(j*, jhv)
totalhvout »
vhvacout(j*, jhv)
bvolume " bvolume ~ volume(j*)
NEXT j*
totven * bvolume * ventotal
tothvac =• bvolume * thvac
balancehvac ¦ totalhvin
totalhvout	. , .
balanceamb ¦ totalaunbin
totalambout
IP totalhvin > 0 THEN
IF ABS(balancehvac /
totalhvin) > .00001 THEN ehvac »
1 ELSE ehvac 9 0
IP ABS(tothvac - totalhvin) /
totalhvin > .00001 THEN etotalh
a i ELSE etotalh » 0
ELSE
ehvac * 0
etotalh ¦ 0
END IP
IF totalambin > 0 THEN
IF ABS(balanceamb / totalambin)
> .00001 THEN eamb * 1 ELSE eamb
» 0
IP ABS(totven - totalambin) /
totalambin > .00001 THEN etotala
» 1 ELSE etotala ¦ o
ELSE
eamb =* 0
etotala » 0
END IF
errortotal » ehvac + eamb +
etotala + etotalh
IF errortotal > 0 THEN
IP ehvac » 1 THEN
PRINT "Error. HVAC flows
do not balance "
PRINT balancehvac,
totalhvin, totalhvout
PRINT "DO you want to
continue";
y$ » INPUTS(1)
IF v$ » "Y" THEN errtotal -
0 ELSE STOP
END IF
IF eamb - 1 THEN
PRINT "ERROR Ambient flows
to not balance."
END IF
IF etotala » 1 THEN
CLS
PRINT "ERROR. Ambient flows
into rooms does not agree"
PRINT "with total ambient
air flow for building."
PRINT "Do you want to use
room totals Y or N?"
rS - INPUTS (1)
" INSTR("YyNn", y$) <3
THEN
totven * totalambin
tven » totven / bvolume
errortotal ¦ 0
iP
END IP
END IF
IF etotalh = 1 THEN
errortotal « etotalh
PRINT "ERROR. HVAC flows
into rooms does not agree with"
PRINT "TOTAL hvac air flow
for building."
PRINT "T)o you want to use
room totals Y or N?"
v$ ¦ " "
y$ - INPUTS(1)
IF INSTR("YyNn", y$) <3
THEN	.
tothvac ¦ totalhvin
thvac » tothvac / bvolume
errortotal » 0
END IP
END IF
END IF
IP errortotal <> 0 THEN
flowerror* » 1 ELSE flowerror* =
0
END SUB
DEPSNG E
SUB cigdef (onecig, ss,
nsmokers*, cigon, cigoff) STATIC
REDIM X( 5), title$(5)
CALL winamakefmon*, fc*( be*,
10, 40, 17, 75, -1)
LOCATE 9, 41: PRINT "[Define cig
source strength] ";
title?(1) » "Single Cig mg "
title$ 2) - "Nr. cigs/hr s
titles(3) ¦ "Nr. smokers"
title? 4) - "Start time"
title!(5) » "Stop time"
x(l) ¦ onecig
x(2j ¦ ss
x( 3 J ¦ nsmokers*
x(4) - cigon
x(5j « cigoff
CALL formw(title$(), 5, x(), 10,
14, 41, 75, "[Define cig]")
CALL cwind(fc*, be*, 9, 40, 16,
75)
ss ¦ x(2): onecig ¦ x(l): cigon
- x(4): cigoff = x(5)
nsmokers* ¦ x(3)
END SUB
DEFINT E, R
SUB cigsourc {deltat, room*, hr,
sourc) STATIC
SHARED cigon(), cigoff(),
sstrength(), nlit*(), Iit*()<
xnsource()
SHARED hour, pollutant*,
nsmokers*()
ncigs ¦ xnsource (room*, 1,
pollutant*)
onecig ¦ sstrength(room*, 1,
pollutant*)
sourc ¦ 0
c « ncigs * onecig
pstep ¦ deltat * 2.77778E-04
A-7

-------
IF C > 0 THEN
IF hr >= cigon(room*) AND hr
<* cigoff(room*) THEN
IF lit*(room*) > 0 THEN
sourc ¦ onecig / ciglife /
60 * nsmokers*(room*)
lit*(room*) » lit*(room*) -
deltat
ELSE
lit*(room*) * 0
IF nlit*(room*, hour) >-
ncigs THEN pi - EXP {-8
(nlit*(room*, hour) - ncigs))
ELSE^jsl » ncigs * pstep * ncigs
IF (1 - RND(l)) < pi THEN
sourc ¦ onecig / ciglife
/ 60 * nsmokers*(room*j
nlit*(room*, hour) ¦
nlit*(room*, hour) + l
lit*(room*J ¦ ciglife *
60
ELSE
sourc ¦ 0
END IF
END IF
END IF
END IF
END SUB
cin()
" 7%
II
stobtuf)
pconc()
REM SSTATIC
DEFSNG E
SUB concroom (rs*,
cout(), second, hr, jhv_
strength(), pt(), sourcflag*()
sflag*) STATIC
SHARED nrooms*, lit*(), nlit*()
rsinkmass!(), remisl!()
SHARED ssource(), xnsource()
pambin(), xr(), xc(), snkl()
SHARED sourcesS(J, nsources*
sinks(), nsinks*(), volume
cO ()
SHARED area(), floor(), vin( )
vout(), vhvacin(), vnvacout()
vambin(), vambout()
SHARED ncig*(),
kheatbtu(), gmoth()
pollutant*
SHARED emisl!()
REDIM cout(1, nrooms*)
amis J ¦ 0
FOR room* ¦ rs* TO nrooms*
, Din » pambin(room*) : pout *
cin{l, room*) * vambout{room*,
jhv) * 2.77778E-04
FOR j* » rs* TO nrooms*
IF j* <> room* THEN
pin » pin + cin(l, j*) *
vin(room*, j*, jhv) *
2.77778E-04 * pt(j*):
pout ¦ pout + cin(l,
room*) * vout(room*, j*, jhv) *
2.77778E-04
END IF
NEXT j*
psink =» 0: emiss! = 0
IF sinks(room*. 1) > 0 THEN
CALL sinkl (.cinfl, room*),
area(room*), sanies( room* , 1),
xr(room*), xc(room*), sink,
rsinkmass!(room*), emiss!)
psink - sink i 2.77778E-04
snkl(room*) = psink
ELSE
psink » 0
END IF
pout » pout + psink: sourc =
0: sis - 0:
IF strength(room*) > 0 THEN
CALL source(room*, sourc,
second, hr, sflag*) ELSE sourc =
0
emisl! (room*) => sourc
remisl!(room*) » emiss!
sourc ¦ sourc + emiss!
cout(l, room*) ¦ (pin - pout
+ sourc * 2.7777SE—04) /
volume(room*)
IF sourc > 0 THEN
sourcflag*(room*) ¦ 1 ELSE
sourcflag*(room*) = 0
NEXT room*
END SUB
REM $DYNAMIC
DEFINT E
SUB constsetup (cflag*. deltain,
prntstep*, maxrooms*,
maxsources*, maxtimes*,
maxdays*, hrsday, sinkst) STATIC
IF cflag* - -99 THEN
maxrooms* ¦ 10
maxsources* ® 6
maxtimes* ¦ 740
maxdays* * 1
hrsdav ¦ 24
deltaln ¦ 5
prntstep* » 30
END IF
END SUB
DEFSNG E, R
SUB curstatus (rn*, vot, volume,
cO, area, n*, sinksf). nsink*,
subitems*(), sources$(), vin(),
vout(), hvacin(), hvacout(),
ambinO, ambout ()) STATIC
SHARED xnsource(), sstrength(),
pollutant*, pollutants()
REDIM tvin(5 ) , tvout(5),
balance(5)
SCREEN 0
fm$ - "##.#"
REM	call
cwind(fc*,be*,11,20,17,60)
REM	call
cwind ( fc*,be*. 15 , 5 , 24 , 80 )
COLOR fc*, be*
CALL cwind(fc*, be*, 24, 1, 25,
BOj
LOCATE 24, 10: PRINT "Pollutant
being modeled
Eollutant${pollutant*);
OCATE 25, 1: PRINT "Use arrow
A-a

-------
lcevs to move cursor. Press
 to select, ESC to
return. '• ;
CALL windmake(mon*, fc*, be*, 9,
4, 16, 45, 0)
wtitle$ ¦ "[Status of room" +•
STR$(rn*) + *]"
blnk$ - STRINGS(LEN(wtitle$), "
LOCATE 8, 10: COLOR fc*. be*:
PRINT blnk$; LOCATE 8, 10:
PRINT wtitle$; : COLOR fc*, be*
LOCATE 9, 5:
COLOR be*, fc*
PRINT USING "Bldg vol #,#### m2
Ci ##,###.# mg/m3"; vot; CO;
COLOR fc*, be*
LOCATE 10, 6: PRINT USING "vol.
#### m3 Wall ### m2 sink ##.##
volume, area, sinks(rn*, 1);
LOCATE 11, 6: PRINT "Sources
selected :";
row* ¦ 12: col* « 5
FOR i* - 1 TO subitems*{3)
IP row* <14 THEN
col* - 6
r* ¦ row*
ELSE
col* - 15
r* ¦ r* + 1
END IF
IF sstrength(rn*, i*,
pollutant*) * xnsource(rn*, i*,
pollutant* > 0 THEN
LOCATE r*, col*: PRINT
sourees$(rn*, i*);
raw* ¦ row* + 1
IF row* - 14 THEN r* ¦ 11
END IF
NEXT i*
CALL windmake(mon*, fe*, be*, 9,
43, 16, 78, 0)
COLOR be*, fc*
LOCATE 8, 50: PRINT "[Air flows
1"; : COLOR fc*, be*
LOCATE 9, 46: PRINT "Air flows
1	PaeoO
LOCATE 10, 45: PRINT USING "Air
from HVAC ####.# ####.#";
vin(rn*, 0, 1), vin(rn*, 0, 0);
LOCATE 11, 45: PRINT USING "Air
to HVAC	####.# ####.#";
vout(rn*, 0, 1) , vout(rn*, 0,
LOCATE 12, 45: PRINT USING "Air
from Outdoor ####.# ####.#";
ambin(rn*, 1), ambin(rn*, 0);
LOCATE 13, 45: PRINT USING "Air
to outdoors ####.# ####.#";
ambout(rn*, 1), ambout(rn*, 0) ;
row* ¦ 16
col* » 5
tvin(l) » vin(rn*, 0, 1) +
ambinlrn*, l): tvout(l) ¦
vout(rn*,0,1)+ ambout(rn*, 1)
tvin(O) » vin(rn*, 0, 0) +
ambln(rn*, 0): tvout(O) *
ambout (rn*, 0) + vout (rn*, 0, 0 )
CALL windmake (mon* , fc*, be* ,
16,	3, 23, 58, 0)
COLOR be*, fc*
LOCATE 15, 7: PRINT
"[Interconnections]";	COLOR
fc*, be*
LOCATE row*, col*: PRINT "Room#
Air out to Air in from"
row* ¦ row* + 1
REM for 0 to 1
FOR i* ¦ 1 TO subitems*(l)
IF rn* <> i* THEN
FOR j - 0 TO 1
tvin(j) ¦ tvin(j) + vin(rn*,
i*, j ) : tvout(1) - tvout(j) +
voutfrn*, i*, j)
NEXT j
IF vout(rn*, i*, 0) OR vin(rn*,
i*, 0) OR vout(rn*, i*, 1) OR
vin(rn*, i*, 1) > 0 THErf
LOCATE row*, col*: PRINT i*;
LOCATE row*, col* + 15: PRINT
USING 11 ###. #" ; vout (rn*, i*, 0) ;
LOCATE row*, col* + 31: PRINT
USING "###.#"; vin(rn*, i*, 0);
LOCATE row*, col* + 9
PRINT USING "###.; vout(rn*,
i*. 1);
LOCATE row*, col* + 25: PRINT
USING "###.#"; vin{rn*, i*, 1);
row* ¦ row* + 1
END IF
END IF
NEXT i*
FOR j - 0 TO 1
IF tvin(j) > 0 THEN balance(j ) =
tvin(j) - tvout(j)
NEXT 3
CALL windmake (mon*, f c*, be*,
17,	48, 22, 79, 0)
COLOR be*, fc*
LOCATE 16, 50: PRINT "[Air
Balances]"; : COLOR fc*, be*
LOCATE 17, 51: PRINT "
LOCATE*18,C50* PRINT USING "Air
entering ####.#	####.#";
tvin(1), tvin(O);
LOCATE 19, 50: PRINT USING "Air
leaving ####.#	####.#";
tvout(1), tvout(0);
LOCATE 20, 50: PRINT USING
"Balance	####.# ####.#";
balance(1), balance(0);
END SUB
tat****************************
*************
SUB default (nrooms*) STATIC
SHARED cone, ventotal, thvac,
ambair, fracton, partcont,
orgcont
SHARED sources${), nsources*().

-------
sinks () , nsinks*() , sstrength() ,
xnsource()
SHARED volume(), cO(), area(),
floor(], vin(), vout(),
vhvacin()
SHARED vhvacout(), vambin(),
vambout()
CALL readdatInrooosX,
pollutant*, "default.ron")
onecig * 30
END SUB
DEFINT E, R
SUB defpol STATIC
SHARED pollutants(), pollutant*
CLS
PRINT "	Select
Pollutant "
PRINT
PRIlIT "	Available
pollutants"
FOR j » 1 TO 6: PRINT TAB(10); ,
j, pollutants(j)
NEXT 1
PRINT
PRINT "Press number
corresponding to the pollutant
you wish to use"
pollutant* - 0
WHILE pollutant* » 0
y$ » INPUTS{1)
pollutant* « INSTR("123456¦, y$
WEND
CLS
END SUB
SUB disp'l (tlme(), tmax*,
concentration)), nrooms*,
volume()) STATIC
SHARED xmassout, xmassemlt,
sinkmass, rsinkmass!()
lne* « 0
CLS
CALL massin(concentration},
nrooms*, volume(), xmass, tmax*)
CALL inout{"CON")
CLS
PRINT "Cumulative results "
PRINT USING "Cumulative mass
emitted	#,######.# mg";
xmassemlt
PRINT USING "Cumulative mass to
outdoors #,######.# mg";
xmassout
PRINT USING "Mass inside at end
of run #,######.# mg xmass
PRINT USING "Cumulative sink
mass	#,######.# mg
sinkmass
IF xmassemlt <> 0 THEN
PRINT USING "3 unaccounted for
##.###* (xmassemlt -
(xmassout + xmass + sinkmass)) *
100 / xmassemlt
END IF
LOCATE 25, 10: PRINT "Press any
key to continue. ESC to exit.";
lne* = 0
CALL getkey(y$, y*)
GLS
PRINT "results of indoor air
calculations"
PRINT "day Time(hrs)
Room
Concentration"
FOR 1 ¦ 1 TO tmax*
hr - timeM) • 2.77778E-04
dayp* - INT(hr - 24) / 24+1
IF dayp* <» 0 THEN dayp% = 1
PRINT dayp*; " "; : PRINT USING
"###.#"; time(j) * 2.77778E-04;
FOR room*
0 TO nrooms*
PRINT TAB(30J; room*; TAB(50);
PRINT USING »##.##*";
concentration^, room*, j)
NEXT room*
lne* * lne* + nrooms*
IF lne* > 20 THEN
LOCATE 25, 10: PRINT "Press any
key to continue. ESC to exit.";
lne* ¦ 0
CALL getkey(y$, y*)
IF y* « 27 THEN EXIT FOR
CLS
LOCATE 25, 10: PRINT
STRINGS(50, " "):
LOCATE 1, 1: PRINT "day
Time(hrs)	Room
Concentration"
END IF
NEXT j
IF y* <> 27 THEN
LOCATE 25, 10: PRINT "Press anv
key to continue.";
CALL getkey (y$, y*J
LOCATE 25, 10: PRINT
STRINGS(50, " ");
END IF
END SUB
DEFSNG E, R
SUB distrib (nrooms*, vtotai,
vambin(), vambout(), vol()j
STATIC
DEFINT J
FOR j ¦ 1 TO nrooms*
vambin(j, 1) » vol(j) *
vtotai
vambout(j, 1) * vambin(1, l)
vambin(j, 0) =* vambin(j, l)
vaaboutlj, 0) »vambin(j, l)
NEXT j
END SUB
REM $STATIC
DEFINT E, R
SUB dterror (deltat)
CLS :
PRINT "ERROR ERROR"
PRINT "It appears that the time
step you have selected is too
large."
A-10

-------
PRINT "Please select SETUP from
the main menu ana enter a new
value"
PRINT "of DELTAT."
PRINT USING "A suggested value
is ###.##, which is 70% of the
current value."; deltat * .7
PRINT "Press any key to return
to main menu."
WHILE INKEYS * "": WEND
END SUB
REM 9DYNAMIC
REM labels
SUB endit (endflag, day*,
maxdaysX, second, hour, hrsday,
tmaxX, tX, timel) STATIC
tmaxX » tX + 1
endflag = -1
day* « maxdaysX + l
second 3 3601
hour * hrsday + 1
endflag = -1
tX = tmaxX
END SUB
SUB fileit (time(), tmaxX,
concentration(), nroomsX) STATIC
CLS
redo* » -1
WHILE redoX » -1
redo* » 1
LINE INPUT "Enter data file name
filenS
IP LEN(filenS) > 6 THEN
filen$ - LEFTS(filenS, 6}
CLS
PRINT "Warning"
PRINT "The filename was
long and was shortened to
filenS
tyX =* o
WHILE tyX =« 0
PRINT
PRINT "If this
acceptable, press Y"
PRINT "If you wish to enter
a new filename press N"
yy$ » INKEYS
WHILE yyS =»	yy$ -
INKEYS: WEND
w2n " INSTR<"YYNn"• yy$)
IP tyX > 2 THEN redoX » -1
ELSE redoX - 1
END IF
WEND
FOR roomX = 0 TO nroomsX
OPEN "0", i, filen$ +
MIDS(STRS(roomX), 2, 2 -
LEN(STR${roomX)) + 1) + ".dat"
PRINT #1, "Data for room
STRS{roomX)
REM print #1,tmaxX
FOR jX * 1 TO tmaxX
PRINT #1, time{jX),
concentration 1, roomX, jX)
too
«.
is
NEXT jX
CLOSEJ1
NEXT roomX
END SUB
SUB formr (title$(), numtitlesX,
valx(), rowstartX, rowfinishX,
colstartX, colfinish*,
formtitleS) STATIC
DEFINT J
cur$ ¦ + CHRS(16)
CALL cwind(fcX, bcX, 24, 1, 25,
80)
COLOR fcX, bcX
LOCATE 25, 10: PRINT "Use arrow
Keys to move cursor Press ESC to
return.";
LOCATE rowstartX, colstartX + 1:
PRINT namtitle$: LOCATE'
rowstartX, colfJnishX - 8: PRINT
"Value"
IminX » rowstartX
acolX * colfinishX - colstartX
spacX - dcolX / 2 + 5
rowX » rowstartX: colX =
colstartX
FOR 1 ¦ 1 TO numtitlesX
LOCATE rowX, colX: PRINT
titles (1) ;
LOCATE rowX, colX + spacX:
PRINT valx(j)
rowX ¦ rowX + 1:
NEXT j
rowX - rowstartX: colX =
colstartX
y$ a »1«
WHILE ASC(y$) <> 27
COLOR fcX, bcX
LOCATE rowX, colX: COLOR bcX,
fcX: PRINT STRINGS(colfinishX -
colstartX - 2, " ")
LOCATE rowX, colX: COLOR bcX,
fc*: PRINT titles{rowX
rowstartX + 1)
LOCATE rowX, colX + spacX:
PRINT valx(rowX - rowstartX + 1)
CALL getmove(-l, y$. jyX, rowX,
colX - 5, cur$, '•)
IF ASC(yS) <> 27 THEN
IF LENiy$) - 2 THEN
LOCATE rowX, colX: COLOR fcX,
bcX: PRINT STRINGS(dcolX - 2, "
ioCATE rowX, colX: PRINT
titles(rowX - rowstartX + 1)
valx{4) ¦ valx(l) * valx(2) *
valxf 3)
LOCATE rowX, colX + spacX:
PRINT valx(rowX - rowstartX + 1)
IP RIGHTS(y$, 1) ¦ "P" THEN
CALL movecursor(-1, rowX, colX
— 5 "D", 1, 1, 0, 0)
I# rowSS > row'finishX THEN row*
¦ rowstartX
ELSEIF RIGHTS{y$, 1) = "H"
THEN
A-11

-------
CALL movecursor<-1. row*, col*
- 5 U", 1, 1, 0, 01
IF row* < rowstart* THEN row* ®
rowf Irtish*
ELSE
dir$ » '"1
END IP
ELSE
LOCATE row*, col* + spac*:
COLOR be*, fc*: PRINT
STRINGS(10, " ");
COLOR fc*, be*
CALL getdata(x$, y$, row*, col*
+ spac* + 1)
valx(row* - rowstart* +1) »
VAL(x$)
COLOR fc*, be*
LOCATE row*, col* + spac*:
PRINT STRINGS(10, " ");
LOCATE row*, col* + spac*:
PRINT valx(row* - rowstart* +
1) ;
END IP
END IP
WEND
END SUB
SUB forraw (titlesn, numtitles*,
valx(), rowstart*, rowfinish*,
colstart*, colfinish*,
formtitleS) STATIC
DEFINT J
curS » + CHR$(16)
COLOR fc*, be*
CALL cwind(fc*, be*, 24, 1, 25,
30)
LOCATE 23, 10: PRINT "Use arrow
keys to move cursor Press ESC to
return.";
LOCATE rowstart*, colstart* + 1:
PRINT tiarat it le$ : LOCATE
rowstart*, colfinish* - 8: PRINT
"Value"
Imin* a rowstart*
acol* » colfinish* - colstart*
spac* * dcol* / 2 + 5
row* » rowstart*: col* ¦
colstart*
FOR i » l TO numtitles*
LOCATE TOW*, col*: PRINT
titleSli) ;
LOCATE row*,
PRINT valx(j)
row* - row* + 1:
NEXT j
row* =¦ rowstart*: col* *
colstart*
= "1"
WHILE ASC(y$) <> 27
COLOR fc*, be*
LOCATE row*, col*: COLOR be*,
fc*; PRINT STRINGS(colfinish* -
+	— 9 ii ii \
LOCATE row*/ col*: COLOR be*,
fc*: PRINT titles(row*
rowstart as + 1)
LOCATE row*, col* + spac*:
PRINT valx(row* - rowstart* + 1)
col* + spac*:
CALL getmove(-l, y$, jy*, row*,
col* - 5, cur$, ")
IP ASC{y$) <> 27 THEN
IP LEN(ys} * 2 THEN
LOCATE row*, col*: COLOR fc*.
be*: PRINT STRINGS(dcol* - 2, b
ioCATE row*, col*: PRINT
titles(row* - rowstart* + l)
LOCATE row*, col* + spac*:
PRINT valxfrow* - rowstartaf + l)
IF RIGHTS (y$, 1) » f,P" THEN
CALL movecursor(-1, row*, co1%
-	5, "D", 1, 1, 0, 0)
IF row* > rowfinish* THEN row*
¦ rowstart*
ELSEIF RIGHTS(y$, 1} = "H"
THEN •
CALL movecursor(-l, row*, col*
-	5, "U'\ 1, 1, 0, 0}
IF row* < rowstart* THEN row* =
rowfinish*
ELSE
dirS ¦ ""
END IF
ELSE
LOCATE row*, col* + spac*:
COLOR be*, fc*: PRINT
STRINGS(10, " ");
COLOR fc*, be*
CALL getdata(x$, yS, row*, col*
+ spac* + 1)
valxfrow* - rowstart* +1) <=
VAL(xS)
COLOR fc*, be*
LOCATE row*, col* + spac*:
PRINT STRINGS(10, " ");
LOCATE row*, col* + spac*:
PRINT valx(row* - rowstart* +
1);
END IF
END IF
WEND
END SUB
DEFSNG E. R
SUB gasclean (pthvac) STATIC
REDIn x(5), titles(5)
formtitleS ¦ "Air cleaner"
titleS{l) a "Operating
efficiency *"
* I1 ~ Pthvac) * 100
CALL rorm(mon*, fc*, bc%,
title$(), "Item", 1, x( ) , 12,
12, 10, formtitleS)
pthvac » (100 - x(l)) / 100
COLOR fc*, be*
END SUB
DEFINT E, R
SUB gconfig (monS, mon*) static
OPEN "I", 1, "CONFIG.IND"
CLOSE 1
OPEN "I", 1, "CONFIG.ind"
INPUT #1, mon$
INPUT #1, mon*, xaxismin*,

-------
xaxismax*, yaxismin*, yaxismax*,
xstep*, ystep*
FOR 1 ¦ 0 TO 10: INPUT #1,
coir* ( f) : NEXT j
CLOSE 1
IP mon$ - "MON" THEN
be* « 0
fc* ¦ 15
ELSE
be* » 3
fc* » 8
END IP
CLOSE
END SUB
DEFSNG E, R
SUB getchr (y$) STATIC
y$ - INKEY$
WHILE V$ » ""
yS - tNKEYS
WEND
END SUB
Si]
DEFINT E, R
SUB getrooms (nrooms*, jnplot*,
1room*()) STATIC
DEFINT J
PRINT "Plot a limited number of
rooms "
PRINT
PRINT "Please enter the rooms
you want to plot, enter end when
done";
PRINT
a$
IILE a$ <> "end"
errflag* ¦ -1
WHILE errflag* - -1
m ""
LINE INPUT a$
IF a$ ¦ "END" THEN a$ - "end"
IF a$ <> "end" THEN
IF VAL(a$) > nrooms* THEN
PRINT '"ERROR. ERROR"
PRINT "There are only
nrooms*; " rooms allowed"
ELSE
errflag* ¦ 0
IF VALlaS) >» 0 THEN
jroomM) ¦ VAL(a$)
!nd ip+ 1
IF j > nrooms* + 1 THEN
j ¦ nrooms* + 1
a$ - "end"
END IF
END IF
ELSE
errflag* - 0
E^D*I^ ~ 1
WEND
WEND
jnplot* ¦ j
END SUB
SUB gfile (filenames) STATIC
LOCATE 12, 12: PRINT "Please
enter file name w/o extension."
LOCATE 13, 12: PRINT "Type DIR
for directory. 11
LOCATE 14, 12: PRINT "Enter Q to
return."
LOCATE 15, 12: PRINT STRINGS(20,
II II \
LOCATE 15, 12: LINE INPUT
filenames
LOCATE 16, 12
END SUB
DEFSNG E, R
SUB ghvac (newl*, fracton,
thvac, ambair, opcyc, volume)
STATIC
REDIM x(5), title$(5)
newl* * 2
formtitle$ - "HVAC"
title$(l) » "Operating flow air
changes/nr"
titles(2) » "* Makeup air"
title$(3) » "Fraction of time on
(0-1)*
title$(4) ¦ "Volume m3"
¦ thvac: x(2) ¦ ambair:
¦ fracton: x(4) = volume
form(mon*, fc*, be*,
titles(), "Item", 4, x(), 12,
15, 10, formtitle$)
thvac - x(l): ambair »• x(2):
fracton * x(3) : volume * x(4)
COLOR fc*, be*
END SUB
DEFINT E, R
SUB help STATIC
CLS
COLOR fc*, be*
CLS
j » °
OPEN "I", 1, "Help.ind"
IF erflag* » -1 THEN
erflag* * 0
ELSE
WHILE NOT EOF(1)
INPUT #1, a$
$RIN^ aS1
IP 1 > 20 THEN
LOCATE 25, 2: PRINT "press any
key to continue.";
CAiiL getkey(y$, y*)
j ¦ °
LOCATE 1, 1
END IF
WEND
LOCATE 25, 1: PRINT "Press any
key to return to program";
CALL getkey(y$, y*)
CLS
LOCATE 1, 1
CLOSE
END IF
END SUB
A-13

-------
hflow (roomnr*, vin, vout,
case$) STATIC
REDIM X(2),	(2)
CALL windmake (mon*, fc*, be*,
10,	35, 16, 78, -1)
title$(l) ® "Air entering from
HVAC"
title$(2) ¦ "Air leaving to
HVAC"
x(l) ¦ vin
x(2) - vout
ftitleS • "[Define HVAC Case] "
+ cases
CALL formw(titleS(), 2, x(), 10,
11,	41, 75, ftitles)
vin » x(l): vout ¦ x(2)
CALL cwind(fc*. be*, 10, 35, 16,
78 )
END SUB
SUB highlight (row*,
titleS) STATIC
col*,
PRINT
COLOR be*, fc*
LOCATE row*, col*:
STRINGS(LEN(titles) , " ");
LOCATE row*, col*: PRINT titleS;
COLOR fc*, be*
END SUB
REM SSTATIC
DEPINT E, R
SUB house STATIC
OPEN "I", 1, "CONFIG.ind"
INPUT #1, monS
INPUT #1, mon*, xaxismin*,
xaxismax*, yaxismin*, yaxismax*,
xstep*, ystep*
FOR 1 -  "MONO" THEN
REM draw house
SCREEN 1: WIDTH 40
CLS
LINE (40, 140)-(200, 50), 1, B
LINE 40, 50)-(120, 15). 1
LINE (200, 50)-(120, 15 $, 1
PAINT (105, 43), 2, 1
LINE (80, ^5)- 100, 60), 1, B
PAINT (125, 60), 2, 1
LINE (110, 140)-(130, 100), 1, B
PAINT (124, 60), 2, 1
COLOR 1,3
LOCATE 11, 7: PRINT " Indoor air
model ";
LOCATE 12, 7: PRINT "V. 1.2
5/2/88 ";
LOCATE 13, 7: PRINT " By LES
AEERL-RTP ";
LOCATE 10, 28: PRINT "Press
LOCATE 12, 28: PRINT "key to
LOCATE 14, 28: PRINT "continue."
WHILE INKEYS = "": WEND
END IF
CLS
REM screen 0:width 80
REM color fc*,bc*
END SUB
REM $DYNAMIC
DEFSNG E, R
SUB hvac (newl*, fracton, thvac,
ambair, cO, opcyc, pthvac,
volume, nrooms*, van(), vout())
STATIC
REDIM title$(10), bal(nrooms*)
newl* * 2
startrow* * 9: newrow* = l;
started* * 30: nummtitle* = 5:
titleS(l) ¦ "eneral
Description"
title$(2
Cleaning
titles|3|
I
"Define
 ir
"Define ources"
» "Define room
titleS
lows"
titles(5) * "uit"
menutitleS ¦ "Menu for HVAC"
CO * 0
choice* * 0
newrow* » 1
WHILE choice* < 5
startrow* * newrow* + 8
IF startrow* >13 THEN startrow*
¦ 13
okS » "GASFQ"
CALL menu ( f c*, be*, ok$ ,
title$(), startrow*, newrow%,
startcol*, nummtitle*,
menutitleS, choice*)
newrow* = choice*
SELECT CASE choice*
CASE 1
CALL ghvac(nl*, fracton,
thvac, ambair, opcyc, volume)
CASE 2
CALL gasclean(pthvac)
CASE 3
CALL hvacsourc(ktype*)
CASE 4
CALL inter(0, nrooms*,
vin(), vout())
CALL sbalance(vin(),
bal(), nrooms*)
CASE ELSE
END SELECT
WEND
END SUB
DEFINT E, R
SUB hvac2 (fracton, ncycles*,
Ihv, rs*, ptnvac, pt) STATIC
IF ncycles* <= 0 THEN
A-14

-------
hvon* » fnhvon(fracton,
ncvcles*)
IF hvon* ¦ 1 THEN
ncycles* = 15
jnv * 1
ELSE
jhv = 0
ncvcles* =» 2
END IF
IF jhv » 0 THEN
rs* * 1
pt ¦ 1
ELSE
rs* « 0
pt ¦ pthvac
END IF
ELSE
ncycles* * ncycles* - 1
END IF
IF jhv » 1 THEN rs* ¦ 0 ELSE rs*
=* 1
END SUB
DEFSNG E, R
SUB hvacsourc (j*) STATIC
CLS
PRINT "Define source in hvac"
PRINT "Select type of source"
PRINT " l. Constant rate ¦
20mg/hr"
PRINT "2. 0 if conc>5 mg/m3 30
if conc<5 mg/m3"
PRINT "3. No source"
PRINT
PRINT "Press key corresponding
to your selection."
y$ » INPUTS(1): j* - VAL(y$)
END SUB
SUB ind87
SHARED vhvacin(). vhvacout()r
varabin(), vambout()
SHARED outmenu$(), time(),
tmax*, pconc(), nrooms*,
plotmenu$()
SHARED nmenu(), cone
newrow* 3 l
subitems*(l) = nrooms*
startrow* =¦ 8: startcol* ¦ 30
nummtitle* » nmenu(l)
choice* » 1
newrow* = l
calcflag* » 0
caicriagss » o
menutitleS ® "Main control
menu*
WHILE choice* <> naenu(l)
REM goto 999
IF newrow* > 6 THEN newrow* =» 6
okS » "ECOPSQ"
CALL menu(fc*, be*, ok$,
mainmen$(), startrow*, newrow*,
startcol*, nummtitle*,
menutitleS, choice*)
newrow* » choice*
SELECT CASE choice*
CASE 1
newrow* » 2
selectl* * 0
nrow* « 1
WHILE selectl* <> nmenu(2)
ok$ » "PBHORSGQ"
CALL menu(fc*, be*, ok$,
inmenu$(), 9, nrow*, startcol*,
nmenu(2), "Data Input",
selectl*)
SELECT CASE selectl*
CASE 1
CALL defpol
nrow* * selectl*
CASE 2
CALL building(nrooms* ,
ventotal, newrow*)
subitems*(l) * nrooms*
nrow* ¦ selectl*
CASE 3
CALL hvac(newrow*, fracton,
thvac, arabair, cO(0), opcyc,
pthvac, volume(O), nrooms*,
vin(), vout())
sum m 0
FOR i « 1 TO nrooms*: sum =
sum + vin(0, j, 1): NEXT j
vambin(0, 1) « sum * ambair
/ 100
vambout(0, 1) »vambin(0, 1)
nrow* * selectl*
CASE 4
CALL outside(cone, newrow*)
nrow* * selectl*
CASE 5
CALL sroom
nrow* * selectl*
CASE 6
nrow* « selectl*
CALL storedat(nrooms*,
pollutant*)
nrom* ¦ 6
CASE 7
nrow* ¦ selectl*
CALL readdat(nrooms*,
pollutant*, "")
subitems*(1) * nrooms*
nrow* - selectl*
CASE ELSE
selectl* ¦ nmenu(2)
END SELECT
WEND
newrow* - 2
CASE 2
newrow* * 3
hour ¦ 0
CALL calculate
newrow* * 3
CASE 3
selectl* ¦ 0
nrow* - 1
WHILE selectl* <> nmenu(3)
OkS » "DWPQ"
CALL menu(fc*, be*, ok$,
outmenu$(), 10, nrow*,
startcol*, nmenu(3), "Output
options", selectl*)
SELECT CASE selectl*
CASE 1
CALL displ(time(), tmax*,
pconc(), nrooms*, volume())
A- 15

-------
nrow* = selectl*
CASE 3
CALL lpmt (time() , tmax*,
pconc(), nrooms*]
nrow* * selectl*
CASE 2
CALL fileit(time(), tmax*,
pconc(), nrooms*}
nrow* * selectl*
CASE ELSE
selectl* ¦ nmenu(3)
END SELECT
WEND
newrow* * choice*
CASE 4
IF mon$ « "MONO" OR mon$ »
"mono" THEN
CLS
BEEP
PRINT
PRINT
PRINT "Graphics not available
with monochrome"
PRINT "Press any key to
return"
CALL getkey(y$, y*)
ELSE
selectl* » 0
nromw* ¦ l
WHILE selectIX <> nmenu(4)
okS * "PSGQ"
CALL menu(fc*, be*, ok$,
plotmenu$(), 10, nronw*,
started*, nmenu(4), "Plot
options", selectl*)
nromw* 3 select1*
SELECT CASE selectl*
CASE 1
IF tmax* > maxpoints THEN
tmax* 3 maxpoints
CALL plotem(time(),
pconc(), tmax*, nrooms*)
SCREEN 0
WIDTH 80
COLOR fc*, be*
CASE 2
CLS
IF tmax* > maxpoints THEN
tmax* » maxpoints
CALL plotroom(time(),
pconc(), tmax*, nrooms*)
SCREEN 0: WIDTH 80
COLOR fc*, be*
CASE 3
CALL retriveit(time(),
tmax*, pconc())
CASE ELSE
selectl* » nmenu(4)
END SELECT
WEND
END IF
newrow* » choice*
CASE 5
CALL setupl(-l)
CASE ELSE
END SELECT
WEND
END SUB
DEFINT E, R
SUB init2 STATIC
SHARED vhvacin(), vhvacout(),
nmenu(), mainmen$(), maxrooms*
DEFINT J
FOR 1* ¦ 1 TO maxrooms*:
vhvacfnM*, 0) *0: vhvacout(j*,
0) - 0: NEXT j*
calstep* ¦ 10
prntstep* » 30
j - 1
nmenu(l) - 0
WHILE nmenu(l) ¦ 0
"end" THEN
READ mainmen$(1)
IF mainmen$(j)
nmenu(l) * j - 1
Aend^ + 1
END SUB
SUB inout (a$) STATIC
SHARED nrooms*, vin(), vout()
REDIM t(10) AS INTEGER,
f out(nrooms*), f in{nrooms*)
t(l) ¦ 7: FOR 1 « 2 TO nrooms*:
m	~ 7: WW d
CLS : SCREEN 0:
COLOR fc*, be*
PRINT "Input data for run"
PRINT "Number of rooms ";
nrooms*
FOR jc » 1 TO 2
PRINT "Room flows for case jc
PRINT "Room # ";
FOR j « 1 TO nrooms*: PRINT
TAB (t ( 1) ) ; j ; : NEXT j : PRINT
"Total"
FOR 1 ¦ 1 TO nrooms*
PRINT j;
fin(1) - 0
fout(J) - 0
FOR 1c 3 1 TO nrooms*
IF k <> j THEN
fin(j) - vin{j, k, jc) +
fin(j)
f out (j ) » vout (j , k, j c) -t-
fout(1)
PRINT TAB (t (k) ) ; : PRINT
USING a$; vin(j, k, jc);
ELSE
PRINT TAB (t (k) ) ; " —" ;
END IF
NEXT k
PRINT USING a$: fin(j)
NEXT 1
FOR j ¦ 1 TO nrooms*:
PRINT TAB(t(j)); : PRINT USING
a$; fout(i); :
NEXT j
PRINT
PRINT "Bal ";
FOR 1 ¦ 1 TO nrooms*:
PRINT TAB(t(1)); : PRINT USING
a$; fin(j) - fout{j);
A-16

-------
NEXT j
PRINT
PRINT "Press any key to
continue"
CALL getkey(y$, y*)
CLS
NEXT 1c
END SUB
DEFSNG E, R
SUB inter (roomnr*. nrooms*,
vin(), vout()) STATIC
REDIM r2*(nrooms*)
IF roomnr* * 0 THEN rowmax*
¦ nrooms* + 7 ELSE rowmax* *
nrooms* + 6
CLS
CALL windmake(mon*, fc*,
be*, 3, 3, rowmax* + 5, 75, 0)
LOCATE 4, 5
PRINT USING " Enter data
for air entering and leaving
room ### m3/hr"; roomnr*;
PRINT
LOCATE 25, 1: PRINT
STRINGS(80, " ");
LOCATE 25, 10:
PRINT "Use arrow keys to
move cursor. Press  to
return";
col* « 5: row* ¦ 7
LOCATE row* - 2, 30:
PRINT "HVAC on"; TAB(40);
"Hvac Off"; TAB(50); "HVAC on'1;
TAB(60); "Hvacoff"
LOCATE row* - 1, col*:
PRINT "Room number";
TAB(30); "Air entering from";
TAB(50); "Air exiting to";
LOCATE row*, col*: PRINT
TAB(30); "m3/hr "; TAB(50);
"m3/hr";
row* ¦ 8
k* ¦ 1
IF roomnr* * 0 THEN jstart*
« 0 ELSE istart* - 1
FOR j* ¦ jstart* TO nrooms*
IF 1* <> roomnr* THEN
r2*(k*) - 1*: k* - k* + 1
LOCATE row*, col*, 0:
PRINT j*; T?AB(30);
vinfroomnr*, 1*, 1); TAB(40);
vin(roomnr*, 1*, 0);
PRINT if A B ( S 0 ) ;
vout (roomnr*, ¦)*, 1); TAB(60);
vout(roomnr*, j*, 0)
row* ¦ row* + l
END IF
NEXT j*
row* ¦ 8
COLOR be*, fc*: LOCATE row*,
COl*, 0: PRINT STRINGS(65, " ");
LOCATE row*, 5:
PRINT r2* (row* - 7);
TAB(30); vin(roomnr*, r2*(row* -
7), l); TAB(40); vin(roomnr*,
r2*(row* - 7), 0);
PRINT TAB(50); vout(roomnr*,
r2*(row* - 7), 1); TAB(60);
vout(roomnr*, r2*(row* - 7), 0);
y* - 0
col* » 30
LOCATE row*, col*
WHILE y* <> 27
LOCATE row*, col*, 1
CALL getkev(Y$. y*)
IF y*<> 27 THEN
IF LEN(yS) « 2 THEN
y$ » RIGHTS(y$, 1)
SELECT CASE y$
CASE "M"
SELECT CASE col*
CASE 40
col* * 50
LOCATE row*, col*, 1
CASE 60
col* « 30
LOCATE row*, col*, 1
CASE 50
COl* ¦ 60
LOCATE row*, col*, 1
CASE 30
COl* * 40:
LOCATE row*, col*, 1
CASE ELSE
END SELECT
CASE "K"
SELECT CASE col*
CASE 60
col* ~ 50
LOCATE row*, col*, 1
CASE 50
col* * 40
LOCATE row*, col*, 1
CASE 40
COl* * 30
LOCATE row*, col*, X
CASE 30
COl* « 60
LOCATE row*, col*, 1
CASE ELSE
END SELECT
CASE "P"
col* * 30
COLOR fc*, be*: LOCATE rowi, 5,
0: PRINT STRINGS(65, " ");
LOCATE row*, 5:
PRINT r2*(row* - 7); TAB(30);
vin(roomnr*, r2*(row* - 7), 1);
TAB(40); vin(roomnr*, r2*(row* -
7)' 0)
PRINT TAB(50); vout(roomnr*,
r2*(row* - 7), 1); TAB(60);
vout(roomnr*, r2*(row* - 7), 0);
IF row* < rowmax* THEN row& =
row* + 1 ELSE row* » 8
COLOR be*, fc*: LOCATE row%, 5,
0: PRINT STRINGS(65, " ");
LOCATE row*, 5:
PRINT r2*(row* - 7); TAB(30);
vin(roomnr*, r2*(row* - 7), l);
TAB(40); vin(roomnr*, r2*(row* -
A-17

-------
7) ' °i;R INT T A B ( S 0 ) ;
vout (roomnriK, r2*(row* - 7). 1);
TAB(60): vout(roomnr*, r2*(row*
" 7) , 0) >'
CASE "H"
col* = 30
COLOR tc%, be*: LOCATE
row*, 5, 0: PRINT STRINGS(65, "
") ;
LOCATE row*, 5:
PRINT r2*(row* - 7);
TAB(30); vin(roomnr*, r2*(row* -
7), 1); TAB(40);
PRINT vin (roomnr*, r2*(row*
-	7), 0); TAB(50); vout(roomnr*,
r2*(row* - 7), 1); TAB(60);
PRINT vout(roomnr*,
r2*(row* - 7) , 0);
IF row* > 8 THEN row* -
row* - l ELSE row* * rowmax*
COLOR be*, fc*: LOCATE
row*, 5, 0: PRINT STRINGS(65, "
*' LOCATE row*, 5:
PRINT r2*(row* - 7);
TAB(30); vin(roomnr*, r2*(row* -
7), 1): TAB(40);
PfclNT vin (roomnr*, r2* (row*
-	7), 0); TAB(50); vout(roomnr*,
r2*(row* - 7), 1); TAB(60);
PRINT vout(roomnr*,
r2*(row* - 7), 0);
CASE ELSE
END SELECT
EZiSE
LOCATE row*, col*, 0: PRINT
n	n .
CALL getdata(ans$, y$,
row*, col*)
SELECT CASE col*
CASE 30
vin(roomnr*, r2*(row*
7) , 1) « VAL(ans$)
COLOR be*, fc*: LOCATE
row*, col*: PRINT STRINGS(10, "
");
LOCATE row*, col*, 0:
PRINT vin(roomnr*, r2*(row* -
7), 1);
CASE 50
COLOR be*, fc*: LOCATE
row*, col*: PRINT STRINGS(10, "
) 9
vout(roomnr*, r2*(row* -
7), 1) - VAL(ansS)
LOCATE row*, col*, 0:
PRINT j vout (roomnr*, r2*(row* -
CASE 40
vin(roomnr*. r2*(row*
7), 0) = VAL(ansS j
COLOR be*, fc*: LOCATE
row*, col*: PRINT STRINGS(9, "
LOCATE row*, col*: PRINT
vin(roomnr*, r2*(row* -7), 0);
CASE 60
vout(roomnr*, r2*(row* - 7),
0) = VAL(ans$)
COLOR be*, fc*: LOCATE row*,
col*: PRINT STRINGS(9, " " );
LOCATE row*, col*: PRINT
vout(roomnr*, r2*(row* - 7), 0) ;
CASE ELSE
END SELECT
END IP
END IF
COLOR fc*, be*
WEND
CLS
REM now set vin(i,j)=vout(j,i)
and vout(i,j)»vin(j,i)
FOR jk* » 0 TO 1
FOR 1* « 1 TO nrooms*
IF 3* <> roomnr* THEN
voutM*, roomnr*, jk*) =
vin(roomnr*, j*, jk*)
vin(j*, roomnr*, jk*) =
vout(roomnr*, j, jk*)
END IF
NEXT j*
NEXT Ik*
JB
END SUt
btu, onl,
on3, off3)
SUB kheatdef (ss,
offl, on2, of r2,
STATIC
REDIM x( 8), title$(8)
CALL winamake(mon*, fc*, be*,
10 39 19 79 -1 1
LOCATE' 9?' 41: PRINT "Define
K-heater source strength ";
titles(1) - "mg/KJ"
• ""Size of heater
titles 2)
KJ/hr"
titles(3)
titlei(4)
titles(5)
title$(6.
titles 7
titles(8!
X(1) * ss
x(2) ¦ btu
X (3) » onl:
on2 : x ( 6 j
)f t
"Time on 24 hr"
"Time off 24 hr"
"2nd time on"
"2nd time off"
"3rd time on"
"3rd time off"
x( 8)
of f 3
X( 4) =
' ofr2:
Offl: X ( 5 ) =b
x ( 7 ) * on3:
CALL formw(titles () , 3, x(), io,
17, 41, 75, "[Define
leat ] "
ss * x (1) : btu ¦ x ( 2 )
onl • x(3) : on2 = x(5): on3 *
x( 7)
Offl ¦ X(4): off2 = X(6): aff3 =
x( 8)
CALL cwind(fc*, be*, 9, 39, 19,
79 )
END SUB
DEFINT E, R
SUB lprnt (time(), tmax*,
concentration(), nrooms*) STATIC
SHARED xmassout, xmassemit,
sinkmass, rsinkmass!()
lne* - 0
A-18

-------
CLS
CALL massin(concentration(),
nrooms^, volumef), xmass, tmax*)
CLS
Be
PRINT "Hardcopy routine,
sure printer is ready."
LPRINT "Cumulative results "
LPRINT USING "Cumulative mass
emitted	#,######.# mg";
xmassemit
LPRINT USING "Cumulative mass to
mg
M .
outdoors #,######.#
xmassout
LPRINT USING "Mass inside at end
of run #,######.# mg xmass
USING "Cumulative
sink
#,######.# mg ";
LPRINT
mass
sinkmass
LPRINT USING "* accounted for
##.###* (xmassemit -
(xmassout + xmass + sinkmass)) /
xmassemit * 100
CLS
lne* = 0
LPRINT "results of indoor air
calculations"
LPRINT "Day Time(hrs)
Room
Concentration"
FOR j « 1 TO tmax* - 1
IP INKEYS » CHRS(27) THEN EXIT
FOR
hr » time(i) • 2.77778E-04
dayp* ¦ INT(hr - 24) / 24 + 1:
IF davp* <=* 0 THEN dayp* » 1
LPRINT USING "##	*
da^pS, time(g)_* 2.77778E-04;
###.##"; END SUB
FOR room*
TO nrooms*
LPRINT TAB(30) : room*; TAB(50);
LPRINT USlflG "###. ###'';
concentration(1,
NEXT room*
lne* = lne* + 3
NEXT 1
END SUB
room*, j)
REM $STATIC
SUB massbal (deltat, second, hr,
rs*, strength(), dmass,
concan(), vambout(), jhv,
dambout, ds inkmass)
REM subroutine to calculatemass
balances
SHARED nrooms*, rsinkmass!()
SHARED ssource(), xnsource(),
§ambin()
HARED sourcesSO, nsources*(),
sinks(), nsinks*(), volumej).
floor(), xr () ,
emis2!(),
SHARED area(),
xc ( )
SHARED pollutant*,
snk2(), remis2!()
dambout * 0
dmass - 0
dsinkmass * 0
ddt - deltat * 2.7778E-04
FOR j » rs* TO nrooms*
dmass = dmass + emis2!(j)
dambout = dambout +
concen(l, j) * vambout(j, jhv) *
ddt
rsinkmass!(i) =
rsinkmass!(j) + snk2(j)
remis2! (j)
dsinkmass » dsinkmass +
rsinkmassl(j)
NEXT 1
END SOB
REM $DYNAMIC
SUB massin (conM, nrooms*,
volume(), xmass, t*) STATIC
xmass = 0
FOR j ¦ 0 TO nrooms*: xmass =
xmass + volume(j) * con(l, j,
t*): NEXT j
END SUB
SUB menuin (al$(), n*) STATIC
DEFINT J
j " 1
a$ a ""
WHILE a$ <> "end"
READ a$
IF a$ <> "end" THEN
al$(1) « a$
e!d"ip * 1
WEND
n* « ^ 1
DEFSNG E, R
SUB moth (ss, gms) STATIC
REDIM x(2], titles(2)
CALL windmake (mon*, f c*, be*,
10, 40, 15, 78, -1J
LOCATE 9, 41: PRINT "Define moth
crystal source strength";
title$(l) ¦ "Source
mg/cm2/hr"
xTl) ¦ ss
x(2) ¦ gms
titled(2)
factor
"Area of crystal
CALL formw(titles(
11, 41, 75 ,
mothcrystal")
ss =* xt l)
?ms ¦ x(2)
ALL cwlnd(fc*, be*,
78)
END SUB
2, x(), 10,
" [Define
9, 40, 15,
SUB other2def (a, B, c, d, ss)
STATIC
REDIM x(5), title$(5)
CALL windmake (mon*, fc*, be*,
10, 40, 18, 77, -1)
LOCATE 9, 4 1: PRINT
"Source«a+b»s+c*exp(d*s) Enter
a, b, c, d, s " ;
A-19

-------
x( 1) - a: x(2)
x( 4) = d
titles (1) * "a"
B: X(3)
c:
(1)
titles(2)
titles(4
titles(5
"b": titles(3) = "c"
"d"
"s, source strength"
x(5) * ss
CALL formw(titleS( ) , 5, x( ) , 12,
16, 42, 75, "User source")
a » x(l): B » x(2): c ¦ x(3): d
¦ X(4): ss * X(5)
CALL cwind(fc*, be*, 10, 40, 18,
17)
END SUB
SUB otherdef (ss) STATIC
REDIM x(lT, tltle$(1)
CALL windmake(mon*, fc*, be*,
10, 40, 15, 77, -1)
LOCATE 9, 42: PRINT "[Define
other source]";
titleS(l) » "Source strength
mg/hr"
xTl) » ss
CALL formvi( titles () , 1, x(), 10,
10, 41, 75, "Define other")
ss * x(1)
CALL cwind(fc*, be*, 9, 40, 15,
77)
END SUB
SUB outside (concen, newl*)
STATIC
SHARED pollutants(), pollutant*
REDIM x(1), titles(1)
newl* * 3
CLS
title$(l)
pollutants(pollutant*) + "
concentration mg/m3"
x(l) « concen
CALL form(mon*, fc*, be*,
titles() , "Item", 1, x(), 12,
12, 10, "Outdoor
concentrations")
concen » x(l)
COLOR fc*, be*
END SUB
DEPINT E, R
SUB plotroom (x(), z{), tmax*,
nrooms*) STATIC
DEFINT J
REDIM jroom(nrooms* + 1)
REDIM y(tmax*)
CALL getrooms(nrooms*, jnplot,
jroomO )
errflag* = 0
CLS
PRINT "Setting up plot"
yymin » 1E+29
yymax » -1E+29
xxmax 3 1E+29
alog =¦ LOG(10)
FOR jk = 1 TO jnplot
FOR j » 1 TO tmax*
.)) y(J} - L0G(2(1, jroom(jk),
NEXT j
xmax =» x (tmax35) : xmin = x (1)
IF xmax < xxmax THEN xxmax =
xmax
CALL findmax(y(), ymax, ymin,
tmax*)
IF ymax > yymax THEN yymax =
J max
F ymin < yymin THEN yymin =
ymin
IF xmax > xxmax THEN xxmax =
xmax
IF xmin < xxmin THEN xxmin »
xmin
NEXT jk
IF colr*J 2) > 1 THEN SCREEN 9
ELSE SCREEN 2
WIDTH 80
ymax * INT(yymax + .999)
ymin =» INT(yymin)
xmax * xxmax
xmin * xxmin
FOR j* - 1 TO jnplot
FOR k ¦ 1 TO tmax*
v(k) - LOG(z(1, jroom(j), k))
/ alog
NEXT k
CALL plot(x(), y( ) , tmax*,
xmax, xmin, ymax, ymin,
jroom(j))
LOCATE 25, 10: PRINT "Room ";
jroom(j*); " press any key to
continue";
CALL getkey(y$, y*)
NEXT j*
SCREEN 0
END SUB
SUB pollution (waxl, wax2, wax3,
wax4, wtimel) STATIC
SHARED sstrength ( ) ,
pollutants(), pstrength()
REDIM wax5(10)
REM pstrength()*default strength
source,pollutant
REM SET UP POLLUTANT SOURCE
STRENGTHS FOR VARIOUS SOURCES
OPEN "I", 1, "Pollutio.dat"
FOR j « 1 TO 6: INPUT #1,
pollutants(j) : NEXT j
FOR j - 1 TO 6: FOR jk » 1 TO 5
INPUT #1, pstrength(j, jk): NEXT
1k: NEXT f:
FOR 1 - 1 TO 10: FOR 11 ¦ 1 TO
6: FuR jk ¦ 1 TO 5: sstrengthM,
' j Jk'
INPUT #1, waxl, wax2, wax3,
wax4, wax5, wtimel
CLOSE
END SUB
DEFSNG E, R
SUB rdef (volume, area, floor)
STATIC
REDIM x(4), titleS(4)
A-20

-------
CALL windmake (nonX, fc*, be*,
10, 45, 17, 78, -1)
LOCATE 9, 46: PRINT "Define room
s Izg 11 '
title$(1) = "Length m "
titles(2 » "Width m "
titles 3 » "Height n "
title$(4) » "Volume m3
x(4) »
X (3) - 2.44
*ll\
i)
volume
2.44
SQR(volume / 2.44)
x(2)
CALL formr(titles(), 4, x() , 10,
13, 45, 78, "Define Room")
volume * x(4):
IF ABS(volume - (x(l) * x(2) *
x ( 3) ) / volume) > .001 * volume
THEN
x(3) * 2.44*assume 8 ft high
room (2.44 meters)
x(l) - SQR(volume / 2.44):
x (2) ' x (1)
END IF
area » x(3) » 2 * (x(l) + x(2))
floor * x(1) * x(2)
CALL cwind(fc*, be*, 9, 45, 17,
78)
END SUB
SUB readdat (nroomsSK,
SoHutant*, filenames) STATIC
HARED cone, sinkst, ventotal,
thvac, ambair, fracton,
fartcont, orgcont, sourcesS()
HARED nsources*(), sinks(),
nsinksS! ( ) , sstrength(),
xnsource(), nsmokers*()
SHARED volume(), cOI), area(),
floor!) , vin(), voutn
SHARED vhvacin(), vhvacout(),
varabin(), vambout()
SHARED waxl(), wax2(), wax3(),
wax4(), wax5(), wtimel()
SHARED deltain, prntstep*,
maxdays*, hrsday
SHARED xc () , xr ()
OLS
IF filenames - ,,n THEN
CALL windmake(mon*, fc*, be*,
10, 10, 20, 60, 0)
dz ¦ -1
DO
LOCATE 11, 12:
PRINT "Read data from file";
LOCATE 1, 10: PRINT "Available
files
FILES
<•&
ron"
CALL gfile(filenames)
rile!	~
IF filenames
filenames * "Q"
IF filenames - "Q"
n
THEN
THEN EXIT SUB
OR
IF filename$ - "DIR"
filenames ¦ "dir" THEN
LOCATE 1, 10: PRINT "Available
files
FOR j » 2 TO 9: LOCATE j, 1:
PRINT STRINGS(79, " ");
NEXT j
FILES "*.rom"
ELSE dz « 0
END IF
LOOP UNTIL dz * 0
IF INSTR(filenames, " .") = 0
THEN filenames = filenames +
".rom"
END IF
erflag* » -1
WHILE erflag* = -1
erflag* * 0
OPEN "i , 1, filenames
IF erflag* ¦ -1 THEN
LOCATE 24, 24: PRINT "ERROR in
opening file. Reenter file name
DO
CALL gfile(filenames)
THEN
"Q" THEN EXIT
» "dir" THEN
IF. filenames
filenames - "Q"
IF filenames 1
SUB
IF filenames =
filenames » "DIk"
IF filenames = "DIR" THEN
FILES "*.rom"
ELSE dz » 0
END IF
LOOP UNTIL dz » 0
IF INSTR(filenames, ".") - 0
THEN filenames = filenames +
".rom"
END IF
WEND
INPUT #1, pollutant*, sinkst,
deltain, prntstep*, maxdays*,
hrsday
INPUT #1, nrooms*
FOR 1 ¦ 0 TO nrooms*:
INPUT #1, cigon(j)
FOR k » 1 TO 3
kheaton(j, k)
cigoff(j)
INPUT #1.
kheatoff(1, k)
INPUT #1,
k)
stoveon(j
stoveoff(1
NEXT k
NEXT 1
INPUT #1,	cone
INPUT #1,	ventotal
INPUT #1.	thvac
INPUT #1,	ambair
INPUT #1,	fracton
INPUT #1,	partcont
INPUT #1,	orgcont
INPUT #1,	cOTO)
INPUT #1,	volume (0)
REM get source data on
FOR ] ¦ 1 TO nrooms*
k)
file
INPUT #1
c0(j), area(
nsources*(j) 1 vo
FOR 11 - l
INPUT #1,
NEXT 11
FOR 11 » 1
INPUT #1,
INPUT #1
volume{j),
floor(j),
and sources
TO nsources*(j)
sourcesS(j, j1)
j),
Iume
TO ns inks*(j)
sinks(j, jl)
, xr(j), xc(j
A-21

-------
REM now do room ventilation
FOR jhv » 0 TO 1
FOR 1 = 0 TO nrooms*
INPUT #1, vambin(j, jhv),
vambout(j, jhv)
FOR 11 « 0 TO nrooms*
IF 1 <> 11 THEN INPUT #1,
vin(j, jl, jhv), vout(j, jl,
iJlSxi jl
NEXT ;
NEXT ;hv
REM now do sources
FOR room* ¦ 1 TO nrooms*
INPUT #1, nsmokers*(room*)
FOR s* - 1 TO 5
FOR p* - 1 TO 6
INPUT #1, xnsource(room*,
s*. p*) , sstrength(room*, s*,
p*)
NEXT p*
NEXT S*
NEXT room*
FOR 1 » 1 TO nrooms*
INPUT #1, waxl(j), wax2
wax3(j), wax4(j) , wax5
wtimel(j)
NEXT j
CLOSE 1
CLS
COLOR fc*, be*
END SUB
DEFINT E R
SUB retriveit (time(), tmax*,
concentration()) STATIC
CLS
PRINT "Retrieve data from file
for plotting "
PRINT "Available files are "
FILES "*.dat"
LINE INPUT "Enter data file name
(Q to return to menu) filenS
13):
IF filen$
IIAII
"q" THEN
"Q" THEN
filen$
IF filen$
EXIT SUB
ELSE
INPUT "Plot
rn*
erflag* * 0
OPEN "i", 1,
IF erflag* ¦
PRINT ,TERROR. File not found"
as room number
filen$ + ".dat"
-1 THEN
erflag* ¦ 0
STOP
EIiSE
INPUT #1, rooms
1* = 1
WHILE NOT EOF(1)
INPUT #1,
concentration(1,
1* • j* + 1
WEND
t ime(j * ) ,
rn*, j*)
CLOSE 1
tmax* 3
END IF
END IF
END SUB
j* - 1
SUB roomcal (rs*, jhv, second,
hr, concen(), sourcflag*(),
pt()» strength(), xmassout,
xmassemit, sinkmass, dtflag*)
SHARED nrooms*, rsinkmass!(),
emav!, emisl!(), emis2!()
SHARED sinks(), nsinks*(),
volume{). snkl(), snk2 ),
remisll{I, remis2!()
REM $DYNAMIC
REDIM cl(maxpollutants, nrooms*]
ct(maxpollutants,
cout(maxpollutants,
• 2.77778E-04
nstep
hrl = hour
concen()
strength
sflag*)
+ h
h
* ti
+ tl
REDIM
nrooms*)
nrooms*)
REDIM ym(10)
nstep = 2
ddt » deltat
h ¦ deltat /
tl ¦ second:
sflag* ¦ 0
emav! ¦ 0
REM first call
CALL concrooa(rs*.
cl () , tl, hrl, jhv*,
pt () , sourcflag*(),
sflag* ¦ l
FOR j ¦ rs* TO nrooms
ym(j) » concen(l, j)
ct(1, j) * concen(1,
cl(l, j)
emis2!(1) » emisl!(j) *
remis2!(j) ¦ remislT(j)
snk2(j) * snkl(j) * h
NEXT j
tl ® second + h: hrl = hour
* 2.77778E-04
CALL concroom(rs*, ct(), cout(),
tl, hrl, jhv*, strength(), pt ( ) ,
sourcflag*(), sflag*)
h2 - 21 * h
FOR k ¦ 2 TO nstep
FOR j * rs* TO nrooms*
xswap » ym(j) + h2 * cout(l, i)
ym!j| - ct(l. j)
ctTl, j) ¦
emis2!(j)
emisl!(j) *
remiszl(1)
remisl!(j ) * h2
snk2(j) = snk2(j) + snkl(j) *
h2
NEXT j
tl ¦ tl + h: hrl = hour + tl *
2.77778E-04
CALL concroom(rs*, ct(), cout(),
tl, hrl, jhv*, strength(), pt(),
sourcflag*() , sflag*)
NEXT k
dtflag* = l
FOR j - rs* TO nrooms*
concen(l, j) ¦ .5 * (ym(j) +
{V
xswap
h2
emis2!(j)
remis2!(j)
A- 22

-------
ct(i, Jl+.h
sn£2(^) =
cout(1
,5 * la
snk^\;))
+ h
h *
h
*	snkl(j ) .
erais2!(i) = (emis2!(j
emisl!(j)) * 1.388889E-04
remis2!(j) =» (remis2!(j) +
*	remisl! ( j ) ) * 1.388889E-04
IF ABS(vm(j) + ct(1, j)) >
100000! THEN
dtflag* ¦ -1
EXIT FOR
END IP
NEXT 1
END SUB
SUB sbalance (vin()
nrooms*) STATIC
DEFINT J
vtin » 0: vtout » 0
FOR i * 1 TO nrooms*
bal<)
jk
F0i5
IF
vtln •
vtout
vtout
END IF
NEXT jk
bal(j) -
vtin * 0
NEXT 1
2ND SUB
<>
1 TO nroofflsX
jk THEN
vin( j
= vm
Jk.
°]
vtin
0) +
vtin -
vtout
vtout
¦ 0
SUB scale (pollutant*, scalel)
STATIC
SELECT CASE pollutant*
CASE 1
scalel * 1.5
CASE 2
scalel « 800
CASE 3
scalel * 1000
CASE 4
scalel * 500
CASE 5
scalel * 50
CASE S
scalel » 10
CASE ELSE
END SELECT
END SUB
DEFSNG E, R
SUB setup (menudat$(),
nchoices*, subitems*{)) STATIC
DEFSTR M
DEFINT J
j* » 1
m - ""
DO UNTIL m » "end"
READ m
IF m <> "end" THEN
menudat (j as, 0) * m
j* » j* + 1
END IF
LOOP
nchoices* » i* - 1
1-1:
FOR j* » 1 TO nchoices*
if ii
¦ 1
DO UNTIL m - "end"
READ m
IF m <> "end" THEN
menudat(j*, i) ¦ m
i « i + 1
ELSE
subitems*(j*) =1-1
END IF
LOOP
NEXT j*
END SUB
DEFINT E, R
SUB setupl (cflag*) STATIC
SHARED deltain, prntstep*,
maxrooms*, maxsources*
SHARED maxtimes*, maxdays*,
hrsday, sinkst
x(9 ]
THEN
10
"Deltat"
"Print step"
"Max rooms"
"Maxsources"
"Maxtimes "
"Max days"
> 1 THEN title$(7) =
REDIM title$(9),
IF cflag* - -99
maxrooms* = 10
maxsources* » 5
maxtimes* * 740
maxdays* ¦ 1
hrsday ¦ 24
deltain * 25
prntstep*
ELSE
titles(1)
titles(2)
titles 3;
titles 4
titles 5
title$(61
IF maxdays* 	 	
"Hours per day" ELSE title$(7) =
"Maxhours"
x(l) « deltain: x(2)
CSNG(prntstep*)
x(3) ¦ CSNG (maxrooms*) -. x( 4
CSNG(maxsources*): x(5)
CSNG(maxtimes*)
x(6) ¦ CSNG(maxdays*): x
hrsday:
CALL form(mon*, fc*,
title$(). "Item", 7, x( )
16. 10, ''Set up defaults'")
deltain * x(1):
maxrooms* » INT(x(3)):
maxsources* a INT(x(4)):
maxt imes* * INT(x(5))
maxdays* » INT(x(6)): hrsday =
X (7 ) :
INT(X(2)):
" THEN
:d =
be*,
10,
24
prntstep* «
IF hrsday >
hrsday ¦ 24:
END IF
IF maxdays* > 1 THEN
hrsday ¦ 24
title$(7) -
END IF
IF maxtimes*
maxtimes* » 750
END IF
CLS
COLOR fc*, be*
"Hours per day"
750 THEN
A-23

-------
area, sinkst,
, sinkmass!,
sink term
END SUB
REM SSTATIC
DEFSNG E
SUB sinkl (cone,
xr, xc, sink!,
emiss!}
REM	reemitting
implemented
emiss! a o
xsink = cone * area * sinkst!
IF sinkmass! >2.1 THEN
IF cone < xc THEN emiss! " xr
*	(xc - cone) * sinkmass ELSE
emiss! ¦ 0
ctest » emiss! * 2.7778E-04 *
deltat
WHILE ctest > .9 * sinkmass!
emiss! ¦ .8 * emiss!
ctest ¦ emiss! * 2.77778E-04
*	deltat
WEND
END IF
sink a xsink
END SUB
REM SDYNAMIC
DEFSNG R
SUB sinkdef (sinkrate, remit!,
reconc!)
REDIM x(3], title$(3)
CALL w indaake{mon*,
10, 40, 17, 75, -1)
LOCATE 9, 41: PRINT
Sink term]
title$(l) » "Rate to sink "
title$(2) ¦ "Reemission factor
fc*, bc^t,
[Define
title$(3) * "Reemission cone"
x(l) * sinkrate
x 2 » remit!
x (3) * reconc!
CALL formw(title$ ( ) , 3, x(), 10,
12, 41, 75, "TDefine sinkT")
CALL cwind(fc*, be*, 9, 40, 16,
75)
sinkrate » x(l)
reconcJ * x(3)
CALL cwind(rc*,
78)
END SUB
: remit!
be*, 10,
- x(2):
40, 17,
DEFINT E, R
SUB source (room*, sourc
second, hr, sflag*) STATIC
SHARED sstrength(), xnsource()
pollutants
SHARED wl, w2, w3, w4, w5, wt
SHARED waxl(), wax2(), wax3()
wax4(), wax5(), wtimel{)
SHARED time(), nlit*(), lit*()
SHARED ncig*(), stobtu()
kheatbtu(), gmoth(J
cig * 0: xmoth * 0: kheat » 0:
stove = 0: cook « 0: sourc » 0
IF sstrength(room*, l
pollutant*) * xnsource(room*, 1
pollutant*) > 0 THEN
IF sflag* = 0 THEN
CALL cigsourc(deltat, room*
hr, ciga)
cigt » ciga
ELSE ciga » cigt
END IF
cig » ciga * 3600
END IF
IF sstrength(room*, 2
pollutant*) * xnsource(room*, 2,
pollutant*) > 0 THEN
jkh
kheat
WHILE
IF
jkh) AND
a -1
kheat » -1
hr >» kheaton(room*,
hr <¦ kheatoff(room*,
jkh) THEN
kheat	=
fnkero(kheaton(room*, jkh),
kheatoff(room*, jkh) ,
sstrength(room*, 2, pollutant*)
* xnsource(room*, 2,
pollutant*), second)
END IF
jkh = jkh + 1
IF jkh > 3 AND kheat - -l
THEN kheat =¦ 0
WEND
END IF
IF sstrength(room*, 3,
pollutant*) * xnsource(room*, 3,
pollutant*) > 0 THEN
jkh - 1
stove » -1
WHILE stove
IF hr >»
jkh) AND hr <=
jkh THEN
a -1
stoveon(room*
stoveoff(room*
fnstove(stoveon(room*, jkh)
stoveoff(room*, jkh)
sstrength(room*, 3, pollutant*
* xnsource(room*, 3
pollutant*), second)
END IF
jkh - jkh + 1
IF jkh > 3 AND stove
THEN stove ¦ 0
WEND
END IF
IF sstrength(room*,
pollutant*) * xnsource(room*,
"	>0 THEN
sstrength(room*,
* xnsource(room*.
= -1
4
4
pollutant*)
xmoth ¦
pollutant*)
pollutant*)
END IF
sourc * kheat + stove
xmoth + cig
IF sstrength(room*, 6
pollutant*) * xnsource{room*, 6
pollutant*) > 0 THEN
sourc ¦ sourc + fnoth(hr
sstrength(room*, 6, pollutant*
* xnsource(room*, 6
pollutant*))
END IF
IF sstrength(room*, 5
A-24

-------
pollutant*) * xnsource(room*, 5,
pollutant*) > 0 THEN
wl » waxl(room*): w2 «
wax2(room*): w3 3 wax3(room*):
w4 » wax4 (room*) : wS =
wax5{room*): wt » wtimel(room*)
sourc » sourc + fnwax(hr +
2 4 • (day* 7, 1),
sstrength(room*, 5, pollutant*)
* xnsource{room*, 5,
pollutant*))
END IF
R	E	M
sourc»sourc+fnsource2(a(room*),
b(room*),c(room*),d(room*),stre
ngth(room*,6))
END SUB
DEFSNG E, R
SUB sourcedef (so$, ss,
xnsource, room*, a, B, c, d,
floor) STATIC
SHARED waxl(), wax2(), wax3(),
wax4(), wax5(), wtimel()
SHARED nsmokers*{)
SELECT CASE so$
CASE "Cigs"
CALL cigdef(ss, xnsource,
nsmokers*(room*), clgon(room*),
cigoff(room*))
CASE ''K-heater"
CALL kheatdef (ss, xnsource,
kheaton(room*, 1'
kheatof f ( room* , 1
kheaton(room*, 2
kheatoff ( room* , 2) ,
kheaton(room*, 3) ,
kheatoff(room*, 3))
CASE "Unvented-stove"
CALL stovedef (ss, xnsource,
stoveon(room*, 1 ) <
stoveoff(room*, 1).
stoveon(room*, 2
stoveoff(room*, 2
stoveon(room*, 3
stoveoff(room*, 3))
CASE "Moth crystals"
CALL moth(ss, xnsource)
CASE "other2"
CALL other2def(a, B, c, d,
ss)
xnsource ¦ 1
CASE "Wax"
CALL waxdef(ss, floor,
wtimel(room*), waxl(room*),
wax2(room*), wax3(room*),
wax4(room*), waxS(room*))
xnsource ¦ floor:
CASE ELSE
CALL otherdef(ss)
xnsource * 1
END SELECT
END SUB
SUB sroom STATIC
SHARED newrow*, nrooms*,
menudat$(), sources$(),
nsources*() , sinks() , nsinks*(),
nchoices*.( subitems*(1,
volume(), c0(), area(), floorO,
vin(), vout()< vhvacin(),
vhvacout(). vambin(), vambout()
SHARED waxl(), wax2(), wax3().
wax4(), wtimel()
SHARED xnsource(), sstrength(),
pollutant*, xr(), xc()
REDIM bal{nrooms*)
IF pollutant* > 6 THEN
pollutant* ¦ 1
roomnr* * 1: oldj* * l: oldcol*
newrow* * 4
CLS
d$ * ""
WHILE d$ <> "done"
vot » 0
FOR 1z ¦ 1 TO nrooms*: vot =
volume(jz*) + vot: NEXT iz
CALL curstatus(roomnr*, vot
volume(roomnr*), cO(roomnr*)
area ( roomnr* )
nsources*(roomnr*), s inks()
nsinks*(roomnr*), subiterns*()
sourcesSO, vin(), vout()
vhvacin() . vhvacout () , vambin()
vambout())
CALL barmenu(oldcol*, oldj*
menudatM, nchoices*
subitems*(), choicel*, choice2*)
IF choicel* » nchoices* THEN
d$ - "done"
LOCATE 24, 10: PRINT "
" ; : LOCATE
24, 10 ,
IF Choice2* > 1 THEN
IF choicel* < nchoices* THEN
SELECT CASE choicel*
CASE 1
roomnr* ¦ choice2* - 1
CASE 2 'get volume
SELECT CASE choice2*
CASE 2
CALL rdef(volume(roomnr*),
area (roomnr*) , f loor (rooranras) )
CASE 3
CALL cOdef(cO(roomnr*))
CASE ELSE
END SELECT
CASE 3
so$ ¦ menudat(choicel*,
choice2* - l)
sources$ (roomnr*, cho.Lce2%
- 1) ¦ so$
IF pollutant* > 6 THEN
pollutant* * 1
CALL sourcedef(so$
sstrength(roomnr*, choice2* - l
pollutant*), xnsource(roomnr*
choice2* - 1, pollutant*)
roomnr*, a(roomnr*), B(roomnr^)
c(roomnr*), d(roomnr*)
floor(roomnr*))
CASE 4
A-25

-------
CALL
sinkdef(sinks(roomnr*, 1),
xr 
-------
m o ?oTO 1
nrooms*
PRINT #1, vambin( j, jhv),
vambout(j, jhv)
FOR 11 » 0 TO nrooms*
IF 1 <> jl THEN PRINT #1,
vin(j, jl, jhv), vout(j, jl,
^Exi 11
NEXT j
NEXT jhv
REM now do sources
FOR room* ¦ 1 TO nrooms*
PRINT #1, nsmokers*(room*)
FOR s* ¦ 1 TO 5
FOR p* ¦ 1 TO 6
PRINT #1, xnsource(room*,
s*. p*), sstrength(room*, s*,
p*
NEXT p*
NEXT s%
NEXT room*
FOR 1* » 1 TO nrooms*
P
wtimel(j
wax3(1
tl
NEXT j
RINT #1, waxl(j), wax2(1)
* ' J' waxS(j)
wax4(j),
btu,
on3,
onl,
of f 31
CLOSE 1
END IF
CLS
END SUB
SUB stovedef (ss,
offl, on2, off2,
STATIC
REDIM x(S), title$(8)
CALL windmake(mon*,
10, 39, 19, 76, -1)
LOCATE 9, 41: PRINT
stove source strength ";
x(2) - btu
ss
stoveon: x(4) ¦ stoveoff
Le$(1) = "mg/KJ": tltle$(2)
"Size heater lO/hr"
fc*, be*.
"Define
5IM
titii
on 24 hr"
off 24 hr"
titles (3) =* "Time
titles 4 » "Time
titles(5 * "2nd
titles(6) » "2nd
titles(7) = "3rd
titles(8) » "3rd
x(3) =» onl: x(4) ¦
on2 : X(6) » of f 2 :
x(8) « orf3
CALL formw(titles() , 8, x(), 10,
17, 41, 75, "[Define stove]")
ss - x(1): btu ¦ X(2):
onl = x(3) : on2 ¦ x(5): on3 =
x (7)
x(4): off2 = X(6): off3 »
time on"
time off"
time on"
time off"
offl: X(5) =
X(7) - on3:
offl
X ( 8 )
CALL
761
END
cwind(fc*, be*, 9, 39, 19,
SUB
SUB subtitles (title$(), n*(),
j*, row*, col*) STATIC
^OR srow* = row* + 1 TO n*(j*) +
LOCATE srow*, col*: PRINT
titles(j*. srow* - 1);
NEXT srow*
END SUB
SUB udim (row*, col*, titles)
STATIC
COLOR fc*, be*:
LOCATE row*, col*: PRINT
STRINGS(LEN(titleS), " " ) ;
LOCATE row*, col*: PRINT titleS;
END SUB
DEFINT E, R
SUB update (t*, jhv) STATIC
SHARED nrooms*, deltatflag*,
concen(), pconc(), scalel, hour,
nlit*()
SHARED sourcflag*(), volume()
SHARED xmassout, xmassemit,
sinkmass
az$ -STRINGS(76, " ")
lenaz* >76
deltatflag* ¦ 0
xmass ¦ 0
FOR room* * 0 TO nrooms*
pconc(1, room*, t*) =
concen(1, room*):
xmass * concen(l, room*) *
volume(room*) + xmass
cz - concen(l, room*):
cz - cz * 74 / scalel
IF cz > 1000000! THEN cz -
1000000!
IF CZ < 0 THEN cz * 0
IF CZ > 74 THEN C* = 74 ELSE
C* » INT(cz)
bz$ * az$
IF room* - 0. THEN
IF jhv » 0 THEN h$ * "0" ELSE
h$ ¦ "H"
MIDS(bz$, 1, 1) ¦ h$
ELSE
MIDS(bz$, 1, 1)
RIGHTS(STR$(nlit*(room*,hour)),
1^ND IF
IF sourcflag*(room*) = 1 THEN
MIDS(bz$, 2, c*)
STRINGS(c*, "+")
ELSE
MID$(bz$, 2, c*)
STRINGS(c*, "-")
END IF
LOCATE room* + 2, 4: PRINT
bz$;
NEXT room*
LOCATE 19, 2: PRINT USING "Cum
mass emitted #####,###.#, mass
out #####,###.#, in bldg mass
#,#####.# "; xmassemit,
xmassout, xmass;
IF xmassemit » 0 THEN
xmassemit ¦ -1
LOCATE 20, 2: PRINT USING
A-27

-------
"Sink mass
sinkmass;
END SUB
####, ###. #'•;
DEFSNG E, R
SUB waxdef (ss, floor, wtime,
waxl, wax2, wax3, wax4, wax5)
STATIC
SHARED wl, w2 , w3, w4, w5, wt
REDIM x ( 8 ) , titles(8)
CALL windmake (monSt, f c*, be*,
10, 40, 17, 78, -1)
LOCATE 9, 41: PRINT "Define
floor wax source strength";
titles(2) « "1st constant"
x (2) ¦ waxl
titles(1) ¦ "m2 of area
x(l) » floor
IP wtime ¦ 0 THEN wtime ¦ wt
IF waxl * 0 THEN waxl * wl
IP wax2 » 0 THEN wax2 ¦ w2
IF wax3 ¦ 0 THEN wax3 ¦ w3
X ( 2 ) 31 May \
titles(3) * "Second constant"
x( 3) = wax2: title$(4) ¦ "3rd
constant": x(4) « wax3
titleS(5) ® "4th constant": x(5)
= wax4
CALL formw(titles(), 5, x(), 10,
14, 41, 75, "[Define floor wax")
IFx(l) * x (2) > 0 THEN ss - 1
ELSE ss * 0
waxl = x(2)
floor » x(l)
wax2 » x(3): wax3 ¦ X(4): wax4 ¦
x(S)
CALL cwind(fc*, be*, 9, 40, 16,
78 )
END SUB
SUB wipesub (n*, col*) STATIC
COLOR fc*, be*
row* = 2
IP col* - 1 THEN
FOR IX - 1 TO n*
LOCATE row*, col*: PRINT
STRINGS( 3, " " ) ;
row* » row* + l
NEXT j*
ELSE
FOR j* » 1 TO n*
LOCATE row*, col*: PRINT
STRINGS(15, " ");
row* » row* + 1
NEXT j*
END IP
END SUB
DEFINT E, R
SUB zero (pthvac, pt().
xmassout, xmassemit, sinkmass)
STATIC
SHARED tmax*, nrooms*, pconc{),
concenj | , timeU , pambin(),
REDIM pconcfmaxnollutants,
maxrooms*, maxt imesas)
CLS
xmassout ¦ 0: xmassemit ® 0:
sinkmass =¦ 0
PRINT
PRINT TAB(20); "Initializing
everything"
ERASE time
time(t*) ¦ 0
Dt(0) « pthvac
P0R j ¦ I TO nrooms*: pt(1) = 1:
rsinicmass! { j ) » 0: NEXT j
FOR np* ¦ 0 TO maxpollutants:
FOR room* - 0 TO nrooms*:
concen(np*, room*) * 0: NEXT
room*: NEXT np*
REM key (3) off
tmax* «¦ 0
FOR j* » 0 TO nrooms*:
pambinM*) ¦ vambinfj*, 1) *
cone * 2.77778E-04:
concen(l, j*) ¦ cO(j): pconc{l,
1. 0) - cO(j): NEXT j*
t* - 1: hour = 0: prntcount* =
)
2ND SUB
DECLARE SUB ind87
DECLARE SUB help (.
DECLARE SUB main ()
DECLARE SUB menu (fc*r be*, ok$,
title$(), rows*, newrow*, cols*,
nrows*, menutitleS, choice*)
DECLARE SUB getkey (yS. y*)
DECLARE SUB form fmon*, fc*,
be*, title$(), namtitleS,
numtitles*, valx!(), rowstart*,
rowfinish*, colstart*,
formtitle$)
DECLARE SUB storepdat
(pollutants(), pstrength!(),
waxl, wax2!, wax3!, wax4!,
wtime1!)
DECLARE SUB pollutio ()
DECLARE SUB helpl ()
DECLARE SUB holdit (y$)
DECLARE SUB datsub
p'-t-«n9,h!''»
SUB storedat
pstrength!{),
wax3!, wax4!,
vambin < ) . cone, c0()
*, hour,
prntstep*, rsinkmassf()
SHARED tl*, hour, prntcount*,
(pollutants(),
waxl! , wax2 !,
wtime1!)
DECLARE SUB indoor ()
COMMON SHARED /cO/ erflag*
COMMON SHARED /cl/ pollutant${),
pollutant*, pstrength()
COMMON SHARED /c2/ a(), b(),
el), d(), calflag*, colr*<)
COMMON SHARED /c3/ cigon(),
cigoff(), stoveon(), stoveofff),
kheaton{), kheatoff(), cookon(1,
cookoffM, hour, calstep*,
prntstep*
COMMON SHARED /c4/ maxrooms*,
MAXS0URCES*, naxtimes%:
maxdays*, hrsday, mon*, mon$,
sinkst, deltat
COMMON SHARED /c5/ fc*, be*.
A- 28

-------
fracton, endflag, day*, second,
deltain, onecig, xaxismin*
COMMON SHARED /c6/ yaxismin*
yaxismax*, xaxismax*, xstep*
ystep*, pthvac
COMMON SHARED /c7/ mainmenS()
inmenuS(), nmenuS(), vin()
vout(), menudat()
COMMON SHARED /c9/ sourcesS)
nsources*(), sinks() , nsinks*()
nchoices*
COMMON SHARED /c8/ subitems*()
volume(), c0(), area(), tloor()
COMMON SHARED	vhvacinQ
vhvacout (), vambii
vambout()
REM main program
REM 3 Dec 1987
DEFSTR T
DEFINT C, J
DATA un indoor air
model,efine source
strengths,onfigure
system,elp,uit
SUB datsub (pollutant$(),
fstrength()) STATIC
HARED waxl, wax2, wax3, wax4,
waxS, wtlmel
REM SET UP POLLUTANT SOURCE
STRENGTHS FOR VARIOUS SOURCES
OPEN "I", 1, "Pollutio.dat"
FOR j ¦ 1 TO 6: INPUT #1,
Dollutant$( 1) : NEXT J,
FOR j « 1 TO 6: FOR jit - 1 TO 5:
INPUT #1, pstrength(j, jk) : NEXT
3k: NEXT f
INPUT #1, waxl, wax2, wax3,
wax4, wax5, wtlmel
CLOSE
END SUB
SUB helpl STATIC
SHARED fc*. be*
SCREEN 0, 0, 0: WIDTH 80
COLOR fc*, be*: CLS
CLS
PRINT "Help file for indoor air
model"
OPEN "i", 1, "help.ind"
j ¦ 1
a$ » " "
WHILE a$ <> "end"
y$ m " "
LINE INPUT #1, a$
IF a$ <> "page" THEN
PRINT a$
ELSE
LOCATE 25, 10: PRINT "Press any
key to continue ESC to quit.";
CALL holdit(y$)
IF ASC (y$) - (27) THEN a$ -
"end"
CLS
END IF
WEND
IF ASC(y$) <> 27 THEN
LOCATE 23, 1: PRINT "End of
help, Press
continue.,r;
CALL holdit(y$)
END IF
13 CLOSE
COLOR fc*, be*:
END SUB
any
CLS
key
to
SUB holdit (y$) STATIC
100 y$ - INKEY$: IF y$ = "" THEN
100
END SUB
SUB main
DIM t(20)
1 CLS
OPEN "I", 1, "CONFIG.IND"
CLOSE 1
OPEN "I", 1, "CONFIG.ind"
INPUT #1, monS
INPUT #1, mon*, xaxismin*,
xaxismax*, yaxismin*, yaxismax*,
xstep*, ystep*
FOR j » 0 TO 10: INPUT #1 ,
COlr*(f): NEXT j
CLOSE 1
IF mon$ ¦ "MON" THEN
be* - 0
15
fc*
ELSE
be*
fc*
END IF
CLOSE
COLOR fc*,
3
8
be*: CLS
FOR j « 1 TO 5: READ t(j): NEXT
lone ¦ 0
newrow* » l
ok$ « "RDCHQ"
WHILE done * 0
CALL menu(fc*, be*, okS, t().
10. newrow*, 30, 5, "Indoor Air
Model Control Menu", choice*)
IF choice* > 0 THEN newrow* =
choice*
IF choice* > 5 THEN newrow* = 1
SELECT CASE choice*
CASE 1
CALL lnd87
CASE 2
CALL pollutio
CASE 3
CLS
PRINT "Configure system"
PRINT "Current monitor is ";
mon$
PRINT "Is this correct y or
n";
v$ » " "
WHILE INSTR("YynN", y$) = 0
CALL getkey(y$, y*)
WEND
IF INSTR("YyNn", y$) > 2 THEN
CLS
PRINT "Monitor choices are "
PRINT "onochrome"
A- 29

-------
"olor"
IT "GA with color"
PRINT "Press the key
corresponding to your choice"
&HILZ INSTR("MmCcEe", y$) » 0
V$ = INPUT$l1)
WEND
y* = INSTR("MmCcEe", y$)
IF y* > 4 THEN
monS - "EGA"
mon* * &HB800
xaxismin* » 101
yaxismin* * 18
yaxismax* * 300
xaxlsmax* * 700
ystep* ¦ 14: xstep* = 9:
FOR J » 0 TO 10: coir*(j) » j
+ 1: NEXT J
ELSEIF y* > 2 THEN
monS « "COLOR"
mon* a &HB800
xaxismin* * 92
yaxismin* * 8
yaxismax* >160
xaxismax* ¦ 504
?step* ¦ 8: xstep* =¦ 8:
OR j « 0 TO 10: colr*(j) -
1: NEXT j
XfT
monS « "MONO"
mon* - &HB000
xaxismin* =* 92
yaxismin* * 8
yaxismax* » 160
xaxismax* * 504
ystep* 3 8: xstep* * 8:
POR 1 ¦ 0 TO 10: colr*(j) -
1: NEXT j
END IF
PRINT "Do you want to save new
configuration y or n?"
y$ ¦ " "
WHILE INSTR j"YyNn", y$) » 0
CALL getkeylyS, y*j
WEND
IP INSTR("YyNn", y$) < 3 THEN
OPEN »oA, 1, "config.ind"
PRINT #1, mon$
PRINT #1, mon*, xaxismin*,
xaxismax*, yaxismin*, yaxismax*,
xstep*, ystep*
FOR 1 » 0 TO 10: PRINT #1,
colr*( <> : NEXT j
CLOSE 1
END IP
END IP
CASE 4
CALL help
CASE 5
done » -1
CASE ELSE
END SELECT
WEND
SCREEN 0, 0, 0
CLS
Quit:
END SUB
wax 3 , wax 4
titleS(10
wtitle$(10)
SUB pollutio STATIC
SHARED waxl, wax 2 ,
wax5, wtimel
REDIM t$(10)
emfact(10, 10),
REDIM x(10}
namtitle$ ¦ "Pollutant"
CALL datsub(title$(), emfact())
done ¦ 0
rowstart* » 10: rowfinish* = 15:
colstart « 15
newrow* ¦ l
oks - "CKUMW0Q"
t$(l) ¦ "lgarete": tS(2) =
"erosene heater": t$(3) -
"nvented stove"
t$ (4) » "oth crystals": t$(5)
- "ax": t$(6) = "<0>ther":
t$ (7) » "uit"
WHILE done - 0
CLS : COLOR fc*, be*
CALL menu ( f c*, be*, ok$ , t $ { ) ,
10, newrow*, 30. 7, "Select
Source Menu", choice*)
IF choice* > 0 THEN newrow* =
choice*
namtitleS » "Pollutant"
SELECT CASE choice
FOR i a 1 TO 6: x(j) =
emfact fl, 1): NEXT i
formtitleS = "Cigerate
mc/cig"
CALL form(mon*, fc*,
title$(), namtitleS, 5,
rowstart*, rowfini
colstart*, formtitleS)
data
be* ,
x{ } ,
3 h * ,
FOR
X{1)
3E
TO
j
6: emfact(1
« "K heater data
TO 6
NEXT j
"K
X( j ) »
heater
be*
x{ )
s h *
- 3
j a 1
NEXT
CASE 2
formtitleS
mg/KJ/jr"
FOR j »
emfact(2, 1)
namtitleS
pollutant mg/KJ/hr"
CALL form (mon* , f c*,
title$(), namtitleS, 5,
rowstart*, rowfini
colstart*, formtitleS)
FOR j » 1 TO 6: emfact
- x(1): NEXT j
CASE 3
formtitleS * "Unvented heater
mg/KJ/hr"
FOR j - 1 TO 6: x ( j ) =
emfact(choice*, j): NEXT j
nametitle$ = "Unvented
stoves mg/KJ/hr"
CALL form(mon*, fc*
title$(), namtitle$, 5
rowstart*, rowfini
colstart*, formtitleS)
FOR j » l TO
emfact(choice*, j) = x(j)
^ CASE 4
bc$,
x( 5 ,
s h % ,
6 :
NEXT
A- 30

-------
formtitleS = "Moth crystals
mg/gm"
namtitle$ » "Moth
crystals mg/g/hr"
FOR j - 1 TO 6: x(j) » 0:
NEXT 1: x(5) » emf act (choice*,
5)
CALL form(mon*, fc*. be*,
title$(), namtatleS, 5, x(),
rowstart*, rowfinish*,
colstart*, formtitle$)
FOR 1 » 1 TO 6:
emfact(choice*, j) ¦ x(J): NEXT
^ CASE 5
formtitleS =» "Floor wax VOC
mg/m2"
namtltle$ * "Floor wax VOC
mg/m2"
wtitle$(l) = "Initial
time": wtitle$(2) ¦ "1st
wtitle$(3)
"2nd
"3rd
-	"4 th
-	"5 th
x( 2) -
* wax3:
. be*,
5, x( } ,
in i sh*,
constant"
constant"
wtitleS<4) »
constant": wtitle$(5)
constant": wtitle$(6)
constant"
xfl) * wtimel:
waxl: x(a) ® wax2: x(4)
x(5) * wax4: x(6) ¦ wax5
CALL form[mon*, fc*
wtitleS(), namtltle$,
r owstart*, rowf
colstart*, formtitlefl)
wtimel » x(1): waxl -
X(2): wax2 = x(3): wax3 ¦ x(4):
wax4 * x( 5) : waxS ¦ x (6)
CASE 6
formtitleS » "Other source
mg/hr"
namtitle$ * "Other mg/hr"
FOR j » 1 TO 6: x(j) -
emfact(choice*, j): NEXT j
CALL form{mon*, fc*, be*,
titleSO, namtltleS, 5, x(),
rowstart*, rowfinish*,
colstart*, formtitle$)
FOR j = 1 TO 6 :
emfact(choice*, j) * x(j): NEXT
J CASE 7
done » -1
CASE ELSE
done a-1
END SELECT
WEND
CALL storepdat(title$( ) ,
emfact(}. waxl, wax2, wax3 ,
wax4, wtimel)
END SUB
SUB storepdat (pollutants(),
pstrength(), waxl, wax2, wax3,
wax4, wtimel) STATIC
REM SET UP POLLUTANT SOURCE
STRENGTHS FOR VARIOUS SOURCES
OPEN "o". 1, "Pollutio.dat"
FOR 1 » 1 TO 6: PRINT #1,
A -1
PRINT #1, pi
1k: NEXT f
#1, waxl, wax2
jk)
PRINT
wax 4,
CLOSE
END SUB
waxS, wtimel
TO 5:
NEXT
wax 3,
plat
REM user Interface and
modules for QuickBasic 4.0
DECLARE FUNCTION rowcol* (row*,
col*)
DECLARE
(X! ( )
)
y! ()
ymax!
Y*)
SUB findmax
xmax!, xmini, npoints*)
DECLARE SUB plot (X! (
npoints*, xmax!, xmini
ymin!, room*)
DECLARE SUB getkey (y$,
DECLARE SUB drawx ()
DECLARE SUB drawv ()
DECLARE SUB labelx (xmax, xmin,
vmax, ymin, xstep*, title$)
DECLARE SUB ploty (y! , ymaxI,
Xmin!, ypJ)
ECLARE SUB plotx (X! , xmax! ,
xmin!, xp!)
DECLARE SUB ticx (XI, y!)
DECLARE SUB labely (xmax!,
xmini, ymax!, ymin!, ndec*)
DECLARE SUB Dlotxy (xplot!(),
yplot!(), npoints*, room*)
DECLARE SUB ticy (X!, y!)
DECLARE SUB box (X*, y*, top$,
btm$, slde$)
DECLARE SUB centext (text$,
row*)
DECLARE SUB windmake (mon*, fc*,
be*, ul*, ur*, 11*, lr*. f*)
DECLARE SUB getmove (curon*, y$,
1y*, row*, col*, cursors,
olcur$)
DECLARE SUB movecursor (curon*,
row*, col*, dir$, upstep*,
downstep*, leftstep*,
rightstep*)
DECLARE SUB getdata (outansS,
y$, row*, col*)
DECLARE SUB correct (row*, col*,
cans$, jx*)
DECLARE SUB cwind (fc*, be*,
ur*, uc*. 11*, ar*)
REM $INCLUDE: 'c:\bas\qb.bi'
REM start of user interface
COMMON SHARED /cl/ pollutants()
pollutant*, pstrength()
COMMON SHARED /c2/ a(), b<).
c(), d(), calflag*, colr*()
COMMON SHARED /c3/ cigon()
cigoff(), stoveoni), stoveoff()
kheaton(), kheatoff (), cookonf),
cookoffO, hour, calstep*,
¦h mx ^ ^ &
COMMON SHARED /c4/ maxrooms*,
MAXSOURCES*, maxtimes*
maxdavs*, hrsday, mon*, monS,
sinkst, deltat
COMMON SHARED /c5/ fc*, be*
A-31

-------
fractQn, endfjag, day*, second,
aeltam, onecig, xaxismin*
COMMON SHARED /c6/ yaxismin*,
yaxismax*, xaxismax*, xstepX,
ystep*, pthvac
DIM cigon(lO), cigofftlO),
stoveon(10, 3), stoveofr(10, 3),
kheatonUO, 3), kheatoff (10, 3),
cookon(10, 3), cookoffflO, 3)
DIM a (10), b(10), c(10), d(10),
coir*(10 , pstrength(10, 6),
pollutant^(6)
DEFINT C. J—K, R
DEFSTR A
Ml
DEFINT J-K
errhand:
PRINT "ERROR. Please
your data and try
examin
again.
Returning to program.,r
FOR ierr * 1 TO 5000: NEXT jerr
RESUME NEXT
DEFSNG A, C, J-K. R
SUB box (X*, y*, topS, btm$,
side$) STATIC
top$ - CHR$(201) + STRINGS(XX -
2, 205)
btmS « CHR$(200) + STRINGS(X* -
2, 205)
REM for j»l to x*-2:
REM top$»top$+chr$(205)
REM btmSabtm$+chr$(205)
REM next 1
topS = top$ + CHRS(187)
btn$ » bta$ + CHRS(188)
REM for j» 1 to y*-2
R	E	M
side$»side$+chr$(10)+chr$(186)
REM next j
END SUB
SUB centext (texts, row*) STATIC
IF LEN(textS) <» 40 THEN LOCATE
row*, 40 - INT(LEN(textS) / 2):
PRINT textS
END SUB
DEFINT J
R
M
******
SUB correct (row*, col*, cansS,
1x*) STATIC
31* = LEN(cansS)
IF LEN(cansS) - 0 THEN
cansS = ""
ELSE
LOCATE row*, col*: PRINT
STRINGS(10, " " );
jx* » jx* - 1
cansS = LEFTS(cansS, il* - 1)
END IF
END SUB
SUB cwind (fc*. be*, ur*, uc*,
i*, ar*) STATIC
M inregs AS RegType, outregs
AS RegType
tl* = rowcol(ur* - 1, uc* - 1)
inregs.cx * tl*
tr* ¦ rowcol(ll*, ar*)
inregs.dx ¦ tr*
inregs.ax = &H600
inregs.bx » &H3800
CALL INTERRUPT(&H10, inregs,
outregs)
END SOB
DEFINT K
SUB drawx STATIC
LINE (xaxismin*,
yaxismax*)-(xaxismax*,
yaxismax*)
END SUB
SUB drawv STATIC
LINS (xaxismin*,
yaxismax*)-(xaxismin*,
yaxismin*)
END SUB
SUB findmax (X(), xmax, xmin,
npoints*} STATIC
xmax ¦ -lE+20
xmin * 1E+20
FOR i* » 1 TO npoints*
~ x(j*) > xmax THEN xmax =
X(J%) < xmin THEN xmin =
IF TC(j*l
xIfl
XH*)
NEXT j*
END SUB
DEFSNG J-K
SUB form (mon*, fc*, be*,
titleS(), namtitleS, numtitles*,
valx(), rowstart*, rowfinish*.
colstart*, formtitleS) STATIC
DEFINT J
CLS
CALL windmake(mon*, fc*, be*, 2,
2, 20, 78, 0)
LOCATE 1, 40: PRINT "I";
cur$ -	+ CHRS(16)
CALL box(4 + LEN(formtitleS), 5,
top$, btm$, sideS)
CALL centext(tops, 1):
sideS * CHRS(18 6) +
STRINGS(LEN(topS) - 2, " ") +
CHRS(186)
FOR j » 1 TO 3
CALL centext(sideS, 1 + j)
NEXT j
CALL centext(btm$, 4)
CALL centext(formtitleS, 2)
LOCATE 25, 10: PRINT "Use arrow
keys to move cursor Press ESC to
return.";
LOCATE 6, 3: PRINT STRINGS(74,
LOCATE 7, 10: PRINT namtitleS:
LOCATE 7, 50: PRINT "Value"
LOCATE 8, 3: PRINT STRINGS(74,
A- 32

-------
II XH )
jmin* » rowstart*
row* =» rowstart*: col* =
colstart*
FOR j » 1 TO numtitles*
LOCATE row*, col*: PRINT
title$(j);
LOCATE row*, col* + 40: PRINT
valxM ) ;
row* ¦ row* + l:
NEXT j
row* * rowstart*: col* *
colstart*
&HILE ASC(yS) <> 27
COLOR fc*, be*
LOCATE row*, col* - 5: PRINT
CL§SAtE row*, col*: COLOR be*,
fc*: PRINT STRINGS(30, " ") ;
LOCATE row*, col*: COLOR be*,
fc*: PRINT title$(row*
rowstart* + 1);
LOCATE row*, col* + 40: PRINT
valx(row* - rowstart* + 2);
CALL getmove(0, y$, jy*» row*,
col* - 5, cur$, ")
IF ASC(yS) <> 27 THEN
IF LEN(y$) - 2 THEN
LOCATE row*, col*: COLOR fc*,
be*: PRINT STRINGS(30, "
LOCATE row*, colfc: PhlNT
titles(row* - rowstart* + l);
LOCATE row*, col* + 40: PRINT
va!x(row* - rowstart* + 1);
IF RIGHTS(yS, 1) - "P" THEN
CALL movecursor(0, row*, col*
—	5 " D" 1 1 0 0)
I& row* > row'f inish* THEN row*
¦ rowstart*
ELSEIF RIGHTS(y$, 1) - "H"
THEN
CALL movecursor(0, row*, col*
-	3. "U" l, 1, 0, 0)
IF row* < rowstart* THEN row*
» rowfinish*
ELSE
dir$ -
END IF
ELSE
t(LOCATE row*, col* - 5: PRINT "
LOCATE row*, col* + 40: COLOR
be*, fc*: PRINT STRINGS(10, "
COLOR fc*, be*
CALL getdata(X$, y$, row*, col*
+ 41)
vala
lx(row* -
VAL(X$)
COLOR fc*, be*
LOCATE row*, col*
STRINGS(10, " ");
LOCATE row*, col* +
valx(row* - rowstart*
LOCATE row*, col* -
curS ;
END IF
rowstart* + l)
+ 40: PRINT
40: PRINT
+ 1);
5: PRINT
END IF
WEND
END SUB
SOB getdata (outans$, vS, row?s,
col*J STATIC
coll* * col*
ans$ 3 y$
LOCATE row*, col*: PRINT ans$;
WHILE ASC(y$) <> 13
IFLLE8Ty$"Y»yi'T&IA
y* ¦ 13
V$ - CHR$(13)
END IF
IF y* <> 13 THEN
IF y* - 8 THEN
CALL correct(row*, coll*, ans$ ,
coll*)
ELSE
coll* « coll* + 1
LOCATE row*, coll*: PRINT
y$;
ansS ¦ ans$ + y$
END IF
END IF
WEND
outansS 3 ansS
END SUB
SUB getlcey (y$, y*) STATIC
IF calflag* <> -1 THEN
y$ a »"
WHILE y$ » ",l
yS ¦ INKEYS
WEND
ELSE
yS - CHR$(27)
calflag* - 0
END IF
2Vs8ic,y,,
SUB getmove
row*, col*,
STATIC
IF calflag* <> -1 THEN
y$ * "•»
y$ - INKEYS
WHILE y$ »
IF curon* - 0 THEN
LOCATE row*,
cursors;
LOCATE row*,
blcurS;
END 17
yS ¦ INKEYS
IF calflag* ¦
yS » CHRST27)
calflag* - 0
END IF
WEND
ELSE
calflag* ® 0
2nd"i!hrs(27)
IF LEN(vS) » 2
ASC(RIGHTS(y$, 1))
(curon*, y$, jy*,
cursors, blcurS)
col*:
col*:
-1 THEN
PRINT
PRINT
THEN
ELSE
jy£ =
A-33

-------
$SC(yS)	F
INSTR("abcdefghilklmnopqrstuvwx
yz" , y$) <> 0 TH£n y$ - CHRS(jy*
END2SOB
DEPINT K
SUB labelx (xmax. xmin, Ymax,
ymin, xstep*, titie$) STATIC
xoff* 3 xaxismin* / xstep*
LOCATE 24, 40 - LEN(titleS) / 2:
PRINT titles;
LOCATE yaxismax* / Ystep* + 2,
xaxismin* / xstep*: "PRINT USING
xmin * 2.77778E-04;
CALL ploty(ymin, ymax, ymin, y)
X « xmin
xs * (xmax - xmin) / 10
FOR j - l TO 11
xz - X * 2.77778E-04
z$ » STR$(xz)
s - INT(LEN(z$) / 2 + .65)
xl ¦ xl + xls
CALL plotx(X, xmax, xmin, xp)
LOCATE yaxismax* / ystep* + 2,
xp / XStep* - s: PRINT USING
"###.#"; XZ;
CALL ticx(xp, y)
X - X + xs
NEXT 1
LOCATE 23, xaxismax* / xstep* -
1: PRINT USING "###.#"; xmax *
2.77778E-04;
END SUB
SUB labely (xmax, xmin, ymax,
ym i n, ndec*) STATIC
a M
y ¦ ymin: CALL plotxfxmin, xmax,
xmin. X)
IP ndec* >15 THEN
labstep* - ndec*
ELSEIF ndec* > 10 THEN
labstep* ¦ 2
ELSE
labstep* » 1
END IF
FOR j • 1 TO ndec* + 1
CALL ploty(y, ymax, ymin, yp)
":icy(X,
_Y + 1
yp)
CALL tici
Sextyj
y ¦ ymin
IP mon$ » "EGA" THEN
yj - 14
ya ¦ l.l
ELSE
yj » 7.6
ya - 0
END IF
FOR J ¦ 1 TO ndec* STEP labstep*
CALL	V™®*' ymin, yp)
STR?NG$(ABS(y), a$) ELSE a2$ -
CALL ticylX^ yp)
ylab * 10 " y
IF y < 0 THEN a2$
lScat! At(yp J yj + ya) , 6:
PRINT USING a2$; ylab;
y = y + labstep*
NEXT j
IF ymax < 0 THEN a2$ ¦ a$ + "."
+ STRINGS(ABS(ymax), a$ ) ELSE
a2$ » STRINGS(ymax + 1, a$)
LOCATE 2, 6: PRINT USING a2$; 10
ymax;
LOCATE 4,
LOCATE 5,
LOCATE 6,
LOCATE 7,
LOCATE 8,
LOCATE 9,
LOCATE 10,
LOCATE 11,
LOCATE 12,
LOCATE 13,
LOCATE 14,
LOCATE 15,
LOCATE 16,
END SUB
Is PRINT "C";
1: PRINT "o";
1: PRINT "n";
1: PRINT
1: PRINT
1: PRINT
PRINT
PRINT
PRINT
"G"
ir ii
i
i
i
1 :
1
1
1:
"m"
"a"
it y ii
PRINT "m3";
PRINT "";
PRINT
PRINT
)
a$ +
DEFSNG K
REM
mm**************************
SUB menu (fc*, be*, okS,
title$(), rows*, newrow*, cols*,
nrows*, menutitle$, choice*)
STATIC
CLS
cflag* - 1
cur$ * ""
CALL box(5 + LEN(menutitle$) , 5,
top$, btmS, sideS)
CALL centext(tops, 2)
CALL centext(btmS, 7)
sideS » CHR$(18 6)
STRINGS(LEN(top$) - 2, "
CHR$(186)
FOR j ¦ 1 TO 4
CALL centext(side$, 2 + j)
NEXT j
CALL centext(menutitle$, 5)
row* ¦ rows*
col* * cols*
LOCATE 24, 1: PRINT "Use arrow
keys to move cursor. Press
ENTER to execute. ESC to
return.";
FOR 1 » 1 TO nrows*
LOCATE row*,
titles(j); ^ ^
row* ¦ row* + 1
NEXT j
row* ¦ rows* + newrow* -
cols* « col*
Y$ » »i»
WHILE ASC(yS) <> 13
COLOR fc*, be*
LOCATE row*, col* - 3:
cur$;
LOCATE row*, col*: COLOR be*
fc*:	PRI^f
STRINGS(LEN(titles(row* - rows*
cols*: PRINT
PRINT
A-34

-------
+ in , " ")
LOCI
II II
:ATE row*, col*: COLOR be*,
f c*: PRINT titles(row* - rows* +
1^ALL getmove(0, y$. jy*, row*,
col*, cur$, "")
IP INSTR(okS, y$) ¦ 0 THEN
IP ASC(yS) <> 27 THEN
IF ASC(vS) <> 13 THEN
IP LEN(yS) » 2 THEN
LOCATE row*, col*: COLOR fc*,
be*: PRINT STRINGS(30, " "};
LOCATE row*, col*: PRINT
titles(row* - rows* + 1):
IP RIGHTS (y$, 1) « "P" THEN
CALL novecursor(0, row*, col*
-	3, "D", 1, 1, 0, 0)
IP row* > rows* + nrows* - 1
THEN row* » rows*
ELSEIF RIGHTS(y$, 1) » "H"
THEN
CALL movecursor(0, row*, col*
-	3, "U" , 1, 1, 0, 0)
IP row* < rows* THEN row* *
rows* + nrows* - 1
ELSE
dirS « ""
END IP
END IF
END IP
ELSE
row* =¦ nrows* + rows*
yS » CHRS(13)
END IF
ELSE
choice* a INSTR(ok$, y$)
cflag* » -1
I§d*xfhrs(13)
WEND
IF cflag* » 1 THEN choice* »
row* - rows* + 1 ELSE choice* »
choice*
COLOR fc*, be*
END SUB
SUB movecursor
col*, dirS, upstep*,
leftstep*, rightstep*
IP curon* = 0 THEN LO
col*: PRINT "
IF dir$ = "U"
upstep*
IP dirS » "L"
leftstep*
IP dirS * "R"
rightstep*
IF dirS = "D"
downstep*
END SUB
(curon*, row*,
*, downstep*,
*) STATIC
OCATE row*,
THEN row*
THEN col*
THEN col*
THEN row*
row* -
col* -
col* +
row* +
DEPINT K
SUB plot (X(), y(), npoints*,
xmax, xmin, ymax, ymin, room*)
STATIC
FOR 1 =» 1 TO 10000: NEXT 1
24900 REDIM yplot(npoints*),
xplot(npoints* J
IF raonS « "EGA" THEN SCREEN 9
ELSE SCREEN 2
ndec* » ABS(vmax - ymin)
CALL labelv(xmax, xmin, ymax,
ymin, ndec*)
CALL labelx(xmax, xmin, ymax,
ymin, xstep*, "Time Hrs")
FOR j* ¦ 1 TO npoints*:
25000 CALL ploty(y(j*), ymax,
vmin, yplot(j*))
25100 C/^LL ^>lotx(X( j*) , xmax,
xmin, xplot(j*))
NEXT 1*
CALL arawx
CALL drawy
CALL plotxy(xplot(), yplot(),
npoints*, room*)
END SUB
DEPSNG J-K
SUB plotem (X(), z(), tmax*,
nrooms*) STATIC
REDIM y(tmax*)
DEPINT J-K
REM ON ERROR GOTO errhand
yymin » 1E+29
yymax ¦ -1E+29
xxmax » 1E+29
xxmin ™ 1E+29
alog a LOG(10)
CLS
PRINT "Setting up plot"
rs* ¦ 0
FOR room* - rs* TO nrooms*
FOR j ¦ 0 TO tmax*
IF cone > 0 THEN
IF z(l, room*, j) <= cone
THEN z^l^room*, j) * cone
IF z(l, room*, j) <= .001
THEN	3) • -001
y(j) » LOG(z(1, room*, j)) /
alog
NEXT j
FOR j ¦ 2 TO tmax*:
IF X(j) < X(j - 1) THEN EXIT FOR
NEXT j
tmax* =» j - 1
CALL findmax(y(), ymax, ymin,
tmax*)
IF ymax ¦ ymin THEN ymax = ymin
+ 1: REM cover order of
magnitude
xmax ¦ X(tmax*): xmin = 0
IF xmax < xxmax THEN xxmax =
xmax
IF ymax > yymax THEN yymax =
ymax
IF ymin < yymin THEN yymin =
Tmin
F xmin < xxmin THEN xxmin *
xmin
NEXT room*
IF INT(xxmax * 2.77778E-04) -
xxmax * 2.77778E-04 <> 0 THEN
xxmax » INT(xxmax * 2.77778E-04
A-35

-------
tmax*,
3*)
+ .9999) * 3600
IF monl = "EGA THEN
SCREEN 9
PALETTE 8, 2
ELSE
SCREEN 2
END IF
WIDTH 80
IF yymin < -3 THEN yymin » -3
yymin » INT(yymin) : yymax
lNT(yymax + . 995J
LOCATE 1, 30: PRINT "Plot for "
pollutants(pollutant*);
Ymax » yymax
ymin ¦ yymin
xmax * xxmax
xmin « xxmin
FOR 1* * rs* TO nrooms*
FOR k » 1 TO tmax*
y(k) » LOG(z(1j j*,
alog
NEXT k
CALL plot (X( ) , y ( ) ,
xmax, xmin, ymax, ymin,
IF colr*(2) = 1 THEN
IF j* * 0 THEN tlS » "HVAC"
ELSE tl$ ¦ "Room " + STR$(j*)
LOCATE 25, 20: PRINT tl$; "
press any key to continue";
CALL getkey 1 THEN
LOCATE 25, 1: PRINT STRINGS(79,
It 11 J *
LOCATE 25, 1: COLOR colr*(0):
PRINT "HVAC"; " ";
FOR J » 1 TO nrooms*: COLOR
coir*(j): PRINT j; " "; : NEXT
^LOCATE 25, 50: PRINT "Press any
key " ;
CALL getkey(y$, y*)
END IF
END SUB
SUB plotx (X, xmax, xmln, xp)
STATIC
xp « xaxismln* + (X - xmin) *
(xaxlsmax* - xaxismln*) / (xmax
- xmin)
END SUB
SUB plotxy (xplot(), yplot(),
npoints*, room*) STATIC
DEFINT J
REM yplot(1),xplot(1)
FOR 1 a 2 TO npoints*
LINE (xplotM - 1), yplot(1 -
1) )-(xplot(jT, yplot(j ) ) ,
coir*(room*)
PSET (xplot(j), yplot(j))
NEXT 1
END StJB
(Y.
SUB ploty
STATIC
yp » yaxismax* -
ymax, ymin, yp)

-------
APPENDIX B
CONTENTS OP	DOCUMENTATION FILES
This is version 1.0 of the AEERL indoor air model.
The program is configured for a monochrome display.
If you have a color graphics board or an EGA board you should
reconfigure the program for your hardware. You can do this by:
1.	Typing INDOOR to load and execute the program.
2.	Selecting Configure computer option from the menu.
3.	Following the on-screen instructions to reconfigure the
program for your hardware.
4.	Being sure to save your new configuration file.
You can install the program on your hard disk by typing INSTALL.
INSTALL will create a subdirectory called INDOOR on your hard
disk and will copy all the necessary files from this disk to the
INDOOR subdirectory.
Guidance on selecting air flow rates:
Common HVAC systems produce 6-7 air changes per hour (ACH) in
each room.
Flow through an open door without HVAC is between 3 and 5 ACH in
both directions. For example, assume two rooms each with a
volume of 30 cubic meters. The flow from room 1 to room 2 might
be on the order of 100 cubic meters per hour and the flow from
room 2 to room 1 would be the same.
B-l

-------
TECHNICAL REPORT OATA
(Pitas* read Inunctions on the reverse be fort computing}
1. REPORT NO. 2.
EPA- 600 / 8- 88-097a
3. RECIPIENT'S ACCESSION NO.
4. TITLE ano subtitle
Indoor Air Quality Model Version 1.0
8. REPORT DATE
September 1988
8. PERFORMING ORGANIZATION COOE
7. AUTHOR(S)
Leslie E. Sparks
8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING OROANIZATION NAME ANO AOORESS
See Block 12.
10. PROGRAM ELEMENT NO.
TH. «WTflAZT73ftANTN4.
NA (Inhouse)
13. SPONSORING AGENCY NAME ANO AOORESS
EPA, Office of Research and Development
Air and Energy Engineering Research Laboratory
Research Triangle Park, NC 27711
13. TYPE OF REPORT ANO PERIOD COVERED
User's manual; 6/87 - 6/88
14. SPONSORING AGENCY COOE
EPA/600/13
is.supplementary notes Author Sparks' Mail Drop is 54; his phone number is 919/541-24D8-
"b" of this series is a diskette of the model.
is. abstractrep0rt presents a multiroom model for estimating the impact of various
sources on indoor air quality (IAQ). The model is written for use on IBM-PC and i
compatible microcomputers. It is easy to use with a menu-driven user interface. j
Data are entered using a fill-in-a-form interface. Model results are presented in
graphic and tabular form. The model treats each room as a well-mixed chamber
that can contain both sources and sinks. The model allows analysis of the impact of
interroom air flows, HVAC (heating, ventilating, and air conditioning) systems, and
air cleaners on IAQ. Model predictions are compared with experimental data from
EPA's IAQ test house. The model predictions are in good agreement with the experi-
mental data. The model is a useful tool for analyzing IAQ issues. The model re-
quires an IBM-PC or compatible computer, DOS 2.1 or higher, one disk drive, and
at least 512 k-bytes of memory. A graphics adapter and monitor are required to dis-
play the graphics output from the model.

17. KEY WORDS ANO OOCUMENT ANALYSIS
a. DESCRIPTORS
b. 1OENTIPIERS/OPEN ENOEO TERMS
c. COSATI Field/Group
Pollution
Mathematical Models
Air Cleaners
Air Conditioning
Heating
Ventilation
Pollution Control
Stationary Sources
Indoor Air
Air Quality
13B
12	A
13	A, 131
13 H
13. DISTRIBUTION STATEMENT
Release to Public
19- SECURITY CLASS (This Report)
Unclassified
21. NO. OP PAGES
141
20. SECURITY CLASS (THISpart)
Unclassified
22. PRICE
CPA Form 2220*1 19-13)	B" 2

-------