# Real World Issues in the Implementation of Efficient Photochemical Chemistry Solvers

Thursday, March 16, 2000 - 4:30pm - 5:00pm

Keller 3-180

Ralph Morris (ENVIRON Corporation)

Joint work with Greg Yarwood.

Numerically solving a photochemical kinetic mechanism is a computational demanding task because photochemistry is a stiff system. The stiffness is due to the wide range of time constants in photochemistry; from micro-seconds for fast reacting radicals, to minutes for other key species (e.g., ozone), to days for more stable compounds (e.g., Carbon Monoxide). Photochemical box models tend to use the GEAR/LSODE predictor/corrector (Adams-Bashford) method that uses a history of the solution to explicitly solve the equations for all species. However, in three-dimensional grid model, such methods are too slow and typically the fast- reacting radicals are solved using steady-state approximation and a faster numerical scheme is used to solve for the less stiff species (e.g., Crank-Nicholson). In the past, the photochemistry solution required a majority (approximately 80%) of the computational requirements in a three- dimensional photochemical grid model (e.g., the EPA UAM). More recently, for its Comprehensive Air-quality Model with extensions (CAMx) photochemical grid model, ENVIRON developed an adaptive hybrid fast solver for solving the chemical kinetics that runs approximately 10 times faster than standard chemistry solvers (e.g., the Crank-Nicholson scheme in the UAM). The fast solver is coded with a chemical mechanism compiler (CMC) that reads in a chemical mechanism and writes Fortran code of the solution scheme using the fast solver technology. The CAMx CMC and fast solver has been used with several different forms of the Carbon Bond Mechanism (e.g., CBM-IV and CBM99). For the implementation of the SPARC97 mechanism in CAMx, the CMC was used to compile the SPARC97 chemistry into the fast solver solution scheme. However, it became apparent that some of the fast solver numerical solution procedures were not appropriate for use with the SPARC97. In particular, because the SAPRC97 chemical mechanism contains many more radical species many of which are very similar to each other they frequently become co-linear so that the matrix manipulations used to solve for the radical concentrations become indeterminate. Thus, the implementation of the SAPRC97 chemistry in CAMx required using an alternative solver, the Implicit/Explicit Hybrid (IEH) solver. This discussion will detail the techniques behind the adaptive hybrid fast solver and comparisons with solutions using the IEH and GEAR/LSODE solvers. The hands-on experiences in tailoring the chemical numerical solution scheme to the chemical mechanism for use in three-dimensional grid models is also discussed.

Numerically solving a photochemical kinetic mechanism is a computational demanding task because photochemistry is a stiff system. The stiffness is due to the wide range of time constants in photochemistry; from micro-seconds for fast reacting radicals, to minutes for other key species (e.g., ozone), to days for more stable compounds (e.g., Carbon Monoxide). Photochemical box models tend to use the GEAR/LSODE predictor/corrector (Adams-Bashford) method that uses a history of the solution to explicitly solve the equations for all species. However, in three-dimensional grid model, such methods are too slow and typically the fast- reacting radicals are solved using steady-state approximation and a faster numerical scheme is used to solve for the less stiff species (e.g., Crank-Nicholson). In the past, the photochemistry solution required a majority (approximately 80%) of the computational requirements in a three- dimensional photochemical grid model (e.g., the EPA UAM). More recently, for its Comprehensive Air-quality Model with extensions (CAMx) photochemical grid model, ENVIRON developed an adaptive hybrid fast solver for solving the chemical kinetics that runs approximately 10 times faster than standard chemistry solvers (e.g., the Crank-Nicholson scheme in the UAM). The fast solver is coded with a chemical mechanism compiler (CMC) that reads in a chemical mechanism and writes Fortran code of the solution scheme using the fast solver technology. The CAMx CMC and fast solver has been used with several different forms of the Carbon Bond Mechanism (e.g., CBM-IV and CBM99). For the implementation of the SPARC97 mechanism in CAMx, the CMC was used to compile the SPARC97 chemistry into the fast solver solution scheme. However, it became apparent that some of the fast solver numerical solution procedures were not appropriate for use with the SPARC97. In particular, because the SAPRC97 chemical mechanism contains many more radical species many of which are very similar to each other they frequently become co-linear so that the matrix manipulations used to solve for the radical concentrations become indeterminate. Thus, the implementation of the SAPRC97 chemistry in CAMx required using an alternative solver, the Implicit/Explicit Hybrid (IEH) solver. This discussion will detail the techniques behind the adaptive hybrid fast solver and comparisons with solutions using the IEH and GEAR/LSODE solvers. The hands-on experiences in tailoring the chemical numerical solution scheme to the chemical mechanism for use in three-dimensional grid models is also discussed.