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