Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenCompressor-Twin

[ English | 简体中文 ]

CI License: MIT Python: 3.11–3.14 Video: Bilibili Video: YouTube

One open, reproducible toolkit for positive-displacement refrigerant compressors: calibrate a performance model from measured points, predict untested conditions with an explicit validity domain, compare honestly against industry baselines, and choose the next test point.

Repositories: GitHub · Gitee mirror

Rolling-piston and scroll compressors, quarter-section models

Status: research preview (0.1.0a1). The scroll workflow has been tested on published calorimeter data from two compressor models. The rolling-piston model is implemented and software-tested, but has not yet been validated against measured rolling-piston data. Read the validation report before relying on any number.

What it does

measured points ─▶ unit / boundary / provenance checks ─▶ compressor model (rolling piston | scroll)
               ─▶ grouped calibration ─▶ prediction + domain check (+ optional conformal interval)
               ─▶ next-test recommendation ─▶ frozen benchmark against baselines ─▶ offline HTML report
  • One package, one CLI (octwin) for both structures; the structure is chosen by metadata, not by a separate program.
  • SI units, absolute pressure, explicit power boundary. Shaft power is never relabelled as electrical input; speed provenance (measured vs. nominal-equivalent) is recorded.
  • Grouped data handling. Repeated tests of one nominal condition share a group and never straddle train/calibration/test sets.
  • Conservative domain. Points outside the convex hull of the training inputs are refused rather than silently extrapolated.
  • Baselines are first-class. Every benchmark also fits a training-only affine surface and an AHRI-540-style ten-coefficient cubic in dew temperatures.
  • Optional explicit residual extension (--residual-rbf): a radial-basis log-residual correction on top of the physical model, stored and validated as a separate layer.
  • Test-point recommendation: coverage (maximin), local D-optimal parameter information, or full-input kernel variance reduction, each with relative cost.
  • Frozen-protocol evaluation tools: fixed-budget learning curves, select-reveal-recalibrate replay, and development-only cross-validation that cannot see held-out labels.

Validation summary

Held-out measured points, mean absolute relative error (MARE). Full tables, P95/max errors, intervals and caveats: docs/validation.md.

Dataset (published experiment) Test points Four-parameter model Four-parameter + RBF AHRI-style 10-coefficient
Copeland ZP21K5E-PFV, R410A, 65°F suction (AREP #11) — protocol frozen before data download 12 1.40% / 2.80% 0.36% / 0.26% 0.29% / 0.14%
Copeland ZP21K5E-PFV, R32, 65°F suction (AREP #11) — protocol frozen before data download 10 1.24% / 2.22% 0.24% / 0.47% 0.23% / 0.48%
Copeland ZS21KAE-PFV, R404A, 65°F suction (AREP #21) 12 0.62% / 1.71% not scored on this set 0.41% / 0.16%

Values are mass flow / electrical power. What this shows:

  • The physical four-parameter model meets a 5% MARE / 10% P95 target on these sets, but at fixed speed and fixed suction temperature, inside the training domain, the ten-coefficient polynomial is clearly better.
  • The RBF residual extension consistently improves the physical model and is roughly on par with the ten-coefficient baseline (slightly worse for R410A, slightly better for R32). It adds coefficients; it is not a "four parameters only" result.
  • None of the recommendation strategies showed a consistent advantage over simple maximin coverage. No reduction in test points or bench time is claimed.
  • Not yet tested: rolling-piston measurements, cross-speed prediction, boundary extrapolation, independent laboratories.

Quick start

Python 3.11–3.14. Use an isolated environment.

python -m venv .venv
# Windows: .venv\Scripts\activate    POSIX: source .venv/bin/activate
pip install -e ".[test]"
pytest -q
octwin demo --output runs/demo          # synthetic software self-test for both structures

Benchmark a published dataset with its frozen split:

octwin benchmark data/public/arep11_r410a_65f/data.csv \
  --meta data/public/arep11_r410a_65f/metadata.json \
  --split data/public/arep11_r410a_65f/split.json \
  --output runs/arep11_r410a
# open runs/arep11_r410a/report.html

Calibrate, predict and recommend with your own data:

octwin validate data.csv --meta metadata.json
octwin calibrate data.csv --meta metadata.json --split split.json --output model.json
octwin predict --model model.json --conditions inputs.csv --output predictions.csv
octwin recommend --model model.json --candidates candidates.csv --strategy kernel_ivr --budget 3 --approved --output next.json
from octwin.api import load_dataset, build_artifact, predict_point

dataset = load_dataset("data.csv", "metadata.json")
model = build_artifact(dataset, dataset.observations)   # in a real study pass training groups only
print(predict_point(model, dataset.observations[0].point))

Data format

Observation CSV (SI units, absolute pressure):

point_id,group_id,suction_pressure_pa,discharge_pressure_pa,suction_temperature_k,speed_rpm,mass_flow_kg_s,power_w

Metadata JSON declares compressor_type (rolling_piston | scroll), refrigerant, displacement, power_boundary, speed_definition, source_kind and source/licence. Candidate CSVs for recommendation contain inputs only. See the user guide (中文) and an empty template in data_templates/.

Models in brief

m = ρ_s · V_d · N/60 · η_v, P = m · Δh_s / η_is, with bounded four-parameter correlations for volumetric and isentropic efficiency; the pressure-ratio term differs by structure (rolling piston: PR − 1, scroll: ln PR). Thermophysical properties come from CoolProp; suction states must be single-phase vapour. Speed currently enters throughput only — speed-dependent losses are not modelled, which is the main known physical limitation.

Reproducibility

  • data/public/ — published datasets with metadata, frozen splits and extraction audits; data_sources/ — cell-by-cell transcriptions; tools/prepare_*.py — conversions (original reports are not redistributed; download them from the URLs in the metadata).
  • evidence/ — frozen result files. tools/regression_check.py recomputes them and requires exact equality.
  • data_sources/round5_external_protocol.json and round5_protocol_freeze.json record the protocol and code hashes fixed before the AREP #11 data were downloaded.

Contributing data

Measured rolling-piston (and scroll) data with paired mass flow and compressor power are the most valuable contribution. Please read CONTRIBUTING.md; data from any manufacturer is welcome when the source, units, power boundary and licence are clear.

Author and citation

Project lead: Zhichao Wang (ORCID 0000-0001-6662-835X). If you use this software in a paper or an engineering report, please cite it as described in CITATION.cff (the Cite this repository button on GitHub exports BibTeX/APA). If it is useful to you, a star on GitHub or Gitee helps other engineers find it. Questions, bug reports and public data: Issues.

Cooperation and enquiries: wangzhichao@chinaibee.com

License

Original code: MIT, © 2026 Jianke Environment and Energy Technology Co., Ltd. Dependencies: THIRD_PARTY_NOTICES.md. Datasets keep their own terms and attribution: DATA_LICENSES.md.

Metadata

Release files for opencompressor-twin 0.1.0a1

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

Source distribution (sdist)

Source distribution for opencompressor-twin 0.1.0a1
File Size Uploaded Provenance Actions
opencompressor_twin-0.1.0a1.tar.gz 67.0 kB With provenance Details for opencompressor_twin-0.1.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 125.5 kB

Release files / opencompressor_twin-0.1.0a1.tar.gz

Download URL opencompressor_twin-0.1.0a1.tar.gz
Size 67.0 kB
Tags Source
SHA-256 checksum
How to use checksums
31d630b41cac2d3f05fc2b51af75a45483623e40239d79623622bdbbcb43988e
BLAKE2b-256 checksum
How to use checksums
5d266eb720ecd0b298e8d6e8e149d3d3551af95c3bf87aef1d099ae594eba9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / opencompressor_twin-0.1.0a1-py3-none-any.whl

Download URL opencompressor_twin-0.1.0a1-py3-none-any.whl
Size 58.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a2789f0c5b188030cbd618a3611287a76b6ca7f1e8fd4e13a81f4d6364c4893
BLAKE2b-256 checksum
How to use checksums
dcc42c17f4d38d848c0040a58a191ed6e4948ad565ec4c7620b5e8abde26d102
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for opencompressor-twin 0.1.0a1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for opencompressor_twin-0.1.0a1.tar.gz

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 Oct 26, 2026.

Transparency log

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
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