-
Notifications
You must be signed in to change notification settings - Fork 117
chemistry
Currently, the chemistry module is on the developing branch "chemistry_scalar". In order to use it, checkout the branch:
$git checkout chemistry_scalar
Note that the chemistry module is not fully tested yet. Use it at your own risk, and report any problems to Munan Gong.
Chemistry uses the basic functionality of the passive scalar module. The reaction rates act as a source term for the passive scalars. It can also interact with other parts of the code, e.g. heating and cooling rates in the energy equation, the equation of state, opacity in radiation transfer, etc.
Because the chemical reaction rates for different species often differ by orders of magnitude, implicit solvers are suited better to solve the rate equations. We use the operator split method: at the last stage of the passive scalar flux integration task, before the conserved to primitive conversion, we advance the chemical abundances and the internal energy for "dt", the simulation cycle timestep, by solving a set of coupled ODEs implicitly:
In the code, the reaction rate K_i is referred to as the RHS (right-hand-side) and the de/dt (heating and cooling) is refered to as Edot. Because the chemical reaction rate Ki usually depends on the temperature T, the user often need to have some expression of T as a function of the internal energy e in their RHS. Currently, chemistry works with a simple isothermal or adiabatic equation of state with a fixed adiabatic index. General EOS dependence on chemistry has not been included yet.
Note that the passive scalar advection (and diffusion) is solved separately prior to the chemical rate equations. This operator split method is only first-order accurate. No conservation of elemental abundances (such as by rescaling the flux of different species) has been implemented yet.
The chemistry module uses the CVODE library, which the user must install on their system: https://computing.llnl.gov/projects/sundials/cvode
Currently, there are two chemistry regression tests: One of them tests the equilibrium solution of the chemical network in Gong, Ostriker and Wolfire (2017). The other compares the analytic solution to the numerical one in a simple H2 formation network (figure below).
~/athena/tst/regression$python run_test.py chemistry
In order to run the regression test successfully, one needs to configure the $CVODE_PATH environment variable. This can be done by adding the environmental variable in the '~/.bashrc' file
export CVODE_PATH=/usr/local/sundials (or other paths where CVODE is installed)
vtk, hdf5 (rH2), history(H2), restart is not functioning yet.
Getting Started
User Guide
- Configuring
- Compiling
- The Input File
- Problem Generators
- Boundary Conditions
- Coordinate Systems and Meshes
- Running the Code
- Outputs
- Using MPI and OpenMP
- Static Mesh Refinement
- Adaptive Mesh Refinement
- Load Balancing
- Special Relativity
- General Relativity
- Passive Scalars
- Shearing Box
- Diffusion Processes
- General Equation of State
- FFT
- High-Order Methods
- Super-Time-Stepping
- Orbital Advection
- Rotating System
- Reading Data from External Files
Programmer Guide