APFoam-1.0: integrated CFD simulation of O 3 –NO x –VOCs chemistry and pollutant dispersion in typical street canyon

. Urban air quality issue is closely related to the human health and economic development. In order to investigate the street-scale flow and air quality, this study developed the Atmospheric Photolysis calculation framework (APFoam-1.0), an open-source CFD code based on OpenFOAM, which can be used to examine the micro-scale reactive pollutant formation and 10 dispersion in the urban area. The chemistry module of the new APFoam has been modified by adding five new types of reactions, which can implement the atmospheric photochemical mechanism (full O 3 –NO x –VOCs chemistry) coupling with CFD model. Additionally, the model including photochemical mechanism (CS07A), air flow and pollutant dispersion has been validated and shows the good agreement with SAPRC modeling and wind tunnel experimental data, indicating that the APFoam has sufficient ability to study urban turbulence and pollutant dispersion characteristics. By applying the APFoam, 15 O 3 –NO x –VOCs formation processes and dispersion of the reactive pollutants were analyzed in an example of typical street canyon (aspect ratio H/W =1). The comparison of chemistry mechanism shows that O 3 and NO 2 are underestimated while NO is overestimated if the VOCs reactions are not considered in the simulation. Moreover, model sensitivity cases reveal that 82%–98% and 75%–90% of NO and NO 2 are related to the local vehicle emissions which are verified as the dominant contributors to local reactive pollutant concentration in contrast to their background conditions. Besides, a large amount of NO x emission, especially NO, is beneficial to reduce the O 3 concentration since NO would consume O 3 . Background precursors (NOx/VOCs) from boundary conditions only contribute 2%–16% and 12%–24% of NO and NO 2 concentrations and raise O 3 concentration by 5%–9%. Weaker ventilation conditions could lead to the accumulation of NO x and consequently a higher NO x concentration, but a lower O 3 concentration due to the stronger NO titration effect which would consume O 3 . Furthermore, in order to reduce the reactive pollutant concentrations under the odd-even license plate policy 25 (reduce 50% of the total vehicle emissions), vehicle VOCs emissions should be reduced by at least another 30% to effectively lower O 3 , NO and NO 2 concentrations at the same time. These results indicate that the examination of the precursors (NO x /VOCs) from both traffic emissions and background boundaries is the key point for better understanding O 3 –NO x –VOCs chemistry mechanisms in street canyons and providing effective guidelines for the control of local street air pollution.


Introduction
With the worldwide rapid urbanization, air pollution in cities, such as haze and photochemical smog characterized by highlevels of the particulate matter and/or surface ozone (O3), has become one of the widely concerned environmental problems 35 (Lu et al., 2019;Wang et al., 2020). Recently, the observational data have shown that PM2.5, one of the major pollutants in cites, has decreased 30%-50% across China due to strict air quality control measures (Zhai et al., 2019). At the same time, 87%, 63%, 93%, 78% and 89% of the observational stations in China have shown the decreasing trend of CO, NO2, SO2, PM10 and PM2.5 in recent 5 years, respectively (Fan et al., 2020). Various data indicate that air quality in China has been significantly improved. Unlike other pollutants, however, O3 concentrations has increased in major urban clusters of China (Lu et al., 2018). 40 Severe O3 pollution episodes still exist and happen frequently . Therefore, research on reactive pollutants such as O3, which has adverse effect on human health (Goodman et al., 2015;Liu et al., 2018b;Sousa et al., 2013), the productivity of crop (Rai and Agrawal, 2012), building material (Massey, 1999) and vegetation (Yue et al., 2017), is of great significance to the further improvement of air quality especially in urban area.
From the perspective of the cause of urban air pollution, traffic-related emissions are the major part of airborne pollutant 45 sources, including the precursors of O3, NOx ( = NO + NO2) and volatile organic compounds (VOCs) (Degraeuwe et al., 2017;Kangasniemi et al., 2019;Keyte et al., 2016;Pu and Yang, 2014;Wild et al., 2017;Wu et al., 2020). It has been believed that the production of O3 is from the NO2 photolysis. Generally, in a clean atmosphere, the produced O3 would be consumed by NO titration effect. However, with the involved VOCs, NO concentrations become lower due to the consumption with RO2 (the production of VOCs and OH, VOCs + OH → RO 2 + H 2 O), which weaken the NO titration effect and consequently lead 50 to the O3 accumulation (Seinfeld and Pandis, 2016). In China, previous studies have shown that 22%-52% of total CO, 37%-47% of total NOx, and 24%-41% of total VOCs emissions are contributed by the vehicle emissions in urban area Zhang et al., 2009;Zheng et al., 2014Zheng et al., , 2009).
To investigate the formation pattern and dispersion of reactive pollutants, numerical simulation has been considered as an effective method by using the air quality models. Based on length scales, the air flow and air quality modeling in cities are 55 commonly categorized into four groups by length scales, i.e., street scale (∼100 m), neighborhood scale (∼1 km), city scale (∼10 km), and regional scale (∼100 km) (Britter and Hanna, 2003). With the complex geometric and non-uniformity in building distribution within cities, Computational Fluid Dynamics (CFD) simulation has recently gained popularity in the urban climate research (Toparlar et al., 2017). Different from the typical meso-scale (~1000km) and regional-scale (~100km) air quality models, CFD has better performance in micro-scale pollutant dispersion within the urban street canyon (~100m) or 60 urban neighborhoods (∼1 km), which are restricted spaces with more complicated turbulent mixing and poorer ventilation condition than rural areas (Zhong et al., 2015). Besides the shorter physical processes in micro-scale urban models (~100m-1km, ~10s-100s), the rather fast chemical processes of NO2 photolysis and NO titration with the complex chain of VOCs reactions also require finer resolution model (Vardoulakis et al., 2003). For instance, CFD models with fine grid (~0.1-1m) and small timestep (~0.1s) have been effectively adopted to simulate these high-resolution spatial and temporal variations in 65 urban areas (Sanchez et al., 2016).
With the rapid growth of the high-performance computing (HPC) platforms, computational power is no longer an obstacle.
CFD simulation shows the good application prospect in urban microclimate research (Fernandez et al., 2020;Garcia-Gasulla et al., 2020). Many CFD models coupled with photochemical reaction mechanism have been developed to investigate the street-scale air quality problem in recent years (See Table 1). More commonly, simple photochemical mechanism with only 70 three reactions (Leighton, 1961) is adapted in CFD models. This mechanism can simulate the NOx-O3 dispersion with a lower computational requirement. Many previous studies have investigated the pivotal factors that affect the reactive pollutant distribution within the street canyon by using CFD model with simple photochemical mechanism, such as street-building aspect ratio Zhang et al., 2020;Zhong et al., 2015), ambient wind conditions (Baker et al., 2004;Merah and Noureddine, 2019), thermal effects (Baik et al., 2007) or emissions from vehicle (Liu et al., 2018a;Zhang et al., 2019b). 75 However, due to the simple photochemical mechanism ignoring the effect of other nitrogen oxides and VOCs on the photochemistry, some studies recently have applied the full photochemical mechanism in CFD models to reduce the uncertainty of pollutant simulation. Photochemical mechanisms contain NOx-O3-VOCs reactions and photochemistry, such as CBM-IV (Garmory et al., 2009;Kwak et al., 2013;Baik, 2012, 2014), GEOS-Chem (Kim et al., 2012;Park et al., 2016), RCS (Bright et al., 2013;Zhong et al., 2017), and CCM (Sanchez et al., 2016) are successfully coupled with CFD 80 models and applied to analyse the street-scale pollutant dispersion.
Currently, most of the simulation studies have been carried out by the application of commercial CFD software. This software has rather simple operation which is effective to save time when setting up the simulation case. However, the commercial codes are usually closed source, which is a "black box" for users (Chatzimichailidis et al., 2019). In this case, the adjustment to the equations and parameters or modifications to the model is difficult for some specific simulations. Therefore, 85 an open-source CFD code for atmospheric photolysis calculation, APFoam-1.0, was developed in this study. Open Source Field Operation and Manipulation (OpenFOAM) was selected as the platform for the APFoam framework, as OpenFOAM has good performance in computing scalability and low uncertainty levels which shows good ability in large-scale CFD simulation with million-level grid number (Robertson et al., 2015). Additionally, the solvers in OpenFOAM for specific CFD problem can be developed by using the appropriate packaged functionality, which simplifies the difficulty of programming. 90 Furthermore, OpenFOAM has been also well-developed with various pre-and post-processing utilities which are convenient for data manipulation (OpenFOAM Foundation, 2018). This paper is organized as follows: besides this Sect. 1 of introduction, Sect. 2 presents a full description of the new chemistry module and simulation solver. Model validation for the photochemical mechanism, turbulence simulation and pollutants dispersion compared with the chemical box model and several wind tunnel experiments is discussed in Sect. 3. 95 Subsequently, in Sect. 4, a series of sensitive case has been set up to investigate the contribution of the key factors on the reactive pollutants in a typical street canyon (aspect ratio, building height/street width, H/W=1). Finally, the conclusion and future research plan for the APFoam framework are summarized in Sect. 5 and Sect. 6.

General overview
APFoam framework has been developed based on OpenFOAM which is an open-source code for CFD simulation. For the numerical solution, APFoam uses finite volume method (FVM) to discretize the governing equations and adopts arbitrary three-dimensional structured or unstructured meshes. All variables of the same cell are stored at the center of the control volume (CV), and complex geometries can be easily handled with FVM (Chauchat et al., 2017). In APFoam, Laminar, 105 Reynolds-averaged Navier-Stokes equations (RANS) and Large eddy simulation (LES) method are available for turbulence solution. Additionally, APFoam also has complete boundary conditions to choose for numerical simulation.
Based on the OpenFOAM, APFoam has been developed to conduct the photochemical simulation within the atmosphere.
Different from the general chemical reaction type, there are some new types of the gaseous reactions describing the photochemical processing. More details will be introduced in Sect. 2.2. 110 To make it easier to get started with APFoam, the structure of the simulation case folder is consistent with the OpenFOAM. Figure 1 shows the flow diagram of simulation set-up in APFoam. The solver of APFoam, APChemFoam for one-dimension (1D) chemistry solving is modified from the solver ChemFoam which will be introduced in detail in Sect. 2.3. Other threedimension (3D) solvers are modified from the solver reactingFoam, including APreactingFoam for online solving coupled with flow and chemical reaction, APonlyChemReactingFoam for solving only chemical reaction with a certain flow field and 115 APsteadyReactingFoam for online solving coupled with flow and chemical reaction in steady-state. More details will be presented in Sect. 2.4.
For the simulation running (see Figure 1), mesh files, configure files, initial and boundary condition files should be prepared before the simulation. Mesh files can be made by various ways, such as blockMesh application executable by using data from blockMeshDict or fluentMeshToFoam by converting the .msh file to OpenFOAM format. For APFoam simulation, 120 all required configure files are also listed in Figure 1. Besides, user-defined function can be loaded at run-time without recompiling the program, via writing related configuration files in the system folder. As for initial conditions, the initial state of turbulence, environment (e.g. temperature, pressure) and chemical species are necessary for the simulation. The results of APFoam would contain the wind flow and pollutant concentrations, which can be processed by the Paraview in OpenFOAM or any other CFD post-processing tools. 125

Chemistry module
For photochemical calculation, there are five types of reactions in the NOx-O3-VOCs mechanism. In the original version of OpenFOAM, these types of reactions are not included and should be added to the chemistry module prior to simulation. These types of the reactions are described as followed: 130 (1) Arrhenius reactions: Arrhenius reaction is the basic reaction in the mechanism, and the rate of the Arrhenius reaction is calculated as where A, B and E are the parameters of the reaction rates, and T is the temperature of mixture in Kelvin.
(2) Photolysis reactions: 135 Photolysis reactions are first-order reactions, and the photolysis rate is calculated as where kphot is the first order rate for the photolysis reaction; λ1 and λ2 are the photolysis wavelength ranges according to the specific species; J (λ), abs (λ) and QY (λ) are the intensity of the light source, absorption cross section and the quantum yield for the reaction at wavelength λ, respectively. 140 Actually, the photolysis rate could be calculated by other photolysis rate model such as Fast-J (Wild et al., 2000), TUV (Madronich and Flocke, 1999), or obtained from photolysis data set such as IUPAC (Atkinson et al., 2003). Since the photolysis rate does not depend on temperature, in the current version of APFoam, the model does not consider the variation of light intensity, the photolysis rates are obtained from the literature (Carter, 2010) rather than online calculation in order to improve the calculation efficiency. 145 (3) Falloff reactions: Rate of Falloff reactions is a function of temperature and pressure which is calculated as is the concentration of third body, which depends on total pressure; F is broadening factors. k0 and kinf are the rates of in Arrhenius form at low-pressure limit and high-pressure limit, respectively. 150 (4) "Three k" reactions: The rate of "Three k" reactions depends on three reaction rates in Arrhenius form. The rate is calculated as where k0, k2 and k3 are three reaction rates and [M] is the concentration of third body.
(5) "Two k" reactions: 155 The rate of "Two k" reactions depends on two reaction rates in Arrhenius form. The rate is calculated as where k1 and k2 are two reaction rates and [M] is the concentration of third body.
In the current version of the APFoam, two atmospheric photochemical mechanisms are included in the model, which was SAPRC07 (Carter, 2010) and CB05 (Yarwood et al., 2005). For SAPRC07, two versions of the chemical mechanism are 160 available, which are CS07A and SAPRC07TB. CS07A is one of the condensed versions of the mechanism, which contains 52 species and 173 reactions. SAPRC07TB is a more complicated version and even contains toxics species, with 141 species and 436 reactions. As for CB05, basic version with 51 species and 156 reactions is optional in the model. In the section 3.1, CS07A has been validated while the other two mechanisms are not verified in this study but are still the available option to the users.
where is the species mass fraction; is the reaction rate; is the temperature of the mixture; h is the specific enthalpy; 0 175 is the initial energy; is the pressure; is the density of the mixture; ̇ is the heat from reaction; ∆ℎ , 0 and , are the enthalpy of formation at reference temperature 0 and the constant-pressure specific heat (a function of temperature) of species i; is the gas constant and is the average molar weight; and are partial pressure and the molar mass of species i. Besides, one of the and should be set as a constant for simulation according to the needs of research. The other is calculated by Eq.

Three-dimensional (3D) CFD solver with photochemical reaction
As mentioned above, three 3D solvers for atmospheric photochemical CFD calculation, including APreactingFoam, APonlyChemReactingFoam and APSteadyReactingFoam, are developed in the APFoam framework. step in this solver. Firstly, the continuity governing equation in this solver is: Besides, the momentum governing equation is: Additionally, the energy governing equation is: 190 where is the velocity vector of the air flow; is the viscous stress tensor; is the specific kinetic energy; eff is the effective thermal diffusivity coefficient.
Pressure-velocity coupling schemes for solving the flow field is PIMPLE algorithm, a merged PISO-SIMPLE algorithm in OpenFOAM toolkit. This algorithm uses the steady-state solution (SIMPLE algorithm) for the flow field within the time 195 step. When defined tolerance criterion is reached, this algorithm uses PISO algorithm in the outer correction loop and moves on in time (Holzmann, 2017). The PIMPLE algorithm allows the larger Courant numbers (Co >1) so that time step can be increased to reduce the computation time. Even so, the time step (∆ ) generally follows the Courant-Friedrichs-Lewy (CFL) condition to maintain numerical stability, which is: where ∆ is the grid size.
Besides, the governing equation for the reactive species transportation is: where is the kinematic viscosity; [∆ ] ℎ is the concentration change of species from the chemical reaction; As mentioned above, [∆ ] ℎ is calculated following the equations of (6)-(9). is the emission source of species . The 205 chemistry is solved by the ordinary deferential equation (ODE) solvers in OpenFOAM library, in which the chemical reactions can be integrated by dividing the flow time step into serval sub-time steps, automatically. The APreactingFoam is only designed to solve compressible fluids because the simulation results are more likely to be unstable and divergent when the chemistry and flow field are solved simultaneously under the incompressible fluids. It is the limitation of OpenFOAM code which is widely known by its users. 210 APonlyChemReactingFoam is only capable of solving the chemical reaction and species dispersion in the same time step under a certain flow field. The solution of turbulent fluids governing equation is switch off. The purpose of developing this solver is to save the computation time and reduce repetitive simulation. In general, the atmospheric chemical reactions have negligible effect on the flow field. Therefore, when the example cases to be studied do not involve the flow field change, this APreactingFoam (Eq. (14)).
APSteadyReactingFoam is developed for solving the chemical reaction and species dispersion under the steady-state flow field. This solver is only designed to solve compressible fluids for the same reason as APreactingFoam which is mentioned above. In this solver, pressure-velocity coupling scheme switches to SIMPLE algorithm for steady-state solution. The continuity governing equation in this solver is: 220 Besides, the momentum governing equation is: Also, the energy governing equation is: (17)  225 As for reactive species, the governing equation for the transportation still applies Eq. (14) as well, in order to ensure the stability of chemical reaction.

Photochemical reaction mechanism 230
To verify the accuracy of chemical reaction solution and specie concentration calculation, APFoam results are compared with the results from SAPRC box modeling software (Carter, 2010). For the chemical mechanism, CS07A is selected for validation in this study, and simulation time is set as 24h without diurnal variation (i.e., chemical reaction rate is constant during simulation), allowing the reactants to fully react and verifying the stability of the model. is the concentrations of specie at time step from SAPRC box model; , is the mean relative error of specie and is the total number of the time step. 245 Overall, most of the , are less than 1% in the concentrations range between 0 to 10 -20 ppmv (i.e., the concentrations under realistic conditions), indicating that simulation error of APFoam is less than 1% during the whole simulation period.
However, there are 6 species with RE and MRE greater than 1%, which are TERP, ISOPRENE, OLE1, OLE2, IPRD and ARO2. The MRE of these 6 species are 44.0%, 40.7%, 7.74%, 38.5%, 7.71% and 1.20%, respectively. Additionally, Figure 3 shows time series of RE and concentrations for these high RE and MRE value species. In Figure 3a, RE values in the early 250 stage of simulation (t = 0-180 min) are less than 1% for these species. However, the REs of TERP, ISOPRENE and OLE2 increase dramatically after t = 180 min. The REs can even up to respective 190.4%, 297.0% and 867.4% in the following simulation. It should be noted that, at the later time, the REs of these 3 species have no values because they are consumed up during the chemical reaction and their concentrations from SARPC box model become zero. The significant increase in the RE values of OLE1 and IPRD begins at t = 1020 min, with the maximum RE values of 60.1% and 60.9%, respectively. 255 Relatively, the RE of ARO2 is smaller with the value of 5.0% only. Figure 3b illustrates the concentrations variation of these 6 species with worst agreement from two models. It can be found that the concentrations of these 6 species keep dropping during the whole simulation period. Combined with the result of Figure 3a, the dramatical increase of RE is due to the significant concentration decrease of these 6 species. In this study case, these 6 species are continuously consumed without complementation, which results in the concentrations of these species 260 tending to be 0. For extremely small number, the processing of different model is diverse. Thus, when the reduction of magnitude excesses 10 -5 ppbv to 10 -6 ppbv, the RE would become much larger between two models. In the realistic situation, the concentrations of the species would not be completely consumed up with continuous emission source and boundary conditions. Therefore, the photochemical reaction simulation results of APFoam could be reliable and the overall errors might be less than 1%. 265

Numerical settings and validation study in urban flow modelling
It is well known that large eddy simulations (LES) perform more accurately in simulating urban turbulent characteristics than the Reynolds-Averaged Navier-Stokes (RANS). However, RANS models (e.g., k-ε models) are still more widely utilized because of the disadvantages of LES, such as the much more computational time and resource requirements, the difficulties in 270 setting appropriate wall boundary conditions and defining the time-dependent domain inlet, the challenges to develop advanced sub-grid scale models. Among the RANS turbulence models, in contrast to the modified k-ε models (e.g., realizable and RNG k-ε models), although the standard k-ε model performs worse in predicting turbulence in the strong wind region of urban districts (e.g., separate flows near building corner), the prediction accuracy is better in simulating the low-wind-speed region (e.g. weak wind in 2D street canyon sheltered by buildings at both sides) (Tominaga and Stathopoulos, 2013;Yoshie et al., 275 2007). Hence, as one of the widely adopted RANS methods, the standard k-ε model is selected to solve the incompressible steady-state turbulent flows in 2D street canyon.
To further evaluate the numerical accuracy of the turbulence flow simulation, a scaled CFD case is performed under the estimation of wind tunnel data. In the wind tunnel experiments (Figure 4a), 25 rows of building model in total are set along the wind direction with the working section of 11 m long, 3 m wide and 1.5 m tall. For each row, building height (H), building 280 width (B) and street width (W) are 12 cm, 5 cm and 5 cm (i.e., aspect ratio H/W=2.4), respectively. The span-wise (or lateral) length is L = 1.25 m > 10H which is sufficient long to ensure the 2D flow characteristics in the street canyon Oke, 1988;Zhang et al., 2019a), i.e. the flow in the targeted street region is determined by the external flow above it but with little impacts from the lateral boundaries. Free flow wind speed in the wind tunnel experiment is 13 m s -1 . is about 2.14 × 10 7 , and that in wind-tunnel-scale experiments (H/W = 2.4, H = 0.12 m) is 1.9 × 10 5 , which satisfy the requirement of Reynolds number independence (the critical is about 8.7 × 10 4 with the H/W of 2) (Chew et al., 2018;Yang et al., , 2021. The normalized wind profiles with two scales can be compared for the validation purpose. Such validation 290 technique has been adopted in the literature Yang et al., 2021). Besides, the building width B and Ly in the CFD simulation are 10 m and 3.2 m (2H/15), respectively, assuming that only a section (Ly=2H/15) of long street canyons adopted with symmetry conditions is applied at two lateral boundaries. The minimum grid size in this case is 0.2 m with expansion ratio of 1.2 from the wall surface toward the surrounding, which refers to the grid independence tests from our previous research (Zhang et al., 2019a). All governing equations for the flow and turbulent quantities are discretized by FVM and SIMPLE scheme is used for the pressure and velocity coupling. The under-relaxation factors for pressure term, momentum term, k and ε terms are 0.3, 0.7, 0.8 300 and 0.8 respectively. CFD simulations do not stop until all residuals become constant. Typical residuals at convergence are 1×10 −6 , 1 ×10 −9 and 1×10 −6 for Ux, Uy and Uz, respectively, 1  10 −7 for continuity, 1  10 −6 for k, and 1  10 −6 for ε. Figure 6 shows the stream-wise velocity profiles of simulation results and experimental data along the centerline (Line F) of the street canyon. The predicted wind profile agrees well with the wind tunnel data. One main vortex structure is formed in the street canyon. The center of the main velocity (i.e. stream-wise velocity is 0) also matches well between simulation and 305 experiment.
Furthermore, some statistical parameters, including normalized mean square error (NMSE), fractional bias (FB) and correlation coefficient (R) are calculated by the following equations: where is the total number of measurement points; is the experimental data at measurement point ; is the CFD results at measurement point ; ̅ is the mean value of experimental data at all points; ̅ is the mean value of CFD results at all points.
According to the previous works (Chang and Hanna, 2005;Sanchez et al., 2016), the model acceptance criteria for urban configuration are NMSE<1.5, −0.3<FB<0.3 and R>0.8. In this simulation case, the respective NMSE, FB and R are 0.01, -315 0.04 and 0.99 (Table 2), which shows the good performance of the APFoam in flow field simulation.

Pollutant dispersion in 2D street canyon
Currently, there are rarely wind tunnel experiments with chemical reactions. Thus, the pollutant dispersion accuracy in 2D street canyon is validated by wind tunnel experimental data with tracer gas (Meroney et al., 1996), following the pervious 320 study Zhang et al., 2020). The wind tunnel, also the CFD domain configuration is presented in Figure 7 (Sanchez et al., 2016;Santiago and Martí n, 2008). For CFD simulation, APreactingFoam solver with the standard k-ε model is applied to solve the compressible unsteady-state turbulent flow field 330 and pollutant dispersion. In order to be consistent with the wind tunnel experiments setting, photochemical mechanism is not used in the simulation. The minimum grid size in this case is 0.5 mm with expansion ratio of 1.1 from the wall surface toward surrounding, and inlet velocity is constant as 3 m s -1 in the simulation. Time step of simulation is set as 1×10 −4 s in this validation case.
As the comparison results, Figure 8 shows the normalized concentrations between the CFD simulation and experimental data. 335 In general, the model slightly overestimates the C2H6 concentrations on windward side. However, at P4, the model concentrations for the top of the leeward side are lower than the experimental data, and the simulation results at P5 overestimates the concentrations of pollutant. In this simulation case, the respective values of NMSE, FB and R are 0.06, -0.13 and 0.95 (Table 3), which shows the good performance of the APFoam in 2D pollutant dispersion simulation.

Pollutant dispersion in 3D street canyon
As mentioned in section 3.3, 3D pollutant dispersion validation with tracer gas is conducted in this study, following the pervious study (Zhang et al., 2019b). Simulation results also compares with the wind tunnel experimental data (Chang and Meroney, 2001). CFD domain configuration is presented in Figure 9a.  Figure 11 shows the comparison results between CFD simulation and experimental data. Overall, CFD simulation in 3D dispersion case slightly overestimates the concentrations in the street canyon. As for P23 and P24, the simulated results also overestimate, effected by the higher concentrations predicted within street canyon. Similarly, Statistical variables such as 360 NMSE, FB and R are calculated to evaluate the performance of the model. As shown in Table 4, the value of NMSE, FB and R are 0.16, -0.21 and 0.93 in the 3D dispersion case, respectively, which agrees with acceptance criteria. In general, APFoam also shows the good performance in the 3D pollutant dispersion simulation.

Simulation configuration and CFD setting 365
In this study, APFoam with CS07A photochemical mechanism is applied for street air quality simulation. As shown in Figure   12a, the street aspect ratio (H/W) is one with building height (H=24 m), street width (W=24 m) and span-wise street length (L=30 m). Telescoping multigrid approach is adopted in the simulation with minimum grid size of 0.2 m and expansion ratio of 1.2 from building walls to the surrounding. The total grid number is about 87300 for the whole CFD domain. Top and two lateral boundaries of the domain are set up as the symmetry boundary condition. 370 Emissions area is set up at the bottom of street canyon with the pollutant source size of 18 m (width, WE) × 30 m (length, LE) × 0.3 m (height, HE), representing the traffic emission near street ground, and emission data are obtained from the our previous work (Wu et al., 2020). In this study, the emissions of NOx, VOCs and CO are 4.37 × 10 -8 , 2.34 × 10 -8 and 2.03 × 10 -7 kg m -3 s -1 (i.e., ~35, ~200 and ~170 ppbv s -1 ), respectively. The NO and NO2 are separated from NOx by the ratio of 9:1, which is similar with the previous study (Baik et al., 2007). VOCs are speciated following SAPRC mechanism and the emission 375 fraction of the species is obtained from the literature (Carter, 2015). Power-law velocity vertical profile is adopted for the inflow boundary condition, which is described as following: Here reference velocity is 3 m s -1 ; reference height is 24 m; turbulence intensity is 0.1; power-law exponent is 385 0.22 Zhang et al., 2019aZhang et al., , 2020; Von Karman constant is 0.41 and is 0.09.
Besides, the initial and inlet background concentrations for O3, NO, NO2, VOCs and CO are 60 ppbv, 5 ppbv, 15 ppbv, 40 ppbv and 400 ppbv, respectively, which are obtained from an observation campaign (Liu et al., 2008). For meteorological conditions, the temperature is 300 K and the operating pressure is 1013.25 hPa.
In all simulation cases, steady state turbulence field is first solved in advance. The result of turbulent flow would drive The description of all simulation cases is listed in Table 5. To investigate the effect of chemical mechanism, background condition of the precursors (BC), emission (Emis) and wind condition (Uref) on the reactive pollutant concentrations in the 395 street canyon, the cases of BC_zero_out, Emis_zero_out and Uref0.5 are set up in numerical simulations. In the Case_BC_zero and Case_Emis_zero, the precursors of O3 (i.e. NOx and VOCs) are removed from domain inlet (background boundary conditions) and pollutant source emissions, respectively, and then we compare the results with Base. In the Case_Uref50%, the Uref is reduced by 50% to investigate the contribution of wind condition on the chemical reaction. However, in the Case_simple_mech, only three photochemical reactions (Leighton, 1961) are considered in the simulation: 400 In order to improve the air quality within the urban area, some cities have tried to implement traffic control policies to 405 reduce the pollutants from vehicle emission sources. Thus, four emission control scenarios are carried out to investigate the effect of emission reduction. Case_Emis_Ctrl50% is the scenario that reducing 50% of the traffic volume by applying such as odd-even license plate policy (i.e., reduce 50% of the total vehicle emissions). Case_Emis_Ctrl_VOC20%, Case_Emis_Ctrl_VOC30% and Case_Emis_Ctrl_VOC40% are the scenarios which apply the stricter VOCs control measures (corresponding to 20%, 30% and 40% more VOCs emission reduction which are 60%, 65% and 70% reduction of total VOCs 410 emission, respectively) on the vehicles with traffic control policies.
Additionally, the change rate is used to reveal the effect of different factors on pollutant concentrations in street canyon.
For each pollutant, the change rate ( ) for different cases is defined as where Ccase and Cbase are the concentrations regarded as condition change case and base case, respectively. 415 respectively. Because of the slightly difference in wind speed, the concentrations of APonlyChemReactingFoam (Figure 13d, g, j, m) for pollutants are higher (due to the lower wind speed) than that in APreactingFoam (Figure 13e, h, k, n) and 430 APSteadyReactingFoam (Figure 13f, i, l, o) case. Many previous studies have treated the urban air turbulence as incompressible steady-state flow and investigate the pollutant dispersion successfully Ng and Chau, 2014;Zhang et al., 2019aZhang et al., , 2020Zhang et al., , 2019b. With less time spending, the APonlyChemReactingFoam is applied in the study to analyse the photochemical reaction process in the street 440 canyon.

Pollutant concentration distribution with full chemistry mechanism vs simple chemistry
As shown in Figure 13a, one main clock-wise vortex is formed in the street canyon with H/W = 1. The wind speed (WS) is small near the vortex center, i.e. the minimum wind speed is approximated 0.03 m s -1 , which is only 1% of the speed at the 445 domain inlet. The distributions of pollutants, such as O3, NO and NO2 in street canyon are also swirling (Figure 13a, d, g, j).
Leeward-side O3 concentration in Base is less than the windward side, while NO and NO2 are opposite. At the corner of leeward side, the minimum value of O3 and maximum value of NOx appear, with less than 20 ppbv for O3, more than 200 ppbv for NO and 140 ppbv for NO2 (Figure 13a, d, g, j), respectively. Meanwhile, due to the higher NO emissions, the ratio of NO and NO2 are higher at the bottom of the street canyon (Figure 14a). The larger NO/NO2 values indicate that the titration effect 450 of from NO (O 3 + NO → NO 2 + O 2 ) and ozone depletion would be stronger, leading to the lower O3 concentrations in this area.
While on the windward side, NOx concentrations are less than that on the leeward side. This is because that the NOx from emission source first affects the leeward side which leads to the high concentrations in this area. As the wind flows, the concentrations of NOx gradually decrease due to the wind diffusion and dilution effect. With the comparison of background, 455 the windward NO and NO2 concentrations increase approximately 35 ppbv and 55 ppbv, respectively. On one hand, pollutants from emissions are transported along the flow which increases the concentrations. On the other hand, VOCs in street canyon react with OH via the chemical reactions and generate HO2 and RO2. These RO2 and HO2, O3 would react with NO and generate NO2, leading a higher increment for NO2 (Figure 14b-14c). It should be noted that the O3 concentrations could be higher due to the less depletion reaction with NO compared to that of the leeward side. 460 Figure 15 shows the change rate of pollutant concentrations (Figure 15a-15c) and NO to NO2 ratio change rate of Case_simple_mech compared with the Base (Figure 15d). Without the consideration of the VOCs-related reactions in the mechanism, there is no consumption of NO by RO2 in the mechanism (VOCs + OH → RO 2 + H 2 O, RO 2 + NO → RO + NO 2 ), and NO titration effect (O 3 + NO → NO 2 + O 2 ) would be stronger in this case. For the O3, the concentrations are 36%-58% less than that in Base within the street canyon; NO2 concentrations are also 15%-40% less and NO could be up to 90% higher 465 than that in the simple chemistry case. Thus, the NO to NO2 ratio would be 60%-150% higher in simple chemistry case.

Influence of background precursors of O3 on reactive pollutant concentrations
In the Case_BC_zero, all background precursors of O3 (i.e., NOx and VOCs) from upstream domain inlet are removed. As depicted in Figure 16a, the change rates of O3 are negative confirming that O3 concentration becomes lower without the 470 background NOx and VOCs. In addition, the O3 reduction rate on the windward side (-5% to -8%) is smaller than that on the leeward side (-9%). The influencing mechanisms of O3 reduction are complicated and will be explained later.
On the one hand, by analysing Figure 16b-16c, such reduction rates on the windward side for NO (-12% to -16%) and NO2 (-20% to -24%) are greater than those on the leeward side (-2% to -6% for NO and -12% to -15% for NO2). Therefore, the ratio of NO/NO2 increases for about 9% to 14% in the street canyon ( Figure 16d). Overall, this increment of NO/NO2 475 enhances O3 depletion because the main source of ozone is the photolysis reaction of NO2, meanwhile, the main sink is the titration effect of O3 and NO.
On the other hand, the RO2 from the oxidation of VOCs with OH will consume the NO (VOCs + OH → RO 2 + H 2 O, RO 2 + NO → RO + NO 2 ), which would affect the NOx-O3 circulation. Figure 16e shows that the reduction of RO2/OH on the windward side is more than that on the leeward side, which indicates that the background VOCs and OH reaction on the 480 windward side is more active. However, due to the slower reaction rate of RO2 and NO compared with that of HO2 and O3 with NO, the conversion of RO2 to RO by reacting with NO would require more time. The reduction rate of RO/RO2 ( Figure   16f) on the leeward side (-18% to -23%) are slightly greater than that of on windward side (-16% to -17%). Therefore, the influence of RO2 on NOx-O3 circulation would gradually appear on the leeward side, along with the flow transportation.
Additionally, Figure 16g shows the reaction rate of RO2 ( 2 ) at the bottom, center and top point on the centerline of the 485 street canyon with (base) and without (case) background conditions. At the bottom point (CB), the reduction rate of RO2 is lower in Base. This is because that the background VOCs and OH reaction consumes a portion of NO on the windward side which leads to a lower consumption of RO2 with NO. As the simulation continues, NO concentrations would increase due to the continuous release of large amounts of NO from source emissions, and the reduction rate of RO2 become lower in Case_BC_zero due to the lack of background VOCs. 490 At top (ST) and center point (SC), however, as the reaction goes on and pollutants mix up, the NO concentration could become higher. Therefore, the RO2 consumption rate is less without the background RO2. This reduction indicates that the background conditions mainly consume NO in the street canyon which leads to the increase of O3 due to the weakening titration effect.

Effects of vehicular source emissions on reactive pollutants
In the Case_Emis_zero, the precursors of O3 (NOx and VOCs) from near-ground emissions are removed. As shown in Figure   17a, O3 concentrations increase by over 30%-120% in the whole street canyon compare to the Base. In particular, O3 increment on the leeward side is from 80% to 250% (not shown here) which is much higher than that on the windward side (30% to 40%). 500 However, NOx concentrations decrease significantly, i.e., the reduction rates are -84% to -98% for NO and -76% to -90% for NO2, showing that the NOx from source emissions are dominant part of NOx in the street canyon (Figure 17b-17c). The large reduction of NOx concentrations induces the increase of O3 concentrations with weaker titration effect of O3. Particularly, both the maximum increase for O3 and minimum reduction of NO and NO2 appear at the near-ground corner of the leeward side, where is the downwind area of the pollutant source. Besides, due to a larger amount of NO emissions than NO2 (emission ratio 505 of NO to NO2 is 9:1), the concentration ratio of NO/NO2 considerably decreases with the reduction rates of -30% to -70% ( Figure 17d) if vehicular pollutant sources are removed.
Additionally, due to the large reduction of NO and NO2 concentrations, more OH would react with VOCs instead of NOx, which increases the RO2 concentration (Figure 17e-17f). Meanwhile, with the reduction of NO concentration, the consumption of RO2 significantly decreases, which leads to the dramatic increase of RO2 concentration. Thus, the ratio of RO2/OH rises by 510 115%-205% and the ration of RO/RO2 decreases by -60% to -88%.
In Figure 17g, the reaction rate of RO2 at three points in Case_Emis_zero is positive, which means that the RO2 keeps being generated but not consumed among these three points. As mentioned above, RO2 (the production of VOCs and OH) will cosume the NO and weaken the O3 titration effect with NO. In Base case (Figure 17g), the reaction rate of RO2 is negative, which means that RO2 consumes the NO. However, in Case_Emis_zero, reaction rate of RO2 is positive during the whole 515 simulation period which means that there is not enough NO to react with RO2 or even O3 without the vehicular source. Therefore, the source emissions provide a large amount of NO which enhances the O3 depletion in the street canyon. Figure 18 shows the change rates of O3, NOx, and ratios when the background wind speed decreases from Uref =3 m s -1 (Base) 520

Influence of wind velocity reduction on reactive pollutants
to Uref=1.5 m s -1 (Case_Uref50%). In Figure 18a, there is no significant change of O3 concentration at the center of street canyon. However, in the downwind area of the near-ground pollutant source, O3 concentration decreases by 5% to 30%, compared with that of Base. Interestingly, at the bottom of the leeward side, O3 has an increase up to 6% under the half inlet wind speed condition.
Due to the weaker capacity of pollutant dilution caused by the smaller wind speed, the concentrations of NO and NO2 525 almost double (i.e. rising by 80%-98% in Figure 18b-18c) but the NO/NO2 change rate has no significant change (-1% to -3% in Figure 18d). Besides, a higher NOx concentration would react with more OH which consequently weakens the RO2 production from VOCs (-8% to -20% in Figure 18e). Meanwhile, the increase of NO concentration consumes more RO2 to RO, which leads to 180% to 340% increase of RO/RO2 (Figure 18f).
Additionally, Figure 18g illustrates the RO2 reduction in street canyon. Because of the higher concentration of NO in 530 Case_Uref50%, the RO2 reduction rates in three monitoring points are higher than that in Base, particularly at the bottom of the street canyon (CB). In the early stage of the reaction, the reduction rate of RO2 at the top point (ST) is slightly lower in Case_Uref50%. This is because that the RO2 concentration at ST is firstly affected by the background. As the NO concentrations increases in the whole street canyon, the RO2 consumptions become higher than that in Base. Figure 19 shows the concentrations of O3, NO and NO2 in different NOx and VOCs emission control scenarios at 90 minutes.

Emission control strategy on reactive pollutant concentrations
In Case_Emis_ctrl50% (the emission of NOx and VOCs reduces 50%, i.e. 50% reduction of traffic volume), the O3 concentration increases from 19-47 ppbv to 29-54 ppbv ( Figure 19a). On the contrary, this control measure for NO and NO2 540 are very effective and NO and NO2 concentrations reduce 47% to 54% and 37% to 40% in Case_Emis_ctrl50%,respectively. This indicates that the simple traffic control measures cannot effectively reduce O3 concentration. It is because that most of the urban areas are the VOC-sensitive regions (Ye et al., 2016). When the total number of vehicles decreases under the traffic control measures, the reduction of NOx is higher than that of the VOCs (due to the larger NOx emission from vehicles), 545 which leads to a higher VOCs-to-NOx ratio, consequently resulting in a higher O3 concentration in the street canyon (Sillman and He, 2002). Thus, in order to reduce the concentrations of O3, the stricter VOCs control measures on vehicle should be conducted. Based on the results shown from three other emission control scenarios (Case_Emis_ctrl_VOCs20%, Case_Emis_ctrl_VOCs30% and Case_Emis_ctrl_VOCs40%) in Figure 19a, the emission of VOCs needs be reduced by another 30% under traffic control (Case_Emis_ctrl50%) to bring the O3 concentrations back to the level when no traffic control 550 measures have been taken (Base).
As for NO and NO2, when the additional VOCs control measures are carried on, the concentrations are higher than those in Case_Emis_ctrl50%. Even so, their concentrations do not still exceed the concentration level before the traffic control (Base), which means that such emission control scenario is still effective for the NO and NO2. In Summary, the control policies of reactive pollutants require the comprehensive consideration of the relationship between precursors and pollutants, so that the 555 purpose to improve air quality can be achieved.

Conclusions
A detailed description of the Atmospheric Photolysis calculation framework APFoam-1.0 is presented in this paper, and this CFD model is coupled with multiple full atmospheric photochemical mechanisms, including SAPRC07 (CS07A and 560 SAPRC07TB) and CB05. In order to simulate the photochemical process of reactive pollutants, five new types of the reactions, including the new form of the (1) Arrhenius reactions; (2) Photolysis reactions; (3) Falloff reactions; (4) "Three k" reactions; and (5) "Two k" reactions have been modified and added into the APFoam. Additionally, to verify the model performance, several validations, including photochemical mechanism (CS07A) with SAPRC box modelling, flow field, 2D and 3D pollutant dispersion with wind tunnel experimental data have been conducted in this study. The model results show a good 565 agreement with the SAPRC box modelling and wind tunnel experimental data, indicating that the APFoam can be applied in the analysis of micro-scale urban pollutant dispersion.
By applying the APFoam with CS07A mechanism in the simulation of reactive pollutants in typical street canyon (H/W = 1) with the VOCs to NOx emission ratio ~ 5.7 in ppbv s -1 , key factors of chemical processes are investigated. In the comparison of chemical mechanism, O3 and NO2 are underestimated by 36%-58% and 15%-40%, respectively, while NO is 570 overestimated by 30%-90% without the consideration of the VOCs reactions. Other numerical sensitivity cases (Case_BC_zero, Case_Emis_zero and Case_Uref50%) reveal that vehicle emission is the main source of the NO and NO2, with the contribution of 82%-98% and 75%-90%, respectively. The resident part of the NOx in street canyon is contributed by the background concentration. However, vehicle emissions with a large amount of emitted NOx, especially NO, is a main reason for the decrease of O3 due to the stronger NO titration effect within the street canyon. In contrast, 5%-9% of the O3 are 575 contributed by the boundary conditions. Ventilation condition is another reason for the NOx concentrations increment, and the increase of NOx can be up to 98% when the wind speed is reduced to the half. If no chemical reactions, NOx concentration should rise 100% when the wind velocity decreases 50% (i.e. ventilation capacity reduces 50%) since the Re-independence requirement is satisfied. However, at the downwind of the emissions, O3 is reduced due to the increase of NO concentrations.
In order to control and improve the air quality in the street canyon, traffic control policies are effective for NOx. However, our 580 results indicate that at least another 30% reduction in vehicle VOCs emissions can reduce the O3 concentrations under the odd-even license plate policy with 24%-32%, 25%-28% and -6%-2% reduction rates of NO, NO2 and O3, respectively. Overall, APFoam-1.0, a fully coupled CFD model, can be employed to investigate the atmospheric photolysis calculation in urban areas, and provide reliable and useful suggestions for the improvement of urban air quality.

Future plans
However, in the current version of the APFoam, aerosol chemistry is not included in the model, and it is necessary to couple with the aerosol processes, such as MOSAIC (Zaveri et al., 2008) or ISORROPIA (Fountoukis and Nenes, 2007;Nenes et al., 1998) in the future work. Besides, the photolysis rates in the current model have been fixed without the diurnal variation, which means that the model is not suitable for a long-term simulation, and needs to be updated in the subsequent versions. 590 Moreover, the interaction between radiation and chemical reaction will be investigated by APFoam and validated by the scaled outdoor experiment (Chen et al., 2020a(Chen et al., , 2020b in the future.