SEAGen
======
A python implementation of the stretched equal area (SEA) algorithm for
generating spherically symmetric arrangements of particles with accurate
particle densities, e.g. for SPH initial conditions that precisely match an
arbitrary density profile, as presented in Kegerreis et al. (2019), MNRAS 487:4,
5029-5040, https://doi.org/10.1093/mnras/stz1606.
See also https://github.com/srbonilla/WoMa for making input planetary profiles,
placing particles with SEAGen, and modifications for spinning bodies.
Jacob Kegerreis (2020) jacob.kegerreis@durham.ac.uk
Josh Borrow
Visit https://github.com/jkeger/seagen to download the code including examples
and for support.
This program has been tested for a wide range of cases but not exhaustively. If
you find any bugs, potential improvements, or features worth adding, then please
let us know!
Contents
--------
+ `seagen.py` The main program classes and functions.
+ `examples.py` Examples to demonstrate how to use the SEAGen module.
+ `setup.py`, `setup.cfg`, `__init__.py`, `MANIFEST.in` Python package files.
+ `LICENSE.txt` GNU general public license v3+.
Basic Usage
-----------
+ See the doc strings in `seagen.py` for all the details.
+ Create a single shell of particles and print their positions:
```python
import seagen
N = 100
r = 1
particles = seagen.GenShell(N, r)
print(particles.x, particles.y, particles.z)
```
+ Create a full sphere of particles on a simple density profile and print their
positions and masses:
```python
import seagen
import numpy as np
N = 100000
radii = np.arange(0.01, 10, 0.01)
densities = np.ones(len(radii)) # e.g. constant density
particles = seagen.GenSphere(N, radii, densities)
print(particles.x, particles.y, particles.z, particles.m)
```
+ See `examples.py` for other working examples, e.g. an arbitrary density
profile with multiple layers and extra temperature information.
Installation
------------
+ `PyPI`: Automatically install the package with `pip install seagen`, see
https://pypi.org/project/seagen/
+ Direct download: The single `seagen.py` file can be imported and used without
any extra installation, so you can just download this repository and place
the file in a local directory or wherever your python will look for modules.
Requirements
------------
+ Python 3 (tested with 3.6.0).
Notation etc.
-------------
+ Formatted with [black](https://github.com/psf/black).
+ Arrays are explicitly labelled with a prefix `A1_`, or `An_` for an
`n`-dimensional array.
+ Particle is abbreviated to `picle`.
Raw data
{
"_id": null,
"home_page": "https://github.com/jkeger/seagen",
"name": "seagen",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "particle arrangement density sphere shell SPH initial conditions",
"author": "Jacob Kegerreis",
"author_email": "jacob.kegerreis@durham.ac.uk",
"download_url": "https://files.pythonhosted.org/packages/bd/cf/16c9cd47f1da1ee4ccbcbb94383bb951f99f83404c588a8f1f8df6186705/seagen-1.5.tar.gz",
"platform": null,
"description": "SEAGen\n======\n\nA python implementation of the stretched equal area (SEA) algorithm for\ngenerating spherically symmetric arrangements of particles with accurate\nparticle densities, e.g. for SPH initial conditions that precisely match an\narbitrary density profile, as presented in Kegerreis et al. (2019), MNRAS 487:4,\n5029-5040, https://doi.org/10.1093/mnras/stz1606.\n\nSee also https://github.com/srbonilla/WoMa for making input planetary profiles,\nplacing particles with SEAGen, and modifications for spinning bodies.\n\nJacob Kegerreis (2020) jacob.kegerreis@durham.ac.uk \nJosh Borrow\n\nVisit https://github.com/jkeger/seagen to download the code including examples\nand for support.\n\nThis program has been tested for a wide range of cases but not exhaustively. If\nyou find any bugs, potential improvements, or features worth adding, then please\nlet us know!\n\n\nContents\n--------\n+ `seagen.py` The main program classes and functions.\n+ `examples.py` Examples to demonstrate how to use the SEAGen module.\n+ `setup.py`, `setup.cfg`, `__init__.py`, `MANIFEST.in` Python package files.\n+ `LICENSE.txt` GNU general public license v3+.\n\n\nBasic Usage\n-----------\n+ See the doc strings in `seagen.py` for all the details.\n+ Create a single shell of particles and print their positions:\n ```python\n import seagen\n N = 100\n r = 1\n\n particles = seagen.GenShell(N, r)\n\n print(particles.x, particles.y, particles.z)\n ```\n+ Create a full sphere of particles on a simple density profile and print their\n positions and masses:\n ```python\n import seagen\n import numpy as np\n N = 100000\n radii = np.arange(0.01, 10, 0.01)\n densities = np.ones(len(radii)) # e.g. constant density\n\n particles = seagen.GenSphere(N, radii, densities)\n\n print(particles.x, particles.y, particles.z, particles.m)\n ```\n+ See `examples.py` for other working examples, e.g. an arbitrary density\n profile with multiple layers and extra temperature information.\n\n\nInstallation\n------------\n+ `PyPI`: Automatically install the package with `pip install seagen`, see\n https://pypi.org/project/seagen/\n+ Direct download: The single `seagen.py` file can be imported and used without\n any extra installation, so you can just download this repository and place\n the file in a local directory or wherever your python will look for modules.\n\n\nRequirements\n------------\n+ Python 3 (tested with 3.6.0).\n\n\nNotation etc.\n-------------\n+ Formatted with [black](https://github.com/psf/black).\n+ Arrays are explicitly labelled with a prefix `A1_`, or `An_` for an\n `n`-dimensional array.\n+ Particle is abbreviated to `picle`.\n\n\n",
"bugtrack_url": null,
"license": "GNU GPLv3+",
"summary": "Stretched Equal Area Generator",
"version": "1.5",
"project_urls": {
"Group": "http://icc.dur.ac.uk/giant_impacts",
"Homepage": "https://github.com/jkeger/seagen",
"Paper": "https://doi.org/10.1093/mnras/stz1606",
"WoMa": "https://github.com/srbonilla/WoMa"
},
"split_keywords": [
"particle",
"arrangement",
"density",
"sphere",
"shell",
"sph",
"initial",
"conditions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f5f7174bb61ed41d495d51ed8c712b0c2de38b258f1d5fa306fbcc7992375e8",
"md5": "c57a47a178420a96151cd2e6ce032450",
"sha256": "841ac54d23bffc318c76a637215617ad1ff614bff5e95b706c326277a043834d"
},
"downloads": -1,
"filename": "seagen-1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c57a47a178420a96151cd2e6ce032450",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 27917,
"upload_time": "2024-04-20T23:49:36",
"upload_time_iso_8601": "2024-04-20T23:49:36.632245Z",
"url": "https://files.pythonhosted.org/packages/4f/5f/7174bb61ed41d495d51ed8c712b0c2de38b258f1d5fa306fbcc7992375e8/seagen-1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bdcf16c9cd47f1da1ee4ccbcbb94383bb951f99f83404c588a8f1f8df6186705",
"md5": "9fc9678765fa1fa60546be6b969105b7",
"sha256": "a12337f3f568e9ce5beaf1fa2b5522b438963b40184625b8fe7f85adbd80d702"
},
"downloads": -1,
"filename": "seagen-1.5.tar.gz",
"has_sig": false,
"md5_digest": "9fc9678765fa1fa60546be6b969105b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 29673,
"upload_time": "2024-04-20T23:49:38",
"upload_time_iso_8601": "2024-04-20T23:49:38.408994Z",
"url": "https://files.pythonhosted.org/packages/bd/cf/16c9cd47f1da1ee4ccbcbb94383bb951f99f83404c588a8f1f8df6186705/seagen-1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-20 23:49:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jkeger",
"github_project": "seagen",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "seagen"
}