CraigYanitski / kosmatau3d

The public release of the clumpy PDR code kosmatau3d (Yanitski 2023).
https://kosmatau3d.readthedocs.io/en/latest/
Other
0 stars 0 forks source link
astrochemistry clumpy-ism fractal-ism interstellar-medium photodissociation-regions

Forks Stargazers

pylint Contributors Issues GNU GPLv3 License

kosmatau3d

This is the current working version of kosmatau3d. It uses a series of sub-modules to perform most of the calculations. The reason for doing this is to reduce the memory footprint of the code to increase the overall efficiency. This also increases the maximum number of voxels that can be evaluated, since each voxel no longer owns as much memory.

Installation

using pip

Directly install from git using,

pip install git+https://github.com/CraigYanitski/kosmatau3d.git

manually

Download the repository.

git clone https://github.com/CraigYanitski/kosmatau3d
cd kosmatau3d

Now that you are in the root directory of this repository, install it as an editable package in bash with,

pip install -e .

You can now keep it up-to-date using git pull in this directory.

Creating a voxel

A Voxel instance can be initialised using,

>>> from kosmatau3d import models
>>> vox = models.Voxel()

There are many parameters that must be specified in order to initialise and simulate the clumpy ensemble. For a detailed explanation of the properties that can be defined/accessed with a voxel instance, see the jupyter notebook in ./notebooks/voxel.ipynb. If you wish to use the pre-defined properties, you can simply run,

>>> vox.set_properties()
>>> vox.calculate_emission()

One can then easily plot different views of the voxel emission using built-in plotting methods.

>>> vox.plot_spectrum()

Functionality

Single-voxel models

This is the basic component of kosmatau3d. It is made available as a self-sufficient object for use in other subgridding models. Given a volume-filling factor, mass, and FUV field, the single voxel object calculates the wavelength-dependant intensity, optical depth, absorption, and emissivity (assuming no background intensity) for a clumpy PDR ensemble. The explanation of this model is thoroughly-explained in ./notebooks/voxel.ipynb.

The objects that will modelled with this method are:

3D models

The full subgrid model to simulate entire 3-dimensional structures. Voxel data can be streamed into fits files and the radiative transfer portion is a self-contained module to save on computational time.

It is currently setup for the Milky Way model initially developed by Christoph Bruckmann as that will be its first application. This galactic model can also be used in a more generalised application for distant galaxies.

The objects that will modelled with this method are:

Code Corrections

The major changes to the functionality of the kosmatau3d model over the KOSMA-tau-3D model of Silke et al. (2017) are described in the document ./docs/treatise.pdf, and the major changes to the Milky Way model will also appear in the upcoming Yanitski et al. (2024) paper. Most of the functionality is explained in Ch. III and IV in Yanitski (2023). There will be other documents to state the other various corrections and developments made.

Developmental Progress

base development

future development