Skip to main content

pifira

PyPI DOI tests

Pressure-based Inverse Fire-heat-flux and Radiative-Area analysis, with evidence-gated liquid-hydrogen utilities.

pifira is a research toolkit for two related process-safety workflows:

  1. estimating heat input and effective flame-contact area from pressure and wall-temperature histories of pressurized LPG tanks; and
  2. evaluating traceable liquid-hydrogen (LH2) ortho-para thermodynamics, published Milenko/Petitpas kinetics, and a CoolProp HEOS nozzle closure.

No experimental or validation data are distributed in the repository, source archive, or wheel. The validation material belongs to its original publishers and depositors. VALIDATION_SOURCES.md identifies the original DOI or official download page, the evidence used, and the limits of each comparison.

Installation

python -m pip install pifira

Python 3.10 or newer is required. Plotting support is optional:

python -m pip install "pifira[plot]"

LPG inverse-analysis example

import pifira

tank = pifira.TankSpec(
    volume=0.619,
    fluid="HEOS::Propane[0.95]&n-Butane[0.05]",
    fill=0.70,
)

heat_W = pifira.heat_input(
    P1_bar=10.83,
    P2_bar=16.30,
    dt=544.5,
    tank=tank,
)

arc = pifira.effective_arc(
    angles_deg=[0, 90, 180, -90],
    T_wall_C=[271, 49, 39, 46],
    T_amb_C=35.0,
)["arc_deg"]

height = pifira.effective_height(flame_height_m=0.767, liquid_height_m=0.885)
area = pifira.effective_area(diameter_m=0.75, arc_deg=arc, height_m=height)
print(pifira.heat_flux(heat_W, area), "kW/m2")

The pressure-rise calculation uses a closed-vessel interval before relief venting. The internal energy is evaluated with CoolProp while total mass and vessel volume remain fixed. The effective circumferential width is obtained from a Gaussian fit to the radiative driving force T_wall^4 - T_ambient^4.

LH2 evidence-gated example

from pifira.lh2 import MilenkoCorrelation, RigidRotorSpinThermo

thermo = RigidRotorSpinThermo()
print(thermo.equilibrium_ortho(20.3))
print(thermo.conversion_energy_J_per_kg(20.3))

kinetics = MilenkoCorrelation()
k = kinetics.forward_rate_per_s(
    temperature_K=20.3,
    density_kg_m3=70.0,
    phase="liquid",
)
print(k, "1/s")

The LH2 functions enforce the reported temperature, density, phase and composition domains by default. They do not constitute a certified relief valve sizing method. In particular, the package does not infer a discharge coefficient, effective area, lift law or two-phase capacity for a commercial PSV from pressure cycling alone.

Public API

Area Public objects
LPG pressure rise TankSpec, internal_energy, liquid_height, heat_input, heat_input_series
Effective area radiative_driving_force, effective_arc, effective_height, effective_area, heat_flux
Representative values heat_input_weighted_mean, simple_mean, coverage_fraction, normalized_flux, pressurization_number, orientation_factor
File input load_pressure_csv, load_temperature_csv
LH2 spin thermodynamics pifira.lh2.RigidRotorSpinThermo
LH2 published kinetics pifira.lh2.MilenkoCorrelation, pifira.lh2.CorrelationDomainError
LH2 nozzle utility pifira.lh2.HEOSNozzleLookup, pifira.lh2.heos_nozzle_lookup

Validation-data policy

Only source metadata and acquisition instructions are versioned. The project does not redistribute source PDFs, spreadsheets, presentation files, figure rasters, digitized traces, or derived validation tables. Users who reproduce a comparison must obtain the material from the original source, comply with its terms, and keep it outside version control. See VALIDATION_SOURCES.md.

Package releases are checked automatically for common third-party data and document formats before PyPI publication.

Scope and safety

pifira is research software. It is not an ISO 21013, API 520/521, ASME or KGS design implementation, and it must not replace certified sizing, manufacturer capacity data, or engineering review. A successful numerical reproduction means that the code regenerated a reported result; it does not by itself establish physical validation or fitness for safety-critical use.

Citation and release history

Use CITATION.cff and cite the archived Zenodo release. The badge above uses the concept DOI, which resolves to the newest archived version. Changes are listed in CHANGELOG.md.

License

The software is released under the MIT License. Third-party source material is not covered by that license and is not included.

Metadata

Release files for pifira 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pifira 0.2.0
File Size Uploaded
pifira-0.2.0.tar.gz 28.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pifira 0.2.0
File Interpreter ABI Platform
pifira-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.4 kB

Release files / pifira-0.2.0.tar.gz

Download URL pifira-0.2.0.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b139ad3a0747ceccedb5c99f978df37749d583c3a9611c6d8f09f98a0ef66683
BLAKE2b-256 checksum
How to use checksums
d42c260a502ce1ea91cee186839faa3ee3b0cbfa83df80e98574d7cd2d089718
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pifira-0.2.0-py3-none-any.whl

Download URL pifira-0.2.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e436522cacacd8c4288f0b6af74bad99fe9d1437482f1330a11830c3c9c32f9
BLAKE2b-256 checksum
How to use checksums
e9474e77016bf1ef95ad7aa7c292b69e5bed4c01469a67c9c4977cc2a8e0d20f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page