pytesimal

Model the conductive cooling of small planetary bodies with temperature-dependent material properties

https://github.com/murphyqm/pytesimal

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 12 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

asteroids meteorites planetary-science planetesimal solar-system
Last synced: 6 months ago · JSON representation ·

Repository

Model the conductive cooling of small planetary bodies with temperature-dependent material properties

Basic Info
  • Host: GitHub
  • Owner: murphyqm
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 51.5 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 6
  • Releases: 2
Topics
asteroids meteorites planetary-science planetesimal solar-system
Created over 5 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

Pytesimal

Documentation Status Binder GitHub DOI GitHub release (latest by date) GitHub Workflow Status Updates PyPI version

Pytesimal models the conductive cooling of planetesimals with temperature-dependent material properties.

Pytesimal is a finite difference code to perform numerical models of a conductively cooling planetesimal, both with constant and temperature-dependent properties. It returns a thermal history of the planetesimal, and the estimated timing and depth of pallasite meteorite genesis. The conduction equation is solved numerically using an explicit finite difference scheme, FTCS (Forward-Time Central-Space). FTCS gives first-order convergence in time and second-order in space, and is conditionally stable when applied to the heat equation. In 1D, it must satisfy Von Neumann stability analysis - please see Murphy Quinlan et al. (2021) for more information on choice of time-step.

The code currently recreates the cases described in Murphy Quinlan et al. (2021). References for the default parameters used can be found therein. We plan to extend it and make it more modular in future updates.

Features

  • Constant or variable material properties
  • Choose to return compressed .npz NumPy arrays of temperature and cooling rates through time and radius
  • Plot temperature or cooling rate heatmaps
  • Return timing of core solidification, and depth and timing of meteorite formation
  • Return a parameter .json file with details of input parameters and results

Installation

This software relies on python (version 3.6 and up) and various other python packages. Examples are distributed as Jupyter notebooks, which need Jupyter and Matplotlib to run. The software and its dependencies are best installed in a virtual environment of your choice. Installation and management of all these dependencies in an isolated conda environment can be done by running:

conda create -n=pytesimal python=3.8 jupyter
conda activate pytesimal    
pip install pytesimal

Installation for development

The package can be downloaded and installed directly from Github for the most recent version. The software and its dependencies are best installed in a virtual environment of your choice. Download of the software and creation of an isolated conda environment can be done by running:

git clone https://github.com/murphyqm/pytesimal.git
cd pytesimal
conda create -n=pytesimal python=3.8 jupyter
conda activate pytesimal
pip install -e .

The -e flag installs the package in editable mode so that any changes to modules can be carried through. Examples can be downloaded from the gallery here.

Installation in Google Colab

Pytesimal can also be installed and used in Google's hosted Jupyter notebook service, Colaboratory. In a new notebook, install the package:

!pip install pytesimal

You can also upload one of our examples and run it, after adding a cell with the installation command above to the start of the notebook.

Quick Start

Read the full documentation here for more in-depth instructions and to view the API reference. Launch Jupyter Notebook examples.

To run a case with parameters loaded from file:

import pytesimal.load_plot_save
import pytesimal.quick_workflow

Define a filepath and filename for the parameter file:

folderpath = 'path/to/the/example/'
filename = 'example_parameters'
filepath = f'{folderpath}{filename}.txt'

Save a default parameters file to the filepath:

pytesimal.load_plot_save.make_default_param_file(filepath)

You can open this json file in a text editor and change the default values. Once you've edited and saved it, use it as an input file for a model run:

pytesimal.quick_workflow.workflow(filename, folderpath)

Let your planetesimal evolve! This will take a minute or so to run. Once it has done so, you can load the results (from the folder you specified in the parameters file):

filepath = 'results_folder/example_parameters_results.npz'
(temperatures,
 coretemp,
 dT_by_dt,
 dT_by_dt_core) = pytesimal.load_plot_save.read_datafile(filepath)

Then you can plot heatmaps of the temperatures and cooling rates within the planetesimal:

# Specify a figure width and height:
fig_w = 6
fig_h = 9

pytesimal.load_plot_save.two_in_one(
fig_w,
fig_h,
temperatures,
coretemp,
dT_by_dt,
dT_by_dt_core)

See the Jupyter notebooks hosted on Binder for live working examples, or download the example scripts provided.

Contribute

Support

If you are having issues, please let us know. You can email us at eememq@leeds.ac.uk

License

The project is licensed under the MIT license.

Citation

Please cite our project.

DOI

Murphy Quinlan et al. (2021).

Owner

  • Name: Maeve Murphy Quinlan
  • Login: murphyqm
  • Kind: user

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    affiliation: "University of Leeds"
    family-names: "Murphy Quinlan"
    given-names: Maeve
    orcid: "https://orcid.org/0000-0003-2958-1008"
  -
    affiliation: "University of Leeds"
    family-names: Walker
    given-names: Andrew
  -
    affiliation: "University of Leeds"
    family-names: Davies
    given-names: "Christopher J."
  -
    affiliation: "University of Leeds"
    family-names: Mound
    given-names: "Jonathan E."
  -
    affiliation: "Georg-August-University Göttingen"
    family-names: Mueller
    given-names: Thomas
  -
    affiliation: "University of Leeds"
    family-names: Harvey
    given-names: Jason
cff-version: "1.1.0"
doi: "10.1029/2020JE006726"
keywords: 
  - planetesimal
  - conductivity
  - thermal
license: MIT
message: |
    "If you use this software, please cite it using these metadata.
    This currently points to our paper and will be updated."
repository-code: "https://github.com/murphyqm/pytesimal"
title: Pytesimal
...

GitHub Events

Total
  • Delete event: 10
  • Issue comment event: 8
  • Push event: 21
  • Pull request event: 18
  • Create event: 9
Last Year
  • Delete event: 10
  • Issue comment event: 8
  • Push event: 21
  • Pull request event: 18
  • Create event: 9

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 278
  • Total Committers: 4
  • Avg Commits per committer: 69.5
  • Development Distribution Score (DDS): 0.058
Top Committers
Name Email Commits
murphyqm m****m@t****e 262
pyup-bot g****t@p****o 8
Maeve Murphy Quinlan e****q@l****k 6
Andrew Walker a****r@e****k 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 23
  • Total pull requests: 74
  • Average time to close issues: 24 days
  • Average time to close pull requests: 13 days
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.64
  • Merged pull requests: 46
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 month
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • murphyqm (11)
  • andreww (11)
  • pyup-bot (1)
Pull Request Authors
  • pyup-bot (41)
  • murphyqm (39)
  • andreww (1)
Top Labels
Issue Labels
bug (1) help wanted (1) linting (1)
Pull Request Labels