Skip to main content

Parametric model for externally FUV-irradiated protoplanetary disk density structures

Project description

PUFFIN: Python Utility For FUV Irradiated disk deNsities

PUFFIN is a parametric model for computing gas density structures in externally FUV-irradiated protoplanetary disks. It provides both 1D radial and 2D cylindrical models of photoevaporating disks, designed to be fast and accessible for applications in disk chemistry.

Documentation PyPI version

Features

  • 1D radial density profiles: Fast parametric models with disk, wind, and transition components
  • 2D cylindrical density profiles: Full vertical structure with iterative hydrostatic equilibrium
  • FRIED grid integration: Automatic mass-loss rate interpolation from hydrodynamic simulations
  • Flexible parameterization: Adjustable grid resolution, mass loss rates, and model parameters

Installation

Install puffin_disk directly from PyPI using pip:

pip install puffin_disk

This will automatically install all required dependencies (numpy, scipy, matplotlib).

Requirements

  • Python 3.8 or higher
  • numpy >= 1.20.0
  • scipy >= 1.7.0
  • matplotlib >= 3.3.0

Quick Start

1D Model

For fast radial density profiles:

import puffin_disk

# Basic usage with default parameters
r_array, rho = puffin_disk.DiskModel1D(
    m_star=0.5,      # stellar mass (M_sun)
    r_d=100,         # characteristic radius (AU)
    sigma_1au=100,   # surface density at 1 AU (g/cm^2)
    FFUV_G0=1000     # external FUV field (G0)
)

# Custom grid and parameters
r_array, rho = puffin_disk.DiskModel1D(
    m_star=0.5,
    r_d=100,
    sigma_1au=100,
    FFUV_G0=1000,
    n_points=500,    # grid resolution
    gridsize=800,    # outer radius (AU)
    gamma=3.5,       # transition parameter
    p=0.3,           # transition parameter
    q=0.5            # transition parameter
)

2D Model

For full cylindrical density structures with vertical hydrostatic equilibrium:

import puffin_disk

# Basic usage
r_array, z_array, rho_total = puffin_disk.DiskModel2D(
    m_star=0.5,
    FFUV_G0=1000,
    r_d=100,
    sigma_1au=100
)

# Custom parameters
r_array, z_array, rho_total = puffin_disk.DiskModel2D(
    m_star=0.5,
    FFUV_G0=1000,
    r_d=100,
    sigma_1au=100,
    n_points=1000,   
    N_ITER=20, 
    gamma=3.5,    
    p=0.2,
    q=0.4
)

Documentation

Full documentation including detailed API reference, tutorials, and examples is available at puffin.readthedocs.io.

Citation

If you use PUFFIN in your research, please cite:

Keyte & Haworth (2026) - A parametric model for externally irradiated protoplanetary disks with photoevaporative winds

The FRIED grid mass loss rates are from:

Haworth et al. (2018) - The FRIED grid of mass-loss rates for externally irradiated protoplanetary discs - MNRAS, 481, 452
Haworth et al. (2023) - FRIED v2: a new grid of mass-loss rates for externally irradiated protoplanetary discs - MNRAS, 526, 4315

Contributing

Contributions, bug reports, and feature requests are welcome! Please feel free to:

Support

If you encounter any problems or have questions:

Author

Luke Keyte
Postdoctoral Researcher
Queen Mary University of London
l.keyte@qmul.ac.uk

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

puffin_disk-1.0.0.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

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

puffin_disk-1.0.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for puffin_disk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 54f00e815d483dde5cff339220e7dd6c7e289f3e2686ed3be0cfe3f27f122c77
MD5 65c7c395620870eb46ca826e0774805f
BLAKE2b-256 966e9e03515894bf4f106b626d53d4a39664c0a58beff9c953fe8a2f6b871476

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for puffin_disk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b40a21058220a0deec3b4f2ec45970e9320dff2100eb9fd1bf90d95a0590676b
MD5 7ef455f6d13567e1ba22884f9a67760c
BLAKE2b-256 39416b5232cf404909ff1bf7d76766e49735857f27e14c9d19d96d7121e11cb6

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