| two.cmpt {heR.IndoorAir} | R Documentation |
A two-compartment particle indoor air quality model, based on a recursive solution to the mass balance equation. It includes internal sources, cross-ventilation, infiltration, exfiltration, filtered recirculation, and filtered mechanical ventilation.
two.cmpt(..., t=1:120, c10 = 0, c20 = 0)
... |
a list of time-varying input parameters; see below |
t |
times at which to calculate room concentrations, defaults to 1:120 |
c10 |
initial room 1 concentration, defaults to 0 |
c20 |
initial room 2 concentration, defaults to 0 |
All parameters, except intitial concentrations, can be varied in time; however, they are treated as constant within each one of the specified time breaks. Parameter values are recycled (i.e., repeated) so that there is one value corresponding to each specified time. We ignore the first values, assuming they corresponds to the initial conditions. The remaining are matched to the breaks specified in `t'.
Possible arguments are as follows. All parameters except time and initial room concentration are specified individually with tags or as a named list, e.g., list(e1=35, f10=50, f01=50).
The following parameters can vary in time:
Units: M=mass; T=time; L=length; L^3=volume
To return a valid non-zero solution, at least one loss parameter must differ acroos the two rooms (e.g., volume, infiltration, cross- ventilation, return filtration, recirculation with non-zero removal efficiency, or deposition.)
Note: All parameters default to 0, except the compartment volumes, which default to 1 and 2, respectively, the penetration efficiencies, which default to 1, and the infiltration and exfiltration rates for both rooms, which default to 1.
This function uses an analytical solution of two coupled ordinary differential equations obtained using Mathematica, a software product of Wolfram Research, Inc.
Returns a list with the following components:
conc |
a list with components c1 and c2 containing concentrations in room 1 and room 2 |
times |
times at which concentrations were calculated |
params |
a list containing input parameter values for each time |
This function two.cmpt is intended to simplify two-compartment
calculations by reducing complexity in the specification of input parameters.
The one.cmpt function also requires relatively simple input
specifications for the one-compartment case.
In contrast, the more general cmpt function uses a numerical solution
to the mass balance equation that allows
for an arbitrary number of compartments, and for time-varying input parameters,
but requires input in the form of matrices and a 3-way array.
Neil Klepeis