Notebook S06. Size Distribution Inversion of Ambient Data
\n",
"\n",
" Notebook Version 2: This notebook has been updated to reflect changes made to the package DifferentialMobilityAnalyzers.jl to work with the Julia v1 series (tested with Julia 1.1.0). To read the original supplement published with the paper please switch to v1.0.0 of the package DifferentialMobilityAnalyzers.jl and/or download the virtual machine on zenodo.org which contains a complete installation that works with Julia 0.6.4 \n",
"\n",
"This notebook demonstrates how to use JDL to invert size distribution data obtained from the TSI Aerosol Instrument Manager (AIM) software. The notebook also demonstrates that the software produces comparable results to the TSI software. This notebook is a supplement to the manuscript \n",
"\n",
"Petters, M. D. (2018) A language to simplify computation of differential mobility analyzer response functions, Aerosol Science & Technology. \n",
"\n",
"## Block 1. Dependencies"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n"
],
"text/plain": [
"HTML{String}(\" \\n\")"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"HTML{String}(\"\")"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"HTML{String}(\"\")"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
" \n"
],
"text/plain": [
"HTML{String}(\" \\n\")"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"using Plots, Plots.PlotMeasures, LambertW, ProgressMeter, DifferentialMobilityAnalyzers\n",
"plotlyjs(); "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Block 2. Setup the DMA \n",
"Sheath flow = 4 L min-1 and sample aerosol flow = 1 L min-1 and specified in the data file loaded below."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"t,p = 295.15, 1e5 # Temperature [K], Pressure [Pa]\n",
"qsa,β = 1.66e-5, 1/4 # Qsample [m3 s-1], Sample-to-sheath ratio,\n",
"r₁,r₂,l = 9.37e-3,1.961e-2,0.44369 # DMA geometry [m]\n",
"leff = 0.0 # DMA effective diffusion length [m]\n",
"m = 6 # Upper number of charges\n",
"Λ = DMAconfig(t,p,qsa,qsa/β,r₁,r₂,l,leff,:-,m,:cylindrical) # Specify DMA with negative polarity\n",
"tscan, tc = 120,1 # SMPS scan time, bin average time\n",
"v1,v2 = 10,10000 # Voltage range\n",
"z1,z2 = vtoz(Λ,v2), vtoz(Λ,v1)\n",
"δ = setupSMPS(Λ, v1, v2, tscan, tc);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Block 3. Response function\n",
" loadtsidata Loads txt file exported from TSI Aerosol Instrument Manager (20130618_1410_SMPS3_BP.txt). The file was edited to remove a unicode character in line 154 that results in a load error. The load function will need to be adapted for files with different scan length and export parameters. The data corresponds to ambient data collected by Dr. Grieshop and Saha during the SOAS campaign (alse see Acknowledgements). It contains a total of 160 spectra. The instrument was operated at 4 L min-1 sheath flow and 1 L min-1 sample flow with a TSI 3081 long column DMA and TSI 3010 CPC. The data were exported with multiple charge correction turned on and diffusion correction turned off. \n",
"𝕟: Array of TSI inverted size distribution \n",
"rawdp: raw diameter grid obtained at 10Hz acquisition \n",
"rawc: 2D array containing raw counts vs diameter for each spectrum \n",
"Nt_TSI: array of integrated number concentration computed by TSI software"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"𝕟, rawdp, rawc, Nt_TSI = loadtsidata();"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The response function is computed from the 10 Hz raw count data. The raw counts falling within a bin are summed together. Concentration is computed from the number of milliseconds in each bin. The coincidence corrected concentration is obtained using Eq. (11) in Collins et al. (2003)