Skip to main content

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

  1. First, create an input file for your simulation:
import simba_chem as simba

# Create default input file
simba.create_input('my_input.dat')
  1. Modify the input parameters in my_input.py according to your needs

  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simba_chem-1.0.0.tar.gz (156.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simba_chem-1.0.0-py3-none-any.whl (162.5 kB view details)

Uploaded Python 3

File details

Details for the file simba_chem-1.0.0.tar.gz.

File metadata

  • Download URL: simba_chem-1.0.0.tar.gz
  • Upload date:
  • Size: 156.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for simba_chem-1.0.0.tar.gz
Algorithm Hash digest
SHA256 70ff5d93828f12251aac0f99cef40c178dfd61b65c1c1e36dfff2d8e0ce9d86b
MD5 20ffa939593a199a2e4a5f0940f6f14d
BLAKE2b-256 8b94c46006f6de88c4121d94b707eb2b4e331c173754e7472e3d35bb4b923453

See more details on using hashes here.

File details

Details for the file simba_chem-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: simba_chem-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 162.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for simba_chem-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebee99c7adc5657f49a111709c5a61848c542ae98472e89b91d9d3bdc1f5dc73
MD5 053934e8ed49108ab063d5d895adadd7
BLAKE2b-256 6939faea9e8ca892e4a053c196baba4414240397993a0d3f752ed9258e9b95af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page