Commit 443a2fd addedsome extra checks for convergence in the Helmholtz
PHSU flash routines. However, its checking was more aggressive than the
original routine. This caused the routine to raise an exception on
several values that had previously been deemed acceptable. This trickled
down to cause the TTSE tables to be filled with empty values, making
them less robust.
This commit allows for a solution to be acceptable if the change is
small between iterations as was originally intended.
* Catch singular explosions in saturation_PHSU_pure
Sometimes, the Akasaka solver has issues. This is usually caught and
then it is retried with a new omega. However, sometimes it goes bad
because the J matrix is singular, and this is not caught because the
error is not recalculated.
This commit recalculates the error term to prevent a bad result.
* Add comment to explain error check in saturation_PHSU_pure
* Add extra update check after saturation_PHSU_pure
During saturated PHSU flash calculations, SatL and SatV states have an
imposed phase. This is good for stability, but there is a small chance
that they can both up up with a matching third variable (e.g.,
pressure) that is not actually at the saturation point. This commit
forces a final DT update without this requirement. If an actual solution
has been found, the the error term will still be small. If not, then we
throw an exception and try again.
This continues work on #2245.
* Ensure that saturated phase is specified
In saturation_PHSU_pure, we unspecify the phase of SatL and SatV to
perform a final check. However, for any future updates, these states
*must* be set with specified phase. This commit ensures that no matter
what happens (exception, etc.) the phase is always specified again.
* Revert "Ensure that saturated phase is specified"
This reverts commit c6b650b861.
The commit caused potential recursive lookups and did not solve the
issue at hand.
* Update the ammonio saturated rhoV ancillary
The rhoV ancillary gave somewhat wrong results. This commit provides a
closer fit that prevents errors downstream.
* Fix build of LibreOffice wrapper for LibreOffice SDK >= 7.5
In the LibreOffice SDK version 7.4 the "idlc" and "regmerge" tools were
deprecated and replaced by the new UNOIDL compiler "unoidl-write". The
old tools have been removed from version 7.5 onwards. Thus, the build
process is changed to use the new compiler.
- The new binary type libary format produced by "unoidl-write" has
already been used internally since LibreOffice 4.1 in 2013, so that
extensions built with the new compiler will also run on older office
versions. The minimal LibreOffice version for the extension is
therefore changed to 4.1
- With the "unoidl-write" compiler some API changes were introduced.
Identifiers containing underscores must start with an uppercase
letter, as identifiers with underscores and starting with a lowercase
letter are reserved for internal purposes. Thus, the naming of some
functions used in the extension is changed.
* Enable install of CoolProp python package dev versions
If the LibreOffice extension was built for a development version, then
it should also download the appropriate development version of the
CoolProp python package.
* Add a builder for LibreOffice wrapper
* Add LibreOffice builder to release workflow
* Use lazy initialization and getter functions to avoid problems with the order of initialization when linking statically.
* Use const ref as suggested by @ibell
Use an existing CoolProp installation to create data sets for Acetone, Ethanol, Hexane as well as gaseous air. These fluids are added to the list of incompressible fluids for simplified calculations.
use interpolation to avoid the division by zero when calculating incompressible fluid properties exactly at the base temperature or composition, closes#2295
* Add EOS JSON for R1336mzz(E) from Akasaka-IJT-2023.
* Add BibTeX entry for Akasaka-IJT-2023.
* Add BibTeX_EOS label in R1336mzz(E).json.
* Update R1336mzz(E).json
Fix the triple point liquid density, without it, VLE calculations fail
---------
Co-authored-by: Ian Bell <ian.h.bell@gmail.com>
* Fix Missing SWIG Wrapper
Added pass-through function to CoolProp.cpp for apply_simple_mixing_rule which was not recognised by SWIG and included in wrappers. Had to rename original function to apply_basic_mixing rule to avoid naming conflict. Using a similar approach as CoolProp::add_fluids_as_JSON and keeping the same function name failed to compile. Also added HumidAirProp.h to the SWIG_DEPENDENCIES so that these functions are included in the wrapper.
* Include SWIG wrapper without changing function names
Instead of changing function names, applied same approach as used with add_fluids_as_JSON to implement the passthrough function. apply_simple_mixing_rule is called in MixtureParameters.cpp using a namespace. This means that SWIG wraps the function and the underlying function names are not touched.
* Addressed review comment
Reverted all previous changes to code as per request from code review. This version has no namespace changes and pass-through wrapping of missing function. Only change is to modify CoolProp.i for SWIG to ensure that the missing function, and that function only, is included when SWIG creates the wrapped code.
* attempt to add fugacity functions needed for CoolProp.jl
* address first round of PR edits
change std:size_t to long
remove get_fugacity_coefficients
add .def exports
* remove fugacity refs in CoolPropLib.def