Astrophysical Chemical Network Solver
Project description
SIMBA: Astrophysical Chemical Network Solver
SIMBA is a comprehensive solver for chemical reaction networks in astrophysical environments. It is designed to model and simulate complex chemical processes in various cosmic settings such as the interstellar medium (ISM), molecular clouds, and protoplanetary disks.
Features
- Initialization of chemical species, reactions, and environmental parameters
- Efficient solving of stiff ODEs representing chemical reactions
- Support for various reaction types including:
- Gas-phase reactions
- Grain-surface chemistry
- Photochemistry
- Integration of self-shielding factors for specific molecules (H2, CO, N2, C)
- Optimization using Numba JIT compilation for performance-critical functions
- Comprehensive logging and progress tracking
Installation
You can install SIMBA directly from the source:
git clone https://github.com/yourusername/simba.git
cd simba
pip install -e .
Quick Start
- First, create an input file for your simulation:
import simba_chem as simba
# Create default input file
simba.create_input('my_input.dat')
-
Modify the input parameters in
my_input.pyaccording to your needs -
Run your simulation:
# Initialize the network
network = simba.Simba()
network.init_simba('my_input.dat')
# Solve the network
result = network.solve_network()
Dependencies
- numpy
- scipy
- matplotlib
- numba
- tqdm
- pandas
Model Components
SIMBA consists of several key components:
- Elements: Handling of chemical elements
- Species: Management of atomic and molecular species
- Gas: Gas phase parameters and properties
- Dust: Dust grain properties and interactions
- Environment: Environmental conditions (UV field, cosmic rays, etc.)
- Reactions: Chemical reaction network and rates
- Parameters: System parameters and constants
Example Usage
import simba_chem as simba
import matplotlib.pyplot as plt
# Initialize and run
network = simba.Simba()
network.init_simba('my_input.dat')
result = network.solve_network()
# Plot results
time = result['time']
abundances = result['abundances']
plt.loglog(time, abundances[0,:]) # Plot first species abundance
plt.xlabel('Time (s)')
plt.ylabel('Number Density (cm^-3)')
plt.show()
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Luke Keyte
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simba_chem-1.0.1.tar.gz.
File metadata
- Download URL: simba_chem-1.0.1.tar.gz
- Upload date:
- Size: 425.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e253534022b1b19c793836733897102cb7db4bbe00bbb23f2029ea5574e5c35
|
|
| MD5 |
8f7de229afcd3d7c0566f4d9ab77c094
|
|
| BLAKE2b-256 |
8f41b0ab448ca1babb7aac802b93bd1467b088ab23e28a402327445188dc19aa
|
File details
Details for the file simba_chem-1.0.1-py3-none-any.whl.
File metadata
- Download URL: simba_chem-1.0.1-py3-none-any.whl
- Upload date:
- Size: 431.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8d939247915dc55bf807cf295123413ae2e27100d24246ce5986029dded9aa
|
|
| MD5 |
4c1955fcfe25b67a7f2e1481cd3bba6d
|
|
| BLAKE2b-256 |
62cd81d248a892b9e829b14f05459aee2ed9f42a01d2ec731484d18fa80a14b9
|