Skip to main content

A Python package for simulating ISM in galaxies

Project description

ISsiM

ISsiM (InterStellar Medium Simulator) is a python package for simulating the gas within galaxies. It is a Smooth Particle Hydrodynamics simulator mixed with a direct object N-body simulator. This strong combination allows you to quickly run a galaxy simulation without advanced knowledge in simulations or other programming languages.

Installation

Write this command into your terminal or notebook

pip install issim

The code is also available at https://pypi.org/project/issim/

Example

import issim
import numpy as np

# Simulation parameters
N         = 5000    # Number of particles
tEnd      = 3000     # time at which simulation ends
dt        = 1   # timestep
M         = 1      # star mass
R         = 1   # star radius
h         = 0.04    # smoothing length
k         = 0.000004    # equation of state constant
n         = 3      # polytropic index
nu        = 0.000003     # damping
G         = 0.00019160287    #gravitational acceleration
scaleheight =  0.05 #scale height
randvel = 0.0004 #random velocity 
plotRealTime = True # switch on for plotting as the simulation goes along

np.random.seed(42)     
gal1 = issim.galgen.Galaxy(N, mass = M, radius = R, scaleheight = scaleheight,
randvel = randvel,G = G,  k = k , n = n, nu = nu)
simulation = gal1.simulate(smoothinglength = 0.04, tstep = 1, tEnd = tEnd)

animation = gal1.quadplotvid(downsampling = 4)
gal1.saveanim()

Documentation

Documentation is available at https://issim.readthedocs.io/en/latest/index.html

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

issim-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

issim-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file issim-0.1.0.tar.gz.

File metadata

  • Download URL: issim-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for issim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef7b3b71b77439c4a073edcb4402e40d60a2fd2207e2d26d72cff79bcfd0ec09
MD5 c1b2b7fd8597198a55944d399579097c
BLAKE2b-256 4defb6f0950b13ca43d24e69d5e075ad26c3f6fa2dc670fd987269a3ba30624b

See more details on using hashes here.

File details

Details for the file issim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: issim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for issim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb8bd1180386c7039920a4de40f85003263b69d8e3c5882f3ae0e088685ca4a1
MD5 0c034e5c3b5efccd2b4374ffb5dc6ad5
BLAKE2b-256 a82d349dcc5b488a4fa46ef2d0a4364d8c4cedb0860be240da1536fe8c370e52

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