Skip to main content

pyregen

pyregen is a Python-based port of NIST REGEN3.3 cryogenic regenerator model.

It evaluates the fluid dynamics and heat transfer of oscillating helium flow through porous media at cryogenic temperatures. By replacing Fortran structures with a Object-Oriented Python architecture, pyregen acts as a fast, flexible engine.

Installation

pip install pyregen

Quick Start

pyregen is designed to act as a state-machine engine. You initialize the regenerator with your physical parameters, and then drive it forward in a loop.

from pyregen import Regenerator

my_regen = Regenerator(
    gas_temp_cold=80.0,           # Cold end temperature (K)
    gas_temp_hot=300.0,           # Hot end temperature (K)
    herz=60.0,                    # Operating frequency (Hz)
    hydra_diam=50e-6,             # Hydraulic diameter (m)
    mass_flux_cold=0.01,          # Mass flux at cold end (kg/s)
    mass_flux_hot=0.01,           # Mass flux at hot end (kg/s)
    mass_phase=30.0,              # Phase shift (degrees)
    material='stainless steel',   # Matrix material
    porosity=0.68,                # Matrix porosity
    pres_initial=2.5e6,           # Average pressure (Pa)
    rg_area=0.002,                # Cross-sectional area (m^2)
    rg_length=0.05,               # Regenerator length (m)
    geometry='screens',           # Matrix geometry
    num_points_x=21,              # Number of spatial nodes
    num_steps_cyc=80              # Number of time steps per cycle
)

target_cycles = 10
total_steps = target_cycles * my_regen.num_steps_cyc

print(f"Starting Engine: Running {total_steps} steps...")

for step in range(total_steps):
    
    current_data = my_regen.advance()
    
    if (step + 1) % my_regen.num_steps_cyc == 0:
        print(f"Cycle {current_data['Cycle']:.1f} completed.")

full_history = my_regen.results()
final_gas_temp = full_history['Gas_Temperature'][-1, -1]
print(f"\nFinal Gas Temp at the cold boundary: {final_gas_temp:.2f} K")

my_regen.save_to_csv("my_simulation_run.csv")

Supported Materials & Geometries

Materials:

  • stainless steel (or ss)
  • lead (or pb)
  • er3-ni (or er3ni)
  • (More materials can be easily added via the material_properties function)

Geometries:

  • parallel plates (or 1)
  • tubes (or 2)
  • screens (or 4)

License

This project is licensed under the MIT License.

Metadata

Release files for pyregen 0.1.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 pyregen 0.1.0
File Size Uploaded Provenance Actions
pyregen-0.1.0.tar.gz 12.2 kB Without provenance Details for pyregen-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 23.3 kB

Release files / pyregen-0.1.0.tar.gz

Download URL pyregen-0.1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
df866e700a3fd53fa39170ef4b3a42877be673870465079c0461abfbc82e9e8d
BLAKE2b-256 checksum
How to use checksums
0dc7a3cb442d1cbd824858253304340534c413269045caff83a2984930b1c42c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pyregen-0.1.0-py3-none-any.whl

Download URL pyregen-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33e3b485fc206192de141b13cbadd90f60fa82c8e3fd6b07c8c79c5ffb81dec1
BLAKE2b-256 checksum
How to use checksums
a96be10742d5bc3b0fb14e9031e83c63afbd39b4bff657695b17fdf6dfff0307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for pyregen 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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