NISTIR 7049 CONTAM 2.1 Supplemental User Guide and Program Documentation
NISTIR 7049 CONTAM 2.1 Supplemental User Guide and Program Documentation
George N. Walton
W. Stuart Dols
NISTIR 7049
George N. Walton
W. Stuart Dols
Prepared for:
Naval Surface Warfare Center
Dahlgren, VA
iii
SOFTWARE DISCLAIMER
This software was developed at the National Institute of Standards and Technology by
employees of the Federal Government in the course of their official duties. Pursuant to title 17
Section 105 of the United States Code this software is not subject to copyright protection and is
in the public domain. CONTAM is an experimental system. NIST assumes no responsibility
whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its
quality, reliability, or any other characteristic. We would appreciate acknowledgement if the
software is used.
This software can be redistributed and/or modified freely provided that any derivative works
bear some notice that they are derived from it, and any modified versions bear some notice that
they have been modified.
Certain trade names or company products are mentioned in the text to specify adequately the
experimental procedure and equipment used. In no case does such identification imply
recommendation or endorsement by the National Institute of Standards and Technology, nor
does it imply that the equipment is the best available for the purpose.
iv
TABLE OF CONTENTS
Abstract ........................................................................................................................................................................iii
Software Disclaimer .....................................................................................................................................................iv
Navigating This Document...........................................................................................................................................iv
PART 1 – CONTAM 2.1 Supplemental User Manual ..................................................................................................1
1.1 Introduction..............................................................................................................................................1
1.2 Working with WPC Files .........................................................................................................................1
1.2.1 WPC Usage Parameters...........................................................................................................2
1.2.2 Envelope Opening Locations...................................................................................................4
1.2.3 Running Simulations using a WPC File ..................................................................................4
1.3 Control Elements......................................................................................................................................5
1.4 Particulate Contaminants..........................................................................................................................7
1.5 Calculation of Total Mass Released from Sources...................................................................................7
PART 2 – ContamX Program Documentation ..............................................................................................................8
2.1 Introduction..............................................................................................................................................8
2.2 Development Environment ......................................................................................................................8
2.3 ContamX Program Structure....................................................................................................................9
2.3.1 Overall Program Structure.......................................................................................................9
2.3.2 ContamX Solver Functions ...................................................................................................10
2.3.3 Utility Functions....................................................................................................................20
2.3.4 Sparse Matrix Data Structure ................................................................................................23
2.3.5 Solution of the Species Differential Equations:.....................................................................24
2.4 CONTAM Input and Output Files..........................................................................................................26
2.4.1 Project File (.PRJ) .................................................................................................................26
2.4.2 Weather File (.WTH).............................................................................................................61
2.4.3 Contaminant File (.CTM) ......................................................................................................63
2.4.4 Restart File (.RST).................................................................................................................64
2.4.5 Continuous Values File (.CVF) .............................................................................................65
2.4.6 Discrete Values File (.DVF)..................................................................................................66
2.4.7 Simulation Results File (.SIM)..............................................................................................67
2.4.8 Controls Log File (.LOG)......................................................................................................69
2.4.9 Wind Pressure and Contaminant File (.WPC) .......................................................................70
2.4.10 Path Location Data File (.PLD).............................................................................................71
2.4.11 ContamX Log File (CONTAMX2.LOG) ..............................................................................74
2.4.12 ContamW Configuration File (CONTAM.CFG)...................................................................77
2.5 Data Structures .......................................................................................................................................78
PART 3 – ContamW Program Documentation ...........................................................................................................79
3.1 Introduction............................................................................................................................................79
3.2 Development Environment ....................................................................................................................79
3.3 Program Structure ..................................................................................................................................79
3.3.1 Main Program and Message Loop.........................................................................................80
3.3.2 Window Procedures...............................................................................................................80
3.4 Program Data .........................................................................................................................................80
3.4.1 SketchPad Data......................................................................................................................80
3.4.2 Building Organization ...........................................................................................................82
3.4.3 Building Component and Element Data ................................................................................82
3.5 Program Logic........................................................................................................................................84
3.5.1 Message (Event) Handlers.....................................................................................................84
3.5.2 Saving and Retrieving Project Files ......................................................................................84
3.5.3 SketchPad Drawing ...............................................................................................................84
3.5.4 Creating and Editing Building Components..........................................................................88
3.5.5 Running Simulations .............................................................................................................88
3.5.6 Viewing Simulation Results ..................................................................................................88
Appendix 3A ...............................................................................................................................................................92
References ...................................................................................................................................................................96
Acknowledgments .......................................................................................................................................................97
v
vi
PART 1 – INTRODUCTION
1
PART 1 – WORKING WITH WPC FILES
2
PART 1 – WORKING WITH WPC FILES
activate the Coordinate Information parameters on the Airflow Path, Duct Terminal, and Simple
Air Handling System property sheets.
Wind Pressures: Check this box to use wind pressures from a WPC File.
Contaminant Concentrations: Check this box to use contaminant concentrations from a
WPC File. This box will only be activated if you have already defined contaminants within
the current project.
Name: This is the name of the WPC File to use during the simulation. You can either use the
Browse… button to select an existing file, or enter the name you would like the EWC File
Converter to give to a new file.
Description: This will display the description line of the WPC File if it exists, or you can
enter a description for a new WPC File.
External Wind and Contaminant Data
The External Wind Pressure and Contaminant file contains the external contaminant
concentrations and pressures that the EWC File Converter(which must be developed for your
specific application) will convert into a WPC File.
File Name: Use the Browse… button to select an existing EWC File.
Program to Create WPC File: Use the Browse… button to select the EWC File Converter
program to use.
Coordinate Transformation Data
These parameters can be used by an EWC File Converter to establish the relationship
between the coordinates of the External Wind Pressure and Contaminant file and the
CONTAM project file. No transformation is required if the coordinate systems for the PRJ
and EWC files are consistent. These values are stored in the PLD file by ContamW.
Origin (X, Y and Z): The location of the origin of the CONTAM PRJ file with respect to the
origin of the External Wind Pressure and Contaminant file.
Rotation Data: The rotation of the x and y axes of the EWC coordinate system about the z
axis to align with the x and y axes of the CONTAM coordinate system. Counter-clockwise is
considered the positive direction.
Conversion Tolerance
These are the tolerances that an EWC File Converter might use to determine how closely
information in the EWC File and the PLD File must match in order to resolve contaminant
(species) and location data. These values are stored in the PLD file by ContamW.
Species: Species can be resolved by their molecular weight, i.e., the molecular weight of
each species defined in ContamW and the WPC file must not differ by more than this amount
to be considered the same species.
Location: Locations can be resolved by their distance as determined by an EWC File
Converter, e.g., distance to center of a grid cell. Units within the PLD File are in meters.
3
PART 1 – WORKING WITH WPC FILES
4
PART 1 – CONTROL ELEMENTS
match between the PRJ and the WPC files. It will call the EWC File Converter and create a WPC
file if an EWC file converter has been identified.
ContamW will provide error messages as needed and highlight paths on the SketchPad to reveal
those for which location data are not defined or the PLD and WPC coordinates do not match
within the specified tolerance. If there are errors with specific openings, you can take this
opportunity to correct them.
5
PART 1 – CONTROL ELEMENTS
Scheduled Delay
This control element provides the ability to simulate time delays associated with the ramping
up/down of system components changing between states, e.g., the spin down of a fan or the
opening/closing of a damper. The scheduled delay element allows you to define a schedule
according to which the change of state occurs. The output will change according to this
schedule when the input changes.
Node Name: This is an optional name you can provide for this control node. This name can
be used to reference this node with a Phantom control node.
Schedule - Signal Increasing: Select/enter a day schedule that characterizes the delay in an
increasing signal. The schedule must be trapezoidal beginning with a value of 0.0 at time
00:00:00 and increase to a value of 1.0 before 24:00:00. Only one increasing time period per
schedule will be allowed.
Schedule - Signal Decreasing: Select/enter a day schedule that characterizes the delay in a
decreasing signal. The schedule must be trapezoidal beginning with a value of 1.0 at time
00:00:00 and decrease to a value of 0.0 before 24:00:00. Only one decreasing time period per
schedule will be allowed.
Description: Enter an optional description for this control element.
Exponential Delay
This control element provides the ability to simulate time delays associated with the ramping
up/down of system components changing between states, e.g., the spin down of a fan or the
opening/closing of a damper. The exponential delay element allows you to define an
exponential delay based on a time constant.
Node Name: This is an optional name you can provide for this control node. This name can
be used to reference this node with a Phantom control node.
Time Constants
Increase: Enter the amount of time it should take for the output signal to exponentially
increase by (1 – 1/e)% of the total change in the input signal when it rises from one state to
the next. The format is hh:mm:ss.
Decrease: Enter the amount of time it should take for the output signal to exponentially
decrease by (1 – 1/e)% of the total change in the input signal when it falls from one state to
the next. The format is hh:mm:ss.
Description: Enter an optional description for this control element.
Maximum and Minimum
The output will be the maximum or minimum of all input signals to the control node each
time step. Once a node is defined to be of this type, up to three input signals can be drawn
directly into it. More signals can be cascaded through the use of phantom control elements.
Node Name: This is an optional name you can provide for this control node. This name can
be used to reference this node with a Phantom control node.
Description: Enter an optional description for this control element.
6
PART 1 – PARTICULATE CONTAMINANTS
than the time span, the output will be the average of the input up to that time.
Node Name: This is an optional name you can provide for this control node. This name can
be used to reference this node with a Phantom control node.
Time Span: Enter the amount of time included in the running average, ∆tint. The format is
hh:mm:ss.
Description: Enter an optional description for this control element.
7
PART 2 – INTRODUCTION
8
PART 2 – CONTAMX PROGRAM STRUCTURE
9
PART 2 – CONTAMX PROGRAM STRUCTURE
af_mat_alc( )
[function in file matset.c]
Allocate remaining airflow solution arrays.
Determine number of non-zero coefficients in symmetric matrix – in ija_minset( )
Allocate and set the ija index vector – in ija_minset( )
Allocate the sa, b, and x coefficients vectors
For symmetric skyline solution method allocate remaining arrays – in sky_alc( )
For conjugate gradient method allocate p, pp, r, rr, z, zz, and preconditioning vectors
For Gauss elimination allocate aa full matrix
af_mat_set( )
[function in file matset.c]
Set up airflow matrices.
Transfer control parameters from _rcdat to the structure for airflow calculations
Set up vector of pointers to nodes with constant pressure nodes last
Determine positions of all non-zero elements in flow solution matrix – in acolset( )
Allocate and fill the ijf vector sparse data mapping – see Sparse Matrix Data Structure
For the skyline method for solving simultaneous algebraic equations
Report the initial matrix profile structure – in ija_prfl( )
Compute new sequence of equations to reduce average profile – in ija_optord( )
Reset the airflow equation numbers in the node data structures
Report the final matrix profile structure
Allocate remaining arrays depending on solution method – see af_mat_alc( )
Set pointers for off-diagonal elements in the link structures
Report solution notes to the LOG file
ambtctm_get( )
[function in file weather.c]
Get the weather file data for the current simulation time.
Note: the _ambtctm structure defined in weather.c holds data for computing the contaminant
mass fractions at the current simulation time (_sim_time) from data in the contaminant file at the
times (time0 and time1) that bound the _sim_time.
Set the contaminant file pointer
Reset time at end-of-day
Read the contaminant file until time0 < _sim_time <= time1
Reset time0 and corresponding data as necessary
Check the data date
Read and store the time and corresponding contaminant data
Determine the mass fraction of the first non-trace contaminant
Set contaminant data for current simulation; use linear interpolation if not at time1
Transfer data to the structure for _ambt node global variable
10
PART 2 – CONTAMX PROGRAM STRUCTURE
ambtctm_init( )
[function in file weather.c]
Initial processing of the contaminant file.
Open the contaminant file – using nxtopen( )
Confirm file type and version
Read the contaminant file start and end dates
Confirm simulation dates within contaminant file dates
Read number of species in file and allocate vectors in _ambtctm structure
Read species names and determine which match simulation contaminants
Position contaminant file at the simulation start date
Read and store contaminant data for time 00:00:00
For cyclic simulation save position in contaminant file of first time step
Determine the mass fraction of the first non-trace contaminant
The weather and contaminant files are read using the nxtword( ) utility function. This requires
that the _unxt file pointer be set to the weather file or the contaminant file before each is read.
calc_SP( )
[function in file simulate.c]
Calculate stack pressures for each flow path.
This function computes the P1, P2, and ρg(z1-z2) terms from the Bernoulli equation:
ρV12 ρV22
∆P = P1 +
2 − P2 + 2 + ρg ( z1 − z 2 )
P1 and P2 are computed by a hydrostatic adjustment to the reference pressures in nodes 1 and 2.
z1 and z2 are the elevations of the ends of the link relative to nodes 1 and 2. For airflow paths the
elevations are identical. They may differ for ducts. The algorithm includes hydrostatic
equations for incompressible and compressible air.
The final result is an estimate for the pressure drop across each opening based on the reference
pressures in the connected nodes, the wind pressure, and the ‘stack’ pressure.
calc_WP( )
[function in file simulate.c]
Calculate wind pressures for each flow path.
The wind pressure for links not connecting to the ambient node is zero. It is also zero if no wind
pressure model has been specified for the link. Wind pressure models include constant value,
linear interpolation using lint1d( ), spline interpolation using splint( ), and a trigonometric
interpolation using htrigf( ), between user specified wind pressure values as a function of relative
azimuth angle.
ctrl_links( )
[function in file prjdata.c]
Set control nodes and links for simulation.
11
PART 2 – CONTAMX PROGRAM STRUCTURE
ctrl_sim( )
[function in ctrlsim.c]
Process day-schedules, exposure-schedules, and controls.
Set clock-time (incl. DST) and day type
Loop through the week-schedule list
Loop through the control nodes list
Set any scheduled zone temperatures
Loop through the exposure-schedule list
de_mat_alc( )
[function in file matset.c]
Allocate differential equation solution arrays.
Determine number of non-zero coefficients in symmetric matrix – see ija_minset( )
Allocate and set the ija index vector – see ija_minset( )
Allocate the sa, b, and x coefficients vectors
For symmetric skyline solution method allocate remaining arrays – in sky_alc( ) in file matset.c
For conjugate gradient method allocate p, pp, r, rr, z, zz, and preconditioning vectors
For Gauss elimination allocate aa full matrix.
FillAf( )
[function in afesim.c]
Fill the Jacobian matrix for air flows.
Clear the Jacobian coefficients vector
Loop through all air links
Initialize the coefficients on the diagonal to dM/dt for variable pressure nodes
Initialize the coefficients on the diagonal to 1.0 for variable pressure nodes
Initialize the ∑ F and ∑ |F| values for each node.
Loop through all air links
If a numerical derivative is being computed
Compute flows for adjusted pressure drop
For each flow (1 or 2) through the link
Compute dF/dP if a numerical derivative is used
Add flows to the ∑ F and ∑ |F| values
12
PART 2 – CONTAMX PROGRAM STRUCTURE
Note the use a linked list of link (path) structures and of C pointer to functions:
for( pp=_pafp0; pp; pp=pp->next) // loop through all flow paths
{
IX (*pf)(AF_PATH ) = pp->pe->pfunc; // pointer to simulation function
. . .
pf( pp ); // compute the flow(s) through path pp
. . .
The linked list provides a very simple structure to loop through the flow paths. The pointers to
functions provide a way to call the different types of flow paths without creating a switch
statement to access each different type of path. The functions to evaluate each different type of
flow path or duct are included in file afesim.c.
Fill_Mf( )
[function in solvmf.c]
ija_minset( )
[function in file matset.c]
Minimize the sparse matrix index vector.
Reduce the "full" sparse matrix index vector, ijf, to ija which does not include diagonal elements
or upper triangle, if symmetric. Call once with count = 0 to determine size of ija, then call with
count = 1 to fill ija.
ija_optord( )
[function in file matset.c]
Determine the optimum (minimum profile) ordering for a set of simultaneous equations.
From the old sparse matrix index vector ija (see Sparse Matrix Data Structure) use the ACM
Transactions On Mathematical Software (TOMS) 582 algorithm to compute a new optimum
ordering for the variable pressure/mass/… rows. The TOMS 582 algorithm has been converted
from Fortran to C in file gpskc.c. Return the new ordering in the new vector. Return 1 if the
ordering has changed, 0 if it has not.
init_Af( )
[function in solvaf.c]
Use linear relations to determine initial guess for pressures.
Zero the sparse matrix array
Loop through all links setting airflow matrix coefficients for linear flow elements models
Solve the simultaneous linear equations for node pressures – see solve_slae( )
Set up the coefficients of the airflow matrix so that solution of the simultaneous linear equations
will give an initial guess of pressures to start the Newton-Raphson method for solving the non-
13
PART 2 – CONTAMX PROGRAM STRUCTURE
linear airflow equations. This initialization tends to save a few N-R iterations and is useful for
cases involving large numbers of airflow nodes.
init_Mfn( )
[function in solvmf.c]
Initialize arrays for non- trace mass fraction calculations.
Set the initial mass fractions in the zones and junctions.
Set the initial mass fractions in the boundary layer controlled sinks.
Set up the matrix for computing the mass fractions – in Fill_Mf( )
init_Mft( )
[function in solvmf.c]
Initialize arrays for trace mass fraction calculations.
Set the initial mass fractions in the zones and junctions.
Set the initial mass fractions in the boundary layer controlled sinks.
Set up the matrix for computing the mass fractions – in Fill_Mf( )
mat_init( )
[function in file contamx.c]
Allocate the matrices for solving airflows and mass fractions.
Allocate _facBins to report airflow solution iterations
Set up airflow matrices – see af_mat_set( )
Set numerical derivative flags – in setNmDrv( )
If using non-trace contaminants
Copy control parameters from _rcdat to _MFn_mat
Set up non-trace mass matrices – see mf_mat_set( )
If using trace contaminants
Copy control parameters from _rcdat to _MFt_mat
Set up trace mass matrices – see mf_mat_set( )
mat_term( )
[function in file contamx.c]
Free the allocated matrices for solving airflows and mass fractions.
All heap memory allocated in mat_init( ) is freed in reverse order in mat_term( ). Other memory
allocated earlier in prj_read( ), contamx( ), and main( ) is also freed.
mf_mat_set( )
[function in file matset.c]
Set up contaminant matrices.
Transfer control parameters from _rcdat to the structure for mass fraction calculations
Set up vector of pointers to nodes with constant pressure nodes last
Determine positions of all non-zero elements in flow solution matrix – in acolset( )
Allocate and fill the ijf vector sparse data mapping – see Sparse Matrix Data Structure
14
PART 2 – CONTAMX PROGRAM STRUCTURE
prj_read( )
[function in file prjread.c]
Read the project (PRJ) file.
This and related functions in the same file have been written to read the project file for
ContamW or for ContamX depending on the definition of the macro CTMW being 1 or zero,
respectively. ContamW uses data such as sketchpad data and units for displaying parameters
that are not needed in ContamX.
The ContamW version of prj_read( ) includes code for updating previous versions of the project
file. Sections of the project file are read by functions within the prjread.c file. Sections are
ordered so that items referenced by pointers in the data structures are read before they are
referenced. For example, a flow path must refer to a flow element, so flow elements are read
before flow paths. If a significant error is encountered while reading any section, input
processing is terminated and an error code is returned by prj_read( ).
The ContamW version calls functions to check and process pointers in the controls because
control nodes have pointers to other control nodes. The ContamX version includes related
processing for controls and functions to create the airflow network by converting zones and
junctions to network nodes and converting paths and ducts to network links – see sim_data( ).
Several temporary data structures are allocated, used, and then freed. For example, most named
elements such as schedules, filters, flow elements, etc., are stored in individually allocated
structures with an allocated vector of pointers to those structures. When such an element is later
referenced by sequence number, that number is converted to the pointer to the element according
to the vector of pointers.
sim_data( )
[function in file prjdata.c]
Convert project data to forms used for simulation.
Transfer elements from the _rcdat structure to individual global variables
Transfer steady-state weather data to ambient airflow node.
Transfer default contaminant concentrations to ambient airflow node.
Set ductwork junction volumes – in jct_set( )
Set airflow node data – in afnd_set( )
Set airflow link data – in afpt_set( )
Define implicit flow elements: simple AHS and duct leaks
Set implicit flow paths
15
PART 2 – CONTAMX PROGRAM STRUCTURE
sim_init( )
[function in file simulate.c]
Initialize flows and compute steady-state mass fractions.
If using non-trace contaminants
Compute gas constant for mixed air in each zone
Compute mass of air in each zone
If using WPC File
Get wind pressure from WPC File [in WPC_get()]
Compute wind pressures – see calc_WP( )
Compute stack pressures – see calc_SP( )
Initial guess for pressures by linear flow approximation - see init_Af( )
Reset convergence and time step values
Iterate through density changes:
{
Solve for airflows by Newton-Raphson iteration with
simple trust region method – see SolveAfstr( )
or simple under-relaxation – see SolveAfsur( )
Break loop if densities have converged
Tighten N-R convergence for next iteration
If using non-trace contaminants
Compute non-trace mass fractions [in init_Mfn() and solv_DE()]
Compute gas constant for mixed air in each zone
Compute mass of air in each zone
Re-compute stack pressures - see calc_SP( )
}
Initialize trace and non-trace mass transfer data – see init_Mfn( ) and init_Mft( )
Compute trace mass fractions [call solv_DE()]
If not initializing for transient simulation, report results – in simout( )
sim_loop( )
[function in file simulate.c]
Perform transient simulation.
Set parameters to control output and time step loop
Display information (for DOS window only)
16
PART 2 – CONTAMX PROGRAM STRUCTURE
sim_step( )
[function in file simulate.c]
Simulate a single time-step.
Save mass and mass fraction values at end of last time step
Set all schedule values and process controls - see ctrl_sim( )
Compute scheduled mass gains
Compute wind pressures - see calc_WP( )
Loop until zone masses converge
{
Compute stack pressures - see calc_SP( )
Solve for airflows by Newton-Raphson iteration with
simple trust region method – see SolveAfstr( )
or simple under-relaxation – see SolveAfsur( )
If using non-trace contaminants:
Compute non-trace mass fractions – see solve_Mfn( )
Re-compute gas constant for mixed air in each zone
Compute mass in each zone
Check zone mass convergence
}
Solve trace species mass fractions – see solve_Mft( )
Compute exposure values
17
PART 2 – CONTAMX PROGRAM STRUCTURE
solve_DE( )
[function in file solvde.c]
Solve differential equations by trapezoidal integration and mixed direct/iterative solution of
simultaneous equations.
Solve [A] {x} = {b}. Temporary [A] and {b} created so new {xp} can be calculated.
Solve_Mfn( )
[function in solvmf.c]
Solve for the mass fractions of the non-trace contaminants.
This function uses the same process described in solve_Mft( ) except that only the non-trace
contaminants are considered.
Solve_Mft( )
[function in solvmf.c]
Solve for the mass fractions of the trace contaminants.
See also Solution of the Species Differential Equations.
If on the first iteration during a time step:
Compute the constant (predictor) portions of the difference equation
Fill the [A] matris – in Fill_Mf( )
Solve the difference equations for values at the end of the time step
Transfer results to node and sink structures
SolveAfstr( )
[function in solvaf.c]
Solve symmetric simultaneous non-linear algebraic equations by Newton-Raphson with simple
trust region.
Dr. David Lorenzetti developed this function. It provides a more robust algorithm than the
earlier under-relaxation method. It is the default method and should be used unless some
particular problem is encountered.
SolveAfsur( )
[function in solvaf.c]
Solve symmetric simultaneous non-linear algebraic equations by Newton-Raphson with simple
under-relaxation.
Loop until convergence or iteration limit
Fill the airflow solution matrix – see FillAf( )
Check convergence
Solve simultaneous linear equations for dP values - see solve_slae( )
Under-relax the pressure adjustments
Adjust the airflow node pressures
Clear any numerically insignificant airflows
This method was used in ContamW 1.0 and the earlier DOS versions of CONTAM.
18
PART 2 – CONTAMX PROGRAM STRUCTURE
solve_slae( )
[function in solvse.c]
Solve symmetric simultaneous linear algebraic equations.
Select solution method:
Skyline:
Transfer data from sparse to skyline arrays – in fill_sky_s( )
L-U factor skyline matrix – in luf_sky_s( )
Solve simultaneous equations directly – in lus_sky_s( )
Preconditioned conjugate gradient (PCG):
Transfer data from sparse to preconditioning array – in fill_ssm( )
Perform incomplete Cholesky decomposition – in luf_chl_c( )
Solve simultaneous equations iteratively – in sa_pcg( )
Gauss elimination:
Transfer data from sparse to full arrays – in fill_ges( )
L-U factor the full matrix – in luf_ge( )
Solve the simultaneous equations – in lus_ge( )
The skyline method does a direct solution using a reduced array. It is more reliable than PCG
and usually faster for small problems. The PCG method is faster for large problems if it
converges. The gauss elimination method is only to provide a well-established solution for
comparison with the other methods. It is prohibitively slow for larger problems.
weather_get( )
[function in file weather.c]
Get the weather file data for the current simulation time.
Note: the _weather structure defined in weather.c hold data for computing the weather data at the
current simulation time (_sim_time) from data in the weather file at the times (time0 and time1)
that bound the _sim_time.
Set the weather file pointer
Reset time at end-of-day
Read the weather file until time0 < _sim_time <= time1
Reset time0 and corresponding data as necessary
Check the data date
Read and store the time and corresponding data
Reset wind direction for interpolation
Set weather data for current simulation; use linear interpolation if not at time1
Convert ASHRAE humidity ration to Contam mass fraction of H2O
Transfer data to global variables
weather_init( )
[function in file weather.c]
Initial processing of the weather file.
Open the weather file – using nxtopen( )
Confirm file type and version
19
PART 2 – CONTAMX PROGRAM STRUCTURE
Error handling
[functions in file config.c]
Error messages are generated by a call to the error( ) function. Passed parameters include the
severity of the error, the name and line number of the file from which error( ) is called, and an
indefinite number of strings describing the error. The function maintains a count of ‘severe’
errors. The global variable _emode (in setEmode( )) controls display of the error message.
If severity >= 0, the function will merge the message strings into a single string and create
another string reporting the file name and line number – i.e., the source of the error. The
severity, source, and error message are then displayed in a dialog box or the DOS window
depending on _emode, and they are written to the LOG file.
If severity > 2, ContamX will be terminated by calling finish( ) which also closes all open files.
If severity = 2, the count of severe errors is incremented.
If severity < -1, the count of severe errors is reset to zero.
If severity = -1, the only action is to return the current count of severe errors.
If the count of severe errors reaches 10 and the dialog box is in effect, the user will be asked if he
wants to terminate the simulation. If he does not, the count of severe errors is reset to zero.
This prevents an endless display of error messages that could occur in some circumstances.
20
PART 2 – CONTAMX PROGRAM STRUCTURE
The lognote( ) function is used to write similar informative messages to the LOG file only. It is
a debugging tool not intended to be informative to the general ContamX user.
Console input
[functions in file config.c]
getkey( ) is used to read a single keystroke. The wait parameter tells getkey( ) to wait until a
key is pressed or to return immediately if a key has not been pressed.
noyes( ) obtains a no or yes response to a query. It returns 0 for no or 1 for yes. The query is
presented in a dialog box or the DOS window depending on _emode.
Heap tests
[functions in file config.c]
memrem( ) reports the memory still available in the heap. It is useful for determining if heap
memory has been properly freed. It works with the Borland and Watcom compilers but is not
available in Visual C++.
memwalk( ) reports the status of the allocated heap memory and then displays the status of every
heap allocation. This seems to not be working with the current Visual C++.
nptest( ) reports if a value has been written to address 0. This occurs when a value is written to a
null pointer. The test is not applicable to Visual C++.
Heap processing
[functions in file heap.c]
All memory allocations and de-allocations should go through alc_e( ) and fre_e( ) to allow some
useful heap checking options based on the definition of the macro MEMTEST: 1 = test guard
bytes; 2 = log actions; and 0 = no tests. When MEMTEST > 0, four guard bytes are added
before and after the normal heap memory allocation. These guard bytes are used to test writes
and reads beyond the ends of the allocated vector -- especially useful for off-by-one indexing.
Based on an idea and code by Paul Anderson, "Dr. Dobb's C Sourcebook", Winter 1989/90, pp
62 - 66, 94. When MEMTEST > 1, every allocation and de-allocation is reported in the LOG
file.
alc_e( ), fre_e( ), and chk_e( ) allocate, de-allocate, and check the guard bytes of a single block
of memory. The check is automatically performed at de-allocation.
alc_mc( ), fre_mc( ), and chk_mc( ) allocate, de-allocate, and check a rectangular matrix (2-
dimensional array) given minimum and maximum row and column indices. Memory is allocated
contiguously.
alc_mvc( ), fre_mvc( ), and chk_mvc( ) allocate, de-allocate, and check a matrix with variable
length rows (used to store skyline method coefficients).
21
PART 2 – CONTAMX PROGRAM STRUCTURE
alc_v( ), fre_v( ), and chk_v( ) allocate, de-allocate, and check a vector (2-dimensional array)
given the minimum and maximum indices.
alc_ec( ), fre_ec( ), and alc_eci( ) speed and simplify allocation and de-allocation for many
small structures such as the Contam zones, paths, schedules, flow elements, etc. Small structures
are ‘allocated’ within a larger allocated block which is initially created with alc_eci( ). A single
call to fre_ec( ) will de-allocate the entire block; individual structures cannot be freed. This
saves quite a bit of memory allocation overhead and is quite a bit faster than calling alloc( ) for
each small structure. Based on an idea and code by Steve Weller, "The C Users Journal", April
1990, pp 103 - 107.
22
PART 2 – CONTAMX PROGRAM STRUCTURE
readMD( ) reads the next word (ddmm, mmdd) from file _unxt and converts it to a day-of-year
number (1 - 365).
readMDx( ) reads the next word (dd/mm) from file _unxt and converts it to a day-of-year
number (1 - 365).
The “default size” integer is 2-bytes for a 16 bit compiler and 4-bytes for a 32 bit compiler.
CONTAM presently enforces the rule that such an integer must be in the range -32767 to
+32767, i.e., fits in a 2-byte integer. This limits the maximum number of zones, paths, etc., to
32767. Relaxing this limit will also require the conversion of small integers in the data
structures.
23
PART 2 – CONTAMX PROGRAM STRUCTURE
designed for the solution algorithm being employed. There is a small run-time overhead for this
process, but it is very flexible when it is not known that a single best solution method exists for
all cases.
24
PART 2 – CONTAMX PROGRAM STRUCTURE
and
~
{B} = {Q}t − ∆t + γ ∆t {G}t (9)
In equation (8) there appears to be the possibility of a coefficient on the diagonal of [A] going to
zero. This should not happen because kn,n < 0 (and kn,m ≥ 0) which forces an,n > 0 (and an,m ≤ 0).
The only possible problem is in the case of an isolated node, kn,n = 0, that is also massless, cn = 0,
which will require special handling.
Note on derivation of equations (7) - (9) from equation (5):
~
[C ]t { X }t = {Q}t − ∆t + γ ∆t ([ K ]t { X }t + {G}t ) (10)
( [C ]t − γ ∆t [ K ]t ){ X }t ≈ {Q~}t −∆t + γ ∆t {G}t (11)
25
PART 2 – PROJECT FILE (.PRJ)
26
PART 2 – PROJECT FILE (.PRJ)
27
PART 2 – PROJECT FILE (.PRJ)
28
PART 2 – PROJECT FILE (.PRJ)
The following lines define path location data (PLDDAT) for the creating the WPC file:
{Contam 2.1}
_WPCfile[_MAX_PATH] // full name of WPC file (I1)
EWCfile[_MAX_PATH] // full name of EWC data source file (I1) {W}
WPCdesc[] // WPC description (I1) {W}
X0 // X-value of ContamW origin in EWC coordinates [m] (R4) {W}
Y0 // Y-value of ContamW origin in EWC coordinates [m] (R4) {W}
Z0 // Z-value of ContamW origin in EWC coordinates [m] (R4) {W}
angle // Rotation of ContamW relative to EWC coordinates (R4) {W}
u_XYZ // units of coordinates (I2) {W}
epsPath // tolerance for matching path locations [-] (R4) {W}
epsSpcs // tolerance for matching species [-] (R4) {W}
tShift // time shift of EWC data {W} [s] (hh:mm:ss → IX) {W}
dStart // date WPC data starts (I2) {W}
dEnd // date WPC data ends (I2) {W}
_useWPCwp // if true, use WPC file wind pressures (I2)
_useWPCmf // if true, use WPC file mass fractions (I2)
The next line defines the location (LOCDAT) (for future use with thermal simulation):
latd // latitude (degrees: north +, south -) (R4)
lgtd // longitude (degrees: east +, west -) (R4)
Tznr // time zone (Greenwich = 0, Eastern = -5, etc.) (R4)
altd // elevation above sea level [m] (R4)
Tgrnd // ground temperature [K] (R4)
utg // units for ground temperatures (I2)
u_a // units for elevation (I2)
The remaining data is stored in the run control (RCDAT) structure. In ContamX some values
may be transferred to other variables before being used. The next two lines control the airflow
simulation – first the nonlinear part:
sim_af // airflow simulation: 0 = steady, 1 = dynamic (I2)
afcalc // N-R method for non-linear eqns: 0 = SUR, 1 = STR (I2)
afmaxi // maximum number of N-R iterations (I2)
afrcnvg // relative airflow convergence factor (R4)
afacnvg // absolute airflow convergence factor [kg/s] (R4)
afrelax // flow under-relaxation coefficient (for SUR) (R4)
uac2 // units for afacnvg (I2)
and then the linear part:
afslae // method for linear equations: 0 = SKY, 1 = PCG (I2)
aflmaxi // maximum number of iterations (PCG) (I2)
aflcnvg // relative convergence factor for (PCG) (R4)
afrseq // if true, resequence the linear equations (I2)
aflinit // if true, do linear airflow initialization (I2)
Tadj // if true, use temperature adjustment (I2)
The next three lines control the mass fraction calculation – first for cyclic simulation:
sim_mf // mass fraction (contaminant) simulation:
// 0 = none, 1 = steady, 2 = transient, 3 = cyclic (I2)
ccmaxi // simulation: maximum number of cyclic iterations (I2)
ccrcnvg // relative convergence factor (R4)
ccacnvg // absolute convergence factor [kg/kg] (R4)
ccrelax // (unused) over-relaxation coefficient (R4)
29
PART 2 – PROJECT FILE (.PRJ)
30
PART 2 – PROJECT FILE (.PRJ)
_achsave / save[4] // (0/1) save building air exchange rate transient data
_abwsave / save[5] // (0/1) save air exchange rate box-whisker data
_cbwsave / save[6] // (0/1) save contaminant box-whisker data
_expsave / save[7] // (0/1) save exposure transient data
_ebwsave / save[8] // (0/1) save exposure box-whisker data
_zaasave / save[9] // (0/1) save zones age-of-air transient data
_zbwsave / save[10] // (0/1) save zones age-of-air box-whisker data
save[11-30] // (unused; values 3—30 subject to change without notice) (I1)
save[31] // ContamW will cause ContamX to display a dialog box (I1) {W}
The run control section is terminated with:
-999 // used to check for a read error in the above data
Note on outputs: _pfsave and _zfsave always have the same value – 0 or 1. The summaries,
save[3] to save[10] are not currently active. They were developed for Contam96 to summarize
the results of long simulations.
Example:
ContamW 2.1 0
Test CONTAMW for proper display of all elements.
! rows cols ud uf T uT N wH u Ao a
58 66 0 0 296.150 2 0.00 10.00 0 0.600 0.280
! Ta Pb Ws Wd rh day u..
293.150 101325.0 0.000 0.0 0.500 1 2 0 0 1 ! steady simulation
293.150 101325.0 1.000 270.0 0.000 1 2 0 0 1 ! wind pressure test
null ! no weather file
null ! no contaminant file
null ! no continuous values file
null ! no discrete values file
null ! no WPC file
null ! no EWC file
WPC description
! Xref Yref Zref angle u
0.000 0.000 0.000 0.00 0
! epsP epsS tShift dStart dEnd wp mf
0.01 0.01 00:00:00 1/1 1/1 0 0
! latd longtd tznr altd Tgrnd u..
40.00 -90.00 -6.00 0 283.15 2 0
!sim_af afcalc afmaxi afrcnvg afacnvg afrelax uac
1 1 30 0.0001 1e-005 0.75 0
! afslae aflmaxi aflcnvg afrseq aflinit Tadj
0 100 1e-006 1 1 0
!sim_mf method maxi relcnvg abscnvg relax gamma ucc
2 30 1.00e-004 1.00e-005 1.250 0 ! (cyclic)
0 100 1.00e-006 1.00e-015 1.100 1.000 0 ! (non-trace)
0 100 1.00e-006 1.00e-015 1.100 1.000 0 ! (trace)
!sim_vt tsdens relax tsmaxi
0 0 0.75 20
!date_st time_st date_0 time_0 date_1 time_1 t_step t_list t_scrn
Jan01 00:00:00 Jan01 00:00:00 Jan01 24:00:00 01:00:00 01:00:00 01:00:00
!restart date time
0 Jan01 00:00:00
!list pfsave zfsave zcsave
31
PART 2 – PROJECT FILE (.PRJ)
0 1 1 1
!vol ach -bw cbw exp -bw age -bw
0 0 0 0 0 0 0 0
!... _doDlg
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-999
32
PART 2 – PROJECT FILE (.PRJ)
33
PART 2 – PROJECT FILE (.PRJ)
34
PART 2 – PROJECT FILE (.PRJ)
35
PART 2 – PROJECT FILE (.PRJ)
90.0 0.200
135.0 0.800
180.0 1.000
225.0 0.800
270.0 0.200
315.0 0.800
360.0 1.000
-999
Section 8: Filters
Filter data are read by the filter_read( ) function and saved by the filter_save( ) function. The
data are stored in the FLT_DSC structures that are defined in contam.h for ContamW and
simdat.h for ContamX.
The filter section starts with:
_nfilt // number of filters (I2)
This is followed by a data header comment line and then data for all _nfilt filters.
For each reaction the first data line includes:
36
PART 2 – PROJECT FILE (.PRJ)
C1 0.1
C2 0.2
-999
37
PART 2 – PROJECT FILE (.PRJ)
38
PART 2 – PROJECT FILE (.PRJ)
Constant Coefficient
1 1 0 0
2 C1 prs s2
Pressure driven
2 2 0
3 C1 cut s3
Cut-off Concentration
3 3 0 0
4 C1 eds s4
Decaying Source
4 4 0 0
5 C1 bls s5
Boundary Layer Diffusion
5 5 5 5 0 0 0
6 C2 brs s6
Burst
6 0
-999
39
PART 2 – PROJECT FILE (.PRJ)
40
PART 2 – PROJECT FILE (.PRJ)
41
PART 2 – PROJECT FILE (.PRJ)
42
PART 2 – PROJECT FILE (.PRJ)
nB // number of bends
u_L // units of length
u_W // units of width
u_D // units of depth
43
PART 2 – PROJECT FILE (.PRJ)
44
PART 2 – PROJECT FILE (.PRJ)
45
PART 2 – PROJECT FILE (.PRJ)
1234.12 123456
22 23 qfr_qab QF_QAB
QF_QAB Qadratic volume flow model
1 1234.12
23 23 qfr_test2 QF_TEST2
QF_TEST2 Quadratic test data (2 points)
-44.6461 13430.1 4 0.019 10 0.029 0 0 0 0
24 30 fan_cmf a
1 0
-999
46
PART 2 – PROJECT FILE (.PRJ)
47
PART 2 – PROJECT FILE (.PRJ)
48
PART 2 – PROJECT FILE (.PRJ)
Example:
9 ! flow|duct elements:
1 23 dct_dwc Dct1
Duct one.
9e-005 0 4
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
2 23 dct_plr Dct2
Duct two
2.4e-005 0.00848528 0.5 0.01 0.1 0.6 0 0
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
3 23 dct_fcn Dct3
Duct three.
3.52946e-005 0.01 0.5
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
4 23 dct_qcn Dct4
Duct four
3.52946e-005 0.01 0.5
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
5 23 dct_fan Dct5
Duct five
7.2e-006 0.00848528 0.5 1.2041 4.53711 764.429 0.1
764.429 -22.0238 28.2143 -13.3333 5 0.01 0
0 0 765 0 765 0
1 0 755 0 755 0
2 0 730 0 730 0
3 0 590 0 590 0
4 0 275 0 275 0
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
6 23 dct_cmf Dct6
Duct 6
1 0
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
7 23 dct_cvf Dct7
Duct seven
1 0
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
8 23 dct_bdq Dct8
Duct eight
3.52946e-005 0.01 0.5 0.0001 0.5
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
0 4 4 2 4 4 0 0
9 23 dct_bdf Dct9
Duct nine
3.52946e-005 0.01 0.5 0.0001 0.5
0.2 0.628319 0.0314159 0.2 0.2 0 0 250
49
PART 2 – PROJECT FILE (.PRJ)
0 4 4 2 4 4 0 0
-999
50
PART 2 – PROJECT FILE (.PRJ)
51
PART 2 – PROJECT FILE (.PRJ)
52
PART 2 – PROJECT FILE (.PRJ)
53
PART 2 – PROJECT FILE (.PRJ)
54
PART 2 – PROJECT FILE (.PRJ)
55
PART 2 – PROJECT FILE (.PRJ)
56
PART 2 – PROJECT FILE (.PRJ)
Each data line contains _nctm mass fractions (R4) in contaminant order.
The initial zone concentrations section is terminated with:
-999 // used to check for a read error in the above data
Example:
38 ! initial concentrations:
! J# C1 C2
1 1.000e+000 2.000e+000
2 1.000e+000 2.000e+000
3 1.000e+000 2.000e+000
4 1.000e+000 2.000e+000
5 1.000e+000 2.000e+000
6 1.000e+000 2.000e+000
7 1.000e+000 2.000e+000
8 1.000e+000 2.000e+000
9 1.000e+000 2.000e+000
10 1.000e+000 2.000e+000
11 1.000e+000 2.000e+000
12 1.000e+000 2.000e+000
13 1.000e+000 2.000e+000
14 1.000e+000 2.000e+000
15 1.000e+000 2.000e+000
16 1.000e+000 2.000e+000
17 1.000e+000 2.000e+000
18 1.000e+000 2.000e+000
19 1.000e+000 2.000e+000
-999
57
PART 2 – PROJECT FILE (.PRJ)
58
PART 2 – PROJECT FILE (.PRJ)
Example:
6 ! source/sinks:
! # z# e# s# c# mult CC0
1 1 1 0 0 1 0
2 1 2 0 0 1 0
3 1 3 0 0 1 0
4 1 4 0 0 1 0
5 1 5 0 0 1 0
6 1 6 1 0 1 0
-999
59
PART 2 – PROJECT FILE (.PRJ)
60
PART 2 – WEATHER FILE (.WTH)
61
PART 2 – WEATHER FILE (.WTH)
62
PART 2 – CONTAMINANT FILE (.CTM)
The file description may not begin with a ‘!’. The StartDate and EndDate are used to verify that
the file data covers the entire period to be simulated. The StartDate may not be later than the
EndDate. The contaminant names are matched against the names of the contaminants to be
simulated. Concentrations for names that do not match will be ignored.
The concentration data must start at time 00:00:00 on the StartDate and end at 24:00:00 on the
EndDate. The times must be in consecutive order, but the difference between successive times
need not be constant. Concentrations are given in units of mass (or density) of contaminant per
mass (or density) of air, air being the sum of all species including non-contaminants.
NOTE: Be sure to set the date formats as shown in the sample below when editing/saving tab-
delimited files with a spreadsheet program
Example:
SpeciesFile ContamW 2.0
Demo ctm file for Jan 1 - Jan 3
1/1 1/3 2
CO CO2
!Date Time CO CO2
1/1 0:00:00 9.17E-07 5.23E-04
1/1 1:00:00 9.17E-07 5.23E-04
63
PART 2 – RESTART FILE (.RST)
1/1 2:00:00 9.17E-07 5.23E-04
. . .
1/2 24:00:00 9.17E-07 5.23E-04
1/2 1:00:00 9.17E-07 5.23E-04
1/2 2:00:00 9.17E-07 5.23E-04
. . .
1/3 24:00:00 9.17E-07 5.23E-04
1/3 1:00:00 9.17E-07 5.23E-04
1/3 2:00:00 9.17E-07 5.23E-04
. . .
1/3 24:00:00 1.41E-06 5.23E-04
HEADER DATA:
m[0] = 0L; /* TURBO C++ messes up the first bytes written; */
m[1] = (I4)_nzone; /* therefore, send 4 unused bytes. */
m[2] = (I4)_npath;
m[3] = (I4)_nctm;
m[4] = (I4)_njct;
m[5] = (I4)_ndct;
m[6] = (I4)_ncss;
m[7] = (I4)_nctrl;
m[8] = (I4)_rcdat.date_0;
m[9] = (I4)_rcdat.date_1;
m[10] = (I4)_rSizeData;
m[11] = (not set)
m[1] thru m[7] allow ContamW to check for some changes in the project.
m[8] and m[9] are the date limits displayed to the user.
m[11] will allow reading all dates on the file -- could be used to
create a selection box of available dates.
RESTART DATA:
For all AF_NODEs:
R8 T - temperature
64
PART 2 – CONTINUOUS VALUES FILE (.CVF)
R8 P - pressure
R8 M - mass
R4 Mf[_nctm] - mass fractions
For all AF_PATHs:
R8 Flow[0] - primary flow
R8 Flow[1] - secondary flow
R8 dP - pressure drop
For CSS_DSC:
CSE_EDS (I4)pss->local (stored as R4, converted to I4 in simulation)
CSE_BLS (R4)pss->local
For CT_NODEs:
SNSDAT: R4 oldsig
PICDAT: R4 oldsig, R4 olderr
HYSDAT: R4 oldsig
65
PART 2 – DISCRETE VALUES FILE (.DVF)
Node names may not include imbedded blanks. Data for nodes that are not in the project file
will be ignored. If a CVF node name in the project file is not included in the CVF, a fatal error
will result. ContamW will assist the user by checking node names. ContamX will perform the
name check before simulation begins.
Example:
ContinuousValuesFile ContamW 2.1
Sample CVF file
1/1 1/3
4
node1
node2
node3
node4
1/1 00:00:00 0.0 0.5 0.5 1.0
1/1 04:00:00 1.0 0.0 1.0 0.0
1/1 08:00:00 0.5 0.5 0.5 0.5
1/1 12:00:00 0.0 1.0 0.0 1.0
1/1 16:00:00 1.0 0.5 0.5 0.0
1/1 24:00:00 0.0 0.5 0.5 1.0
1/2 04:00:00 1.0 0.0 1.0 0.0
1/2 08:00:00 0.5 0.5 0.5 0.5
1/2 12:00:00 0.0 1.0 0.0 1.0
1/2 16:00:00 1.0 0.5 0.5 0.0
1/2 24:00:00 0.0 0.5 0.5 1.0
1/3 04:00:00 1.0 0.0 1.0 0.0
1/3 08:00:00 0.5 0.5 0.5 0.5
1/3 12:00:00 0.0 1.0 0.0 1.0
1/3 16:00:00 1.0 0.5 0.5 0.0
1/3 24:00:00 0.0 0.5 0.5 1.0
66
PART 2 – SIMULATION RESULTS FILE (.SIM)
The file description may not begin with a ‘!’. The StartDate and EndDate are used to verify that
the file data covers the entire period to be simulated. The StartDate may not be later than the
EndDate. Data elements on a single line are separated by tabs. The data must be in time-
sequential order. More than one node may change at the same time with each node listed on a
separate line. The file values must be in the units needed for the signal created by the control
node. Each day should end with a line of the form: date 24:00:00 0 0.
Node names may not include imbedded blanks. Data for nodes that are not in the project file
will be ignored. If a DVF node name in the project file is not included in the DVF, a fatal error
will result. ContamW will assist the user by checking node names. ContamX will perform the
name check before simulation begins.
Example:
DiscreteValuesFile ContamW 2.1
Sample DVF file
01/1 01/03
4
node1 0.0
node2 0.5
node3 0.5
node4 1.0
1/1 02:00:00 1 0.75
1/1 02:30:00 3 0.25
1/1 03:00:00 4 0.00
1/1 08:00:00 2 1.00
1/1 12:45:00 1 1.00
1/1 21:30:00 1 0.75
1/1 24:00:00 0 0.00
1/2 01:30:00 1 0.00
1/2 07:59:59 3 0.25
1/2 23:30:00 1 0.75
1/2 24:00:00 0 0.00
1/3 18:00:00 3 1.00
1/3 24:00:00 0 0.00
67
PART 2 – SIMULATION RESULTS FILE (.SIM)
_npath // number of airflow paths (I4)
_nctm // number of contaminants (I4)
_time_list // listing time steps [s](I4)
_date_0 // start of simulation - day of year (I4)
_time_0 // start of simulation - time of day (I4)
_date_1 // end of simulation - day of year (I4)
_time_1 // end of simulation - time of day (I4)
_pfsave // if true, write path flow results (I4)
_zfsave // if true, write zone flow results (I4)
_zcsave // if true, write zone contaminant results (I4)
_nafnd // number of airflow nodes (zones + junctions) (I4)
_nccnd // number of contaminant nodes (zones + junctions) (I4)
_nafpt // number of airflow paths (paths + ducts) (I4)
The next _nafnd lines give the contaminant node cross-reference data:
typ // source of node [zone or junction] (U2)
nr // zone or junction number (U2)
The next _nafpt lines give the airflow path cross-reference data:
typ // source of path [path, duct, or leak] (U2)
nr // path, duct, or leak number (U2)
The simulation results for each day consist of:
The results for each time step consist of:
A line of time and ambient data:
dayofy // day of year [1 to 365] (I2)
daytyp // type of day [1 to 12] (I2)
sim_time // time value [s] [0 to 86400] (I4)
Tambt // ambient temperature [k] (R4)
P // barometric pressure [Pa] (R4)
Ws // wind speed [m/s] (R4)
Wd // wind angle [deg] (R4)
CC[0] // ambient mass fraction of species 0 [kg/kg] (R4)
...
CC[n] // ambient mass fraction of species n [kg/kg] (R4)
A line of data for each airflow path:
nr // path number; use as check (I2)
dP // pressure drop across path [Pa] (R4)
Flow0 // primary flow value [kg/s] (R4)
Flow1 // alternate flow value [kg/s] (R4)
A line of data for each airflow node (excluding ambient):
nr // node number; use as check (I2)
T // node temperature [K] (R4)
P // node reference pressure [Pa] (R4)
D // node air density [kg/m^3] (R4)
A line of data for each contaminant node (excluding ambient):
nr // node number; use as check (I2)
CC[0] // mass fraction of species 0 [kg/kg] (R4)
68
PART 2 – CONTROLS LOG FILE (.LOG)
...
CC[n] // mass fraction of species n [kg/kg] (R4)
The time step data is followed by summary data for the day.
It begins with the following line of ambient data:
dayofy // day of year [1 to 365] (I2)
daytyp // type of day [1 to 12] (I2)
Tamax // maximum ambient temperature [k] (R4)
Tamin // minimum ambient temperature [k] (R4)
Pavg // average barometric pressure [Pa] (R4)
Wsmax // maximum wind speed [m/s] (R4)
Wsavg // average wind speed [m/s] (R4)
CC[0] // maximum ambient mass fraction of species 0 [kg/kg] (R4)
...
CC[n] // maximum ambient mass fraction of species n [kg/kg] (R4)
A line of data for each airflow path:
nr // path number; use as check (I2)
dPmax // maximum pressure drop across path [Pa] (R4)
Flowmax // maximum primary flow value [kg/s] (R4)
0.0 // place holder (R4)
A line of data for each airflow node (excluding ambient):
nr // node number; use as check (I2)
T // node temperature [K] (R4)
P // node reference pressure [Pa] (R4)
D // node air density [kg/m^3] (R4)
A line of data for each contaminant node (excluding ambient):
nr // node number; use as check (I2)
CCmax[0] // maximum mass fraction of species 0 [kg/kg] (R4)
...
CCmax[n] // maximum mass fraction of species n [kg/kg]
Note: this file requires that the structures in ContamW and ContamX be compiled using no
greater than 2-byte member alignment (under Visual C++). The file is unreadable if the default
structure member alignment is used.
69
PART 2 – WIND PRESSURE AND CONTAMINANT FILE (.WPC)
At each time:
date // date (mm/dd → IX)
time // time of day (hh:mm:ss → I4)
output[1] // outputs for each report control (R4)
output[2]
. . .
output[number of report controls]
70
PART 2 – PATH LOCATION DATA FILE (.PLD)
...
conc[NumPath] // concentration at path[NumPath] [kg/kg air] (R4)
Fourth line (for second contaminant, if needed):
...
The file description may not begin with a ‘!’. The StartDate and EndDate are used to verify that
the file data covers the entire period to be simulated. The StartDate may not be later than the
EndDate.
The data must start at time 00:00:00 on the StartDate and end at 24:00:00 on the EndDate. The
times must be in consecutive order, but the difference between successive times need not be
constant.
Example:
WPCfile ContamW 2.1
For WPCtest3.prj
2 ! flowpaths
1 ! contaminants
1 ! use pressure flag
0 ! time step
01/01 ! start date
01/01 ! end date
C1
!nr X Y Z map
1 0.000 4.000 1.500 0
2 8.000 4.000 1.500 0
01/01 00:00:00 101325 1.204
101308.30 101306.30
0.0 1.0e-6
01/01 24:00:00 101325 1.2041
101308.30 101306.30
0.0 1.5e-6
71
PART 2 – PATH LOCATION DATA FILE (.PLD)
• The rotation angle is about the Z (vertical) axis. The user must coordinate the direction of
rotation between CONTAM and EWC file coordinates It is assumed there are no rotations
about the X or Y axes.
• The six coordinates on line 6 define a bounding box that surrounds the flow paths within this
file, which could be used to assist the EWC File Converter in rapidly excluding unneeded
points (e.g., that are too distant from the building) during the mapping process. Note that this
bounding box does not necessarily surround the entire building.
• The simulation time step provides a recommendation to the EWC File Converter for reducing
the size of the WPC file, so that only the time steps that coincide with the simulation time
step could be included (which could reduce interpolation required).
• Each flow path is uniquely identified by a combination of flow path type and flow path ID
values.
• Comments begin with an exclamation point (’!’) and may begin at the start of any line (so
that the entire line will be ignored) or after all fields of a line (so that the remainder of the
line will be ignored).
• For user readability, fields should be commented whenever possible.
• The Precision column for the real data types may be interpreted similar to a C scanf()
statement’s conversion specification.
HEADER SECTION:
Line Field Data Type Precision Notes
1 EWC filename character filename includes full path
2 WPC filename character filename includes full path
3 file comments character user-defined notes about this file
4 coordinate headings character this is one line of comments for the next section;
set to “!Xref Yref Zref angle”
5 Xref real %7.3f units of meters
5 Yref real %7.3f units of meters
5 Zref real %7.3f units of meters
5 rotation angle real %8.3f rotation about Z axis in degrees;
positive for CCW direction
6 latitude real %8.4f units of degrees; sign is positive for north
6 longitude real %8.4f units of degrees; sign is positive for east
7 bounding box headings character this is one line of comments for the next section;
set to “!Xmin Xmax Ymin Ymax Zmin Zmax”
8 Xmin real %7.3f units of meters
8 Xmax real %7.3f units of meters
8 Ymin real %7.3f units of meters
8 Ymax real %7.3f units of meters
8 Zmin real %7.3f units of meters
8 Zmax real %7.3f units of meters
72
PART 2 – PATH LOCATION DATA FILE (.PLD)
9 time step headings character this is one line of comments for the next section;
set to “!step shift start end”
10 time step integer units of seconds
10 data shift time format of hh:mm:ss; this is the starting time for
the EWC time steps when converted to WPC
10 start date date format of mm/dd
10 end date date format of mm/dd
11 wind pressures integer 1: include pressures in WPC; 0: don’t
11 number of species integer
11 species map tolerance real %7.3f for use by EWC file converter file to
match species between EWC and PLD files by
molecular weight.
CONTAMINANT DEFINITION SECTION:
12 species headings character this is one line of comments for the next section;
set to “!name m.wt”
The next (number of species) lines contain this data:
for each species…
name character
molecular weight real %6.2f
end for each species
FLOWPATH DEFINITION SECTION:
- number of flow paths integer
- path map tolerance real %7.3f for use by EWC file converter to match flow paths
that are more than this distance away; units of meters;
this field is on the same line as the above field
flow path headings character this is one line of comments for the next section;
set to “!type ID X Y Z”
The next (number of flow paths) lines contain this data:
for each flow path…
flow path ID number integer
x real %7.3f units of meters
y real %7.3f units of meters
z real %7.3f units of meters
end for each flow path
last line marker -999 integer
Example:
C:\Program Files\Contamw2\Prjs\WPCcube.ewc ! EWC file
C:\Program Files\Contamw2\Prjs\WPCcube1.wpc ! WPC file
WPC description
73
PART 2 – CONTAMX LOG FILE (CONTAMX2.LOG)
! Xref Xref Yref angle
0.000 0.000 0.000 0.00
0.0000 0.0000 ! no latitude/longitude
! Xmin Xmax Ymin Ymax Zmin Zmax
0.000 5.000 2.500 10.000 1.000 1.000
! step shift start end
0 00:00:00 1/1 1/1
1 2 0.01 ! pressures flag, # species, mapping tolerence
! name m.wt
CO 28.00
CO2 44.00
4 1.00 ! number of flow paths and mapping tolerance
! id# X Y Z
1 5.000 10.000 1.000
2 0.000 7.500 1.000
3 0.000 5.000 1.000
4 0.000 2.500 1.000
-999
74
PART 2 – CONTAMX LOG FILE (CONTAMX2.LOG)
source/sinks: 0
The second section of the log file summarizes reading the project file. It includes the total heap
memory allocated, heap used temporarily and freed, and the net heap remaining in use. It notes
the number of components in the simulation (in this case for airflows only). This section can
also include an echo of the project file (the echo parameter on the first line of the project file) to
locate any error messages that occur while reading the project file.
75
PART 2 – CONTAMX LOG FILE (CONTAMX2.LOG)
2676 calls to cubic(N)
facBins: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
rangeDWC: 10062 lam, 2459 trns, 141529 turbulent
This is a small (13.5%) improvement because there are 3 (15%) fewer N-R iterations. The
simple trust region is still recommended as being generally more reliable.
The default method for solving the simultaneous linear equations includes reordering the
equations to reduce the profile of the Jacobian matrix. The following results show the impact of
not reordering the equations.
76
PART 2 – CONTAMW CONFIGURATION FILE (CONTAM.CFG)
Skyline Matrix:
Number of rows: 4734
Lower Triangle: 3109960 elements
Upper Triangle: 0 elements
Fill fraction: 0.139
Arrays: 28843652 bytes allocated, 1281568 freed, 27562084 net
...
Time to perform simulation: 1394.17 s
1 calls to SolveAf()
31 calls to FillAf()
22 calls to luf_sky_s()
22 calls to lus_sky_s()
Final: 28874412 bytes allocated, 28874412 freed, 0 net
The number of values stored in the Jacobian has more than tripled (970,000 to 3,100,000),
allocated memory has increased by about 17,000,000 bytes, and – most importantly – the
simulation time is 11.3 times longer. The gains will not be as dramatic for smaller problems and
for those with well-banded Jacobians as can arise from tall buildings. However, the time for
reordering is so small, that it should almost always be tried. The reordering algorithm is not
totally reliable – sometimes it fails and a few crashes have been observed.
The alternate method for solving the simultaneous linear equations is a preconditioned
conjugate-gradient (PCG) algorithm. This is an iterative method (the skyline method is direct)
and may not converge. The following results were achieved for this case:
77
PART 2 – CONTAMW CONFIGURATION FILE (CONTAM.CFG)
Example:
ConfigFile ContamW 2.1 ! file type identification
! anything after an exclamation mark is treated as a comment.
! number of fonts, N, followed by N valid font sizes in increasing order.
! 7 1 2 3 4 5 8 16 ! all valid sizes; size 8 is required.
! 6 1 2 3 5 8 16 -or- 5 1 2 4 8 16 are good choices.
! if the size 1 font crashes the program, remove it.
7 1 2 3 4 5 8 16 ! selected fonts.
0 ! default units: 0 = SI, 1 = IP.
4 ! default flow units: 0 = kg/s, 1 = scfm, 2 = sL/s, 3 = sm3/s,
! 4 = sm3/h, 5 = lb/s, 6 = sft3/h, 7 = sL/min, 8 = kg/h.
20 2 ! default zone temperatures in units:
! 0 = K, 1 = R, 2 = C, 3 = F.
null ! EWC to WPC converter
78
PART 3 – CONTAMW PROGRAM DOCUMENTATION
79
PART 3 – CONTAMW PROGRAM DOCUMENTATION
80
PART 3 – CONTAMW PROGRAM DOCUMENTATION
building level currently displayed on the SketchPad, and the second (preceded by _SL) contains
information related to the level below the current level, i.e. the sublevel.
Contains identifiers indicating a symbol for
_Sketch[row][col] Zones, Flow path, Simple AHS, Supply, Return,
Note, Source Sink and Exposure (0 => empty cell)
_SLSketch[row][col]
_SLWalls[row][col]
_SLLinks[row][col]
_SLCtrls[row][col]
81
PART 3 – CONTAMW PROGRAM DOCUMENTATION
82
PART 3 – CONTAMW PROGRAM DOCUMENTATION
arrays of pointers (e.g. _PathList) that are used to maintain the components in order according to
their location within the building. Building components are numbered starting at the top level in
the upper left hand corner of the SketchPad moving left to right and down the SketchPad then
proceeding down through each level in the same manner. Whenever a project file is saved,
reordering of the array of pointers and renumbering of the building components will be
performed as necessary.
83
PART 3 – CONTAMW PROGRAM DOCUMENTATION
84
PART 3 – CONTAMW PROGRAM DOCUMENTATION
contained in WndProc() associated with each tool set a global flag to indicate which tool is
selected: _bWall, _bBox, _bDuct or _bLink.
The actual drawing process is activated once the user clicks the left mouse button (or hits the
Enter key) at which point the drawing mode is activated and indicated by setting the flag
_bDraw. When in the drawing mode, all mouse commands and keyboard arrow key commands
are captured by the SketchPad window and converted to the ContamW-specific message
CT_DRAW handled by the function SPWndProc_OnCtDraw(). SPWndProc_OnCtDraw() then
calls specific drawing functions depending on the selected drawing tool as indicated by the
drawing tool flags. Drawing is finalized by clicking the left mouse button activating the message
handler SPWndProc_OnLButtonDown(). This message handler will then call the drawing tool
dependant routines to validate the drawing and place the proper icons into SketchPad arrays. If
the drawing was valid then the screen can be updated to reflect the placement of the building
components, e.g., walls, ducts or control links. This is performed via the InvalidateRect()
command that causes the SketchPad window to redraw or repaint itself. SketchPad “painting” is
performed via the WM_PAINT message handler SPWndProc_OnPaint().
The following is a pseudo-code outline of the drawing process, and the following list indicates
the functions and their locations within the source code files.
85
PART 3 – CONTAMW PROGRAM DOCUMENTATION
86
PART 3 – CONTAMW PROGRAM DOCUMENTATION
87
PART 3 – CONTAMW PROGRAM DOCUMENTATION
88
PART 3 – CONTAMW PROGRAM DOCUMENTATION
Figure – SketchPad Displaying Simulation Results of Airflow (blue lines) and Pressure
Difference (red lines) for Airflow Paths
89
PART 3 – CONTAMW PROGRAM DOCUMENTATION
SPWndProc_OnPaint( ) SPWndPro.c
age_of_air() flows_out.c
res_dsp_level( ) resultsw.c
grlinevw( )
wutils.c
grlinehw( )
sketch_status( ) bsketch.c
90
PART 3 – CONTAMW PROGRAM DOCUMENTATION
91
APPENDIX 3A
APPENDIX 3A
This appendix displays the SketchPad arrays presented in section 3.4.1. All of the spreadsheets
presented in this appendix refer to the figure below, and each spreadsheet represents part of the
arrays in which SketchPad data is stored. The associated project file, SParrays.prj, is installed in
the samples subdirectory of the CONTAM 2.1 installation directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 14 11 11 11 11 11 19 11 11 11 11 11 15 0 0
4 0 0 12 0 0 0 0 0 12 0 0 0 0 0 12 0 0
5 0 0 12 0 0 0 0 0 12 0 0 0 0 0 12 0 0
6 0 0 12 0 0 0 0 0 12 0 0 0 0 0 12 0 0
7 0 0 12 0 0 0 0 0 12 0 0 0 0 0 12 0 0
8 0 0 12 0 0 0 0 0 12 0 0 0 0 0 12 0 0
9 0 0 17 11 11 11 11 11 21 11 11 11 11 11 16 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
92
APPENDIX 3A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 133 0 0 0 0 0 133 0 0 0
5 0 0 0 0 0 0 0 131 0 0 0 0 0 131 0 0 0
6 130 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 0
7 0 0 0 0 0 0 0 129 0 0 0 0 0 129 0 0 0
8 0 0 0 5 0 0 0 128 0 5 0 0 0 128 0 0 0
9 0 0 0 0 0 23 0 0 0 0 0 23 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 a a a a a a a a a a a a a a a a a
2 a a a a a a a a a a a a a a a a a
3 a a W W W W W W W W W W W W W a a
4 a a W 1 1 1 1 1 W -2 -2 -2 -2 -2 W a a
5 a a W 1 1 1 1 1 W -2 -2 -2 -2 -2 W a a
6 a a W 1 1 1 1 1 W -2 -2 -2 -2 -2 W a a
7 a a W 1 1 1 1 1 W -2 -2 -2 -2 -2 W a a
8 a a W 1 1 1 1 1 W -2 -2 -2 -2 -2 W a a
9 a a W W W W W W W W W W W W W a a
10 a a a a a a a a a a a a a a a a a
11 a a a a a a a a a a a a a a a a a
12 a a a a a a a a a a a a a a a a a
13 a a a a a a a a a a a a a a a a a
14 a a a a a a a a a a a a a a a a a
15 a a a a a a a a a a a a a a a a a
a = AMBT = 32766
W = WALL = 32767
ZNDF = -2 (undefined zone)
93
APPENDIX 3A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0
5 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 0 0 0
6 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0
7 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
8 0 0 0 1 0 0 0 2 0 -2 0 0 0 0 0 0 0
9 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 162 0 0 0 0 0 162 0 0 0 0 0 0 0
3 0 0 0 146 0 0 0 0 0 144 0 0 0 0 0 0 0
4 0 0 0 154 0 0 0 0 0 144 0 0 0 0 0 0 0
5 0 0 0 144 0 0 0 0 0 144 0 0 0 0 0 0 0
6 0 0 0 162 0 0 0 0 0 162 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
94
APPENDIX 3A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 181 0 0 0 0 0 177 0 0 0 0 0
11 0 0 0 0 0 179 0 0 0 0 0 169 0 0 0 0 0
12 0 0 0 0 0 185 170 168 168 168 168 174 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
95
REFERENCES
REFERENCES
1. Emmerich, S.J., W.S. Dols, and J.W. Axley. Natural Ventilation Review and Plan for Design
and Analysis Tools. NISTIR 6781, National Institute of Standards and Technology. 2001.
2. Dols, W.S. and G.N. Walton. CONTAMW 2.0 User Manual. National Institute of Standards
and Technology. DRAFT 2002.
3. Axley, J.W. Application of Natural Ventilation for U.S. Commercial Buildings. GCR-01-820
NISTIR 6781, National Institute of Standards and Technology. 2001.
4. Axley, J.W. Residential Passive Ventilation Systems: Evaluation and Design. AIVC
Technical Note 54. Coventry, AIVC.
5. ASHRAE 2001. ASHRAE Handbook - 2001 Fundamentals, Atlanta, GA.
6. Irving, S. and E. Uys. CIBSE Applications Manual: Natural Ventilation in Non-domestic
Buildings. 1997, CIBSE: London.
7. Marion, W. and K. Urban. User’s Manual for TMY2s. National Renewable Energy
Laboratory, 1995.
8. Press, W.H., S.A. Teukolsky, W.T. Vetterling & B.P. Flannery. 1992. Numerical Recipes in
C: the Art of Scientific Computing, Second Edition, Cambridge University Press.
96
ACKNOWLEDGMENTS
ACKNOWLEDGMENTS
This effort was supported by the Naval Surface Warfare Center Dahlgren Division under
Military Interdepartmental Purchase Request # N00178-02-MP-00374.
97