* Add refrigerant mixture models (Bell-JPCRD-2022/2023) and update R-1234yf EOS
Pure fluid:
- Replace Richter-JCED-2011 with Lemmon-Akasaka 2022 (Int. J. Thermophys. 43:119)
as EOS[0] for R-1234yf; retain Richter as EOS[1]
- Ttriple updated from 220.0 K to 121.6 K; pc=3384400 Pa; rhoc=4180 mol/m3
- All 16 Table 7 check values pass to 5+ significant figures
- ASHRAE enthalpy reference state correct: h_L(0C)=200 kJ/kg
- Saturation consistent from 150 K to 360 K (L/V pressure equality)
- SUPERANCILLARY omitted pending fastchebpure fix; CoolProp uses the
Table 2 ancillary equations (pS, rhoL, rhoV) as initial guesses
Mixture departure functions (8 new, type=Exponential):
- Bell-JPCRD-2022: R1234yf-R134a, R1234yf-R1234ze(E), R134a-R1234ze(E)
- Bell-JPCRD-2023: R32-R1234yf, R32-R1234ze(E), R1234yf-R152a,
R125-R1234yf, R1234ze(E)-R227ea
Binary pair parameters (5 updated, 3 new):
- Updated R1234yf/R134a, R32/R1234yf, R32/R1234ze(E),
R125/R1234yf, R1234yf/R152a (replacing Akasaka-FPE-2013
and Bell-JCED-2016 interim models with final fits)
- Added R1234yf/R1234ze(E), R134a/R1234ze(E), R1234ze(E)/R227ea
BibTeX entries added: Bell-JPCRD-2022, Bell-JPCRD-2023, Lemmon-IJT-2022
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add C++ check value tests for Lemmon-IJT-2022 and Bell-JPCRD-2022/2023
- Table 7 from Lemmon & Akasaka (2022): 6 state points for R1234yf
covering ideal-gas, gas, compressed liquid, and near-critical
- Fixed-point constants: Tc, pc, rhoc, Ttriple
- Table XI from Bell (2022): alphar check values for three R1234yf-based
binary pairs (R1234yf/R1234zeE, R1234yf/R134a, R134a/R1234zeE)
- Table XIII from Bell (2023): alphar check values for five mixture pairs
(R32/R1234yf, R32/R1234zeE, R125/R1234yf, R1234yf/R152a, R1234zeE/R227ea)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add mixture departure functions and binary pair parameters
Bell-JPCRD-2022 (DOI 10.1063/5.0083545):
- 3 new departure functions: R1234yf-R134a, R1234yf-R1234ze(E), R134a-R1234ze(E)
- 3 new/updated binary pairs
Bell-JPCRD-2023 (DOI 10.1063/5.0124188):
- 5 new departure functions: R32-R1234yf, R32-R1234ze(E), R1234yf-R152a,
R125-R1234yf, R1234ze(E)-R227ea
- 5 new/updated binary pairs (supersedes Bell-JCED-2016 interim models)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add superancillary equations to R1234yf EOS
Builds Chebyshev superancillary for R1234yf covering the full
saturation curve from Ttriple (121.6 K) to near-critical (66
intervals). Also adds missing 'description' fields to the ANCILLARIES
block (required by the teqp ancillary loader).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(mixtures): correct betaT ordering for R1234zeE pairs; add inverted-order tests
The Bell-JPCRD-2022 JSON entries for R1234yf+R1234zeE and R134a+R1234zeE
had CAS1=R1234zeE (alphabetically first), causing no swap on load. When
the mixture was constructed with the other component first CoolProp's
MixtureParameters swap logic inverted betaT a second time, yielding the
wrong reducing temperature.
Fix: swap CAS1/CAS2 so that CAS1 is alphabetically later for both pairs,
triggering a swap-on-load that pre-inverts betaT at full double precision.
The swap-on-use then recovers the exact paper value with no rounding error.
The original paper betaT/betaV values are restored in the JSON.
Also enable DmolarT_INPUTS on mixture backends in DHSU_T_flash so the
alphar check-value tests can call update(DmolarT_INPUTS, ...) on a mixture
AbstractState without throwing.
Test updates:
- Bell-JPCRD-2022 Table XI check values for R1234yf-containing pairs
updated to the final Lemmon-IJT-2022 EOS (pre-pub EOS used in paper
differs by ~0.4%); tolerance tightened from 1e-6 to 1e-10 throughout.
- Three new inverted-component-order sections check the same tabulated
alphar values as the forward-order tests, verifying that the GERG
reducing function symmetry (swap components + reciprocal beta = same
result) is preserved by the CAS-ordering fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(tests): clarify that R1234yf EOS change drives the Table XI value updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: bump fastchebpure pin to 2026.04.18 for R1234yf superancillary data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(tests): specify phase in mixture DmolarT tests; revert FlashRoutines workaround
Mixture tests that call update(DmolarT_INPUTS, ...) must call specify_phase()
first so DHSU_T_flash uses the imposed-phase path rather than hitting the
NotImplementedError. Reverts the iDmolar special-case added to the mixture
else-branch of DHSU_T_flash.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add Chlorine (Cl2) fundamental equation of state
Implements the EOS from Thol, Herrig, Span, Lemmon (AIChE J. 67, e17326,
2021, DOI: 10.1002/aic.17326) for chlorine (CAS 7782-50-5).
- 10-term polynomial/exponential residual + 5-term Gaussian bell-shaped
- Ideal gas: diatomic (2.5) + 3 Planck-Einstein terms (800/3000/8200 K)
- NBP reference state (h=0, s=0 at saturated liquid, 101325 Pa)
- Saturation ancillaries: pS, rhoL, rhoV from REFPROP coefficients
- Valid range: 172.17 K to 525 K, up to 20 MPa
- Adds BibTeX entry Thol-AICHE-2021
Closes#2714
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add superancillary equations to Chlorine EOS
Builds Chebyshev superancillary for Cl2 covering the full saturation
curve from Ttriple (172.17 K) to near-critical (416.865 K, 61
intervals). Errors away from the critical region are at machine-
precision level (~1e-13 %).
The fastchebpure builder was also patched to prune near-critical
intervals where the pressure Chebyshev expansion becomes non-monotone
due to ill-conditioned VLE convergence at very small Theta; 3 such
intervals were removed for Chlorine (Theta ~ 2.3e-7).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Bump fastchebpure release to 2026.04.16 to fix docs CI failures
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces urllib with requests + HTTPAdapter/Retry to get automatic
retries (up to 3) with exponential backoff on 429/5xx and network
errors; 404 is treated as a definitive miss and skips to 2D without
retrying.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add predefined mixtures table to Mixtures documentation
Adds a new section "Predefined mixtures" to Web/fluid_properties/Mixtures.rst
listing all 154 predefined mixtures with their components and mole fractions.
Each mixture is tested at build time; those that fail (missing binary interaction
parameters or not present in the compiled library) are flagged in a Notes column.
Also updates the code examples in the new section to use the required .mix suffix,
and registers the generation script in the doc build task list.
Closes#2711
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: improve predefined mixtures table error messages and auto-count
- Replace CAS numbers with fluid names in binary interaction parameter errors
- Detect and report missing pure fluids by name
- Distinguish 'not registered as predefined mixture' from missing BIP
- Write PredefinedMixturesCount.rst so the mixture count in Mixtures.rst
is generated automatically rather than hardcoded
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(docs): add interactive 3D molecule viewers to fluid pages
Use py3Dmol + PubChem SDF data to embed a rotate-and-drag 3D (or 2D
fallback) molecule viewer on each pure fluid documentation page.
- fetch_pubchem_sdf(): downloads 3D conformer SDF from PubChem REST API
(falls back to 2D), caching results in molecule_sdf/ to avoid repeated
network calls on doc rebuilds
- generate_3dmol_rst(): inlines the SDF as a JS template literal inside a
.. raw:: html block — no extra static files needed at Sphinx build time
- FluidGenerator.write(): validates InChIKey with regex before fetching;
pseudo-pure fluids (Air, R404A, etc.) without InChIKeys are silently skipped
- conf.py: loads 3Dmol.js from CDN via html_js_files
- .gitignore: excludes the generated molecule_sdf/ cache directory
Restores molecule visualisation that was removed in April 2025 (the old
approach tried to embed an image directive inside a CSV table, which is
invalid RST; this implementation places the viewer in the RST template).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(docs): serve 3Dmol.js locally to eliminate CORS errors
Download 3Dmol-min.js to _static/ at Sphinx build time (same pattern
as MathJax) instead of loading it from the CDN via html_js_files.
Serving the script same-origin removes the cross-origin restriction
that caused CORS errors when docs were opened from file:// or a local
dev server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(docs): correct 3Dmol viewer positioning and initialization timing
3Dmol.js sets its canvas to position:absolute;top:0;left:0 and only
auto-sets the container to position:relative when the container's
inline style.position === "static". An unstyled div has style.position
=== "" so the check fails, and the canvas escapes the container and
anchors to the nearest positioned ancestor in the Sphinx page layout.
Fix: add position:relative explicitly to the viewer container div.
Also defer viewer init via DOMContentLoaded so layout is finalized
before createViewer reads the container dimensions, and call v.resize()
before v.render() to sync the WebGL canvas to the container size.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(docs): disable MathJax SRE to prevent CORS errors on file:// URLs
MathJax 4.0's Speech Rule Engine fetches sre/mathmaps/base.json at
runtime via fetch(). Chrome blocks this when docs are opened from a
local file:// URL (null origin). Disabling enableExplorer and
enableAssistiveMml prevents SRE from initialising entirely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(docs): load 3Dmol before require.js to fix AMD conflict
sphinx.ext.mathjax injects require.js at priority 500. When 3Dmol
loads after it, AMD detection fires and calls define([], factory)
instead of setting window.$3Dmol directly. Since nothing ever calls
require(['3Dmol-min']), the factory never runs and the viewer silently
fails (infinite setTimeout retry, no console errors).
Setting priority 450 ensures 3Dmol loads before require.js.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(docs): add retry logic to downloads in conf.py using requests
Replace urllib.request.urlretrieve with a requests-based _download()
helper that retries up to 5 times (exponential backoff, factor=2) on
transient HTTP errors and timeouts. Fixes CI build failures when
the MathJax or 3Dmol.js downloads time out.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Expansions are fully wrapped, looking good. Next step is the set of expansions that is the 1D approximation
* Get 1D approx working via cython
* Count solutions
* SuperAncillary class is working
>1000x speedup for water
Time for C++!
* Superancillaries are working!
In C++, speedup is more than 2000x. In Python, more like 150x because of Python <-> C++ overhead
* Add pmax check for PQ superancillary calls
* Update tests
* Allow T limits to be obtained
* Implement get_fluid_parameter_double for getting superanc value
* Add tests for getting parameters from superanc
* Script for testing superancillaries for sphinx
* Microoptimizations; don't help speed
The limiting factor remains the clear function, which takes about 30 ns
* Add R125 superancillary
* Use the release from fastchebpure for the files
* Drop a .gitignore in the unzipped folder
* Update superancillary injection script
* Turn on superancillaries by default
* Missing header
* Many int conversions in superancillary
* Another int cast
* More annoying solution for boost iter max
* Fix warnings
* One more warning
* Clear up the calculation of rho
* Update docs_docker-build.yml
Use arm64 since the containers were built on mac
* Superfluous ;
* Update backend.py
* Get the critical points working for superancillaries
* Fix wrapping changes of xmin&xmax methods
* squelch warnings
* Version 0 of jupyter notebook for docs
* Try to add the notebook to the docs
* Add jupyter notebook for superancillary
* Lots of updates to superancillary notebook
* More updates to docs
* Skip pseudo-pure for superancillary docs
* Fix output of superancillary figures
* Add superancillary plots to docs for the page for each fluid
* Make a placeholder figure for fluids without superancillary
* Add superancillary plots to task list
* Bump to release fixing m-xylene
* Relax the location of the REFPROP stuff
* Change default name for R-1336mzz(E)
* No need for figures to be so large
* Don't need REFPROP setting
* Bump to fastchebpure release with methanol
* Benchmark caching options
* Benchmark more granularly
* Add the fast methods to public API for HEOS class
* Back to memset - can memset with 0 but no other value
* Fix how caching is managed in Helmholtz class
* Close to final implementation
Perhaps a tiny bit more optimization possible?
* Update function name
* Make message more accurate
* Fix init order
* Expose update_QT_pure_superanc to Python
* Fix when _reducing is set for pures
* Fix the post_update
* Indent
* Notebook
* Notebook
* Make ln(p) construction lazy
Only really matters for debug builds
* Also make reference non-const
* Inject superancillary for methanol
* Make the superancillary loading entirely lazy in debug
* Fix PH bug for Nitrogen
Closes#2470
* Force the clear to be called on SatL and SatV
To invalidate them at start
* Default is non-lazy superancillary loading
* Add CMake option to have lazy-loading superancillaries [skip ci]
Not a good idea unless doing very narrow testing
- Streamlined the build of the HTML documentation based on a private docker image.
- Invoke doxygen and Sphinx to create the final HTML pages.
- Employ a cache for the GitHub actions to store the output of the expensive tasks.
- Restructured the GitHub actions builders and introduced a naming scheme.
- Fixed a few typos in the docs.
- Automatically publish the documentation to GitHub pages.
* autopep8 whitespace only:
--select="E101,W1,W2"
* revert single file: web2py_online.py
Should this be a .py file at all?
* revert file Tickets/1443.py because the diff looked strange:
maybe there is an encoding problem?
* Rename web2py_online.py to web2py_online.rst
* Add misc ignores so dynamic doc content can be built in repository
* Update to documentation Makefile for clean html build on Windows
* Updates to instructions for doc builds on Windows with Anaconda
* Added documentation page for IF97
* Fix errors on documentation page for Fluid_Properties/Mixtures
* Updated HighLevelAPI docs for clarity, IF97 ref, Python 3 support, and typos
* Modify print command to support build on Python 2 or 3
* Update to documentation to compile the Python wrapper with VC++