Releases: ClapeyronThermo/Clapeyron.jl
v0.3.11
New features
- new EoS: PCSAFT with activity mixing rules (
GEPCSAFT(components; activity)
) (https://doi.org/10.1021/acs.iecr.2c03464) - new EoS: UNIFAC-FV (
UNIFACFV
) - new EoS UNIFAC-FV-poly (
UNIFACFVPoly
) getparams
now supports inline csvs, custom locations and the ability to replace or swap out certain parameters, checkgetparams
docs for more information- new function:
recombine!
to recalculate combining and mixing rules after one parameter is modified. at the moment, SAFT and activity models have this defined. - all quadratic mixing rules have an implace version (
sigma_LorentzBerthelot(sigma,zeta)
->sigma_LorentzBerthelot!(sigma,zeta)
) AssocParam
hasgetindex
/setindex!
methods defined.GroupParam
has a new field,grouptype
, to differenciate group parametrizations
Deprecations
icomponents
was removed, useClapeyron.@comps
or1:length(model)
insteadPairParam.diagvalues
was removed, useClapeyron.diagvalues(param)
instead
v0.3.10
New features
dew_pressure
anddew_temperature
can now by calculated withActivityModel
s. options available can be passed via the new methodsActivityBubblePressure
,ActivityBubblwTemperature
,ActivityDewPressure
,ActivityDewTemperature
. helmholtz-based models also support solvingbubble_pressure
anddew_pressure
using those methods (http://dx.doi.org/10.1021/acs.iecr.1c03800).- There is support for γ-ϕ equilibria on
bubble_pressure
anddew_pressure
with activity models, that is:, solvingyᵢϕᵢp = γᵢp₀ᵢϕ₀ᵢ𝒫ᵢ
- New Correlation models:
LeeKeslerSat
,DIPPR101Sat
for saturation pressure and temperature,COSTALD
,RackettLiquid
,DIPPR105Liquid
, for saturated liquid volume. - New models: Second Virial models (
AbbottVirial
,TsonopoulosVirial
andEoSVirial2
) - New model:
CompositeModel
, used to hold saturation, liquid and vapor correlations. For example, instantiating an Activity Model, that uses Peng-Robinson for a gas model, DIPPR 101 for saturation and COSTALD for liquid volume, with a wilson activity coefficient, can be written as:julia> com = CompositeModel(["water","methanol"],liquid = COSTALD,saturation = DIPPR101Sat,gas = PR) Composite Model: Gas Model: PR{BasicIdeal, PRAlpha, NoTranslation, vdW1fRule}("water", "methanol") Liquid Model: COSTALD("water", "methanol") Saturation Model: DIPPR101Sat("water", "methanol") # Wilson activity model, using the composite model as the pure model julia> model = Wilson(["water","methanol"],puremodel = com) Wilson{CompositeModel{PR{BasicIdeal, PRAlpha, NoTranslation, vdW1fRule}, COSTALD, Nothing, DIPPR101Sat, Nothing}} with 2 components: "water" "methanol" Contains parameters: g, Tc, Pc, ZRA, Mw
- Improved initial points for
bubble_temperature
anddew_temperature
. MichelsenTPFlash
no uses an accelerated successive substitution method.
Bug fixes
- cross-association weren't counted in some cases.
- incorrect initialization on
FugBubbleTemperature
Clapeyron.lnϕ
uses the specialized algorithm for volume instead of the general one.
v0.3.9
New features
- New combining rules that are done at model creation time instead of runtime:
:cr1
and:esd
/elliott
. the oldelliott
combining rule was renamed toelliott_runtime
(it is only used onPharmaPCSAFT
, where is required)
Bug fixes
v0.3.8
New features
-
bubble_pressure
,bubble_temperature
,dew_pressure
, anddew_temperature
can now support custom methods. (subtypingBubblePointMethod
orDewPointMethod
). the default methods are now namedChemPotBubblePressure
,ChemPotBubbleTemperature
,ChemPotDewPressure
,ChemPotDewTemperature
. you can provide some or all necessary initial conditions to those new methods:res = bubble_pressure(model,T,x,ChemPotBubblePressure(;y0;p0;vol0))
-
New bubble/dew methods based on isofugacity conditions:
FugtBubblePressure
,FugBubbleTemperature
,FugDewPressure
,FugtDewTemperature
. -
All bubble methods now support leaving some components out of the bubble phase,via the
nonvolatiles
keyword, supported by all available bubble solvers. similarly, all dew methods support thenoncondensables
keyword to leave some components out of the dew phase. -
MichelsenTPFlash
can support bothnonvolatiles
andnoncondensables
. -
SingleParam
andPairParam
support indexing and broadcasting.PairParam
has a modified indexing scheme, whereparam[i]
will return the diagonal elements,param[i,j]
will return off-diagonal elements.setindex!
onPairParam
is symmetric by default, that is,param[i,j] = k
will also setparam[j,i]
. you can opt out of this by doingparam[i,j,false] = k
-
New function:
diagvalues
, for obtaining a vector view of the diagonal elements of a Pair or Single Parameter. -
New functions:
VT_gibbs_free_energy_res
andVT_helmholtz_free_energy_res
-
New saturation method:
saturation_temperature(model,p,::SuperAncSaturation)
-
index_reduction(model,x::AbstractVector{Bool})
will return a reduced model, according to the true values of the vectorx
. Passing another vector will perform the index reduction based on non-empty values, as usual. -
Initial (and optional) support for solid phase volume solving, via
x0_volume_solid
-
New EoS (experimental):
AnalyticalSLV
, that supports solid, liquid and vapour phases in one continous helmholtz functional. -
the database parser is faster and has better verbose reporting.
-
SAFTVRMie
andSAFTGammaMie
should be a little faster on single component evaluations
Bug Fixes
activity_coefficient
andfugacity_coefficient
now works withSVector
#104- there was a bug on calculating the length of GC models that went under
split_model
Deprecations
-
model.params.param.diagvalues
is not longer used in the codebase and it will be removed at the next breaking version. usediagvalues(model.params.param)
ormodel.params.param[i]
instead. -
model.icomponents
is not longer used in the codebase and it will be removed at the next breaking version.1:length(model)
orClapeyron.@comps
instead.
v0.3.7
New features
- You can now define custom saturation (temperature or pressure) solvers, via subtyping
SaturationMethod
. The default solver is now namedChemPotVSaturation
. - New methods for saturation pressure:
IsoFugacitySaturation
,ChemPotDensitySaturation
,SuperAncSaturation
(for cubics) - All saturation methods support passing the
crit
keyword, to allow using precomputed critical points. - All saturation methods that use a non linear solver support passing convergence options.
- The default solver for
saturation_temperature
was changed (now namedAntoineSaturation
). The new model is much faster and with a similar reliability. the old one is available viaClapeyronSaturation
. - New method for TP-Flash:
MichelsenTPFlash
- New function:
tpd
, that tries to find all negative tangent plane distances - New function:
lle_init
, that tries to find good LLE starting points, viatpd
- New function:
x0_saturation_temperature(model,p)
, that returns starting points forsaturation_temperature
. - New function:
x0_psat(model,p)
, that returns starting points forIsoFugacitySaturation
. - New function:
antoine_coef
for reduced antoine coefficients. used to accelerate initial points, if available. - New function:
cite(model)
returns all references used in the evaluation of a model. bubble_temperature
,dew_temperature
,lle_temperature
,azeotrope_temperature
andvlle_temperature
methods now iterate directly over the extended-with-temperature non linear system that their pressure cointerparts.- Cubics were revamped and generalized even more. those changes opened the way to introduce more non-standard cubics, all while being compatible with the initial guess procedures, advanced mixing rules and other Clapeyron optimizations for cubics.
- New cubic EoS:
Clausius
- New cubic EoS:
Berthelot
- New cubic EoS: Patel-Teja (
PatelTeja
) - New cubic EoS: Patel-Teja-Valderrama (
PatelTeja
) - New cubic EoS: Kumar-Upadhyay two parameter EoS (
KU
) - New mixing rule: Modified Wong-Sandler (
ModWS
) SoaveAlpha
now works withvdW
andPR
(returning the same value ofPRAlpha
)- New EoS: Perturbed, truncated and shifted LJ EoS (
PeTS
) - SPUNG is now a constructor for the new
ECS
model. volume
now accepts avol0
initial point.PCSAFT
should be a little bit faster for single component cases
v0.3.6
New Features
ZeroResidual
model (a_res = 0
)
Bug fixes
HVRule
uses the original rule instead of the modified one.ismissingvalues
is preserved when a combining rule is applied. this allows us to track inputed parameters vs calculated ones.
In particular, this release is the one used in the Clapeyron.jl
paper. and it's results should be reproducible by locking the version to v0.3.6.
v0.3.5
Clapeyron v0.3.5
New Features
- new functions:
VT_mass_density
,VT_mol_density
vdW
,RK
andPR
models and variants use nowABCubicParam
.vdWParam
,RKParam
andPRParam
are now just aliases toABCubicParam
.- Roots.jl updated to 2.0
Fixes
- fixes to UNIFAC models
- fixes to
split_model
on groups
v0.3.4
Clapeyron v0.3.4
New Features
- New EoS: Enhanced Predictive Peng Robinson 1978 (2022) (
EPPR78
) - New EoS: Quantum Corrected Peng Robinson (2022) (
QCPR
) - New EoS: Modified PCSAFT with T-dependent σ for water (passing
water08
) and k0 + k1T mixing rule (pharmaPCSAFT
). - New function:
index_reduction(model,z)
that removes components with compositions near zero. useful to reduce the dimensionality on multicomponent solvers. - New function:
isstable(model,V,T,z)
to check for stability at the input conditions. - New function:
gibbs_duhem(model,V,T,z)
to check if the Gibbs-Duhem relations holds for the input model at the specified conditions. - New function:
kij_mix
andpair_mix
for arbitrary pair combining rules - volume solver can now perform aditional stability checks by passing
phase = :stable
, before only mechanical stability checks were done. - association solver supports Elliot rule for combining rules, passed via
assoc_options(combining = :elliott
) - association solver supports dense association matrix, passed via
assoc_options(combining = :dense_nocombining
) - Faster
crit_pure
,saturation_pressure
- Faster
GERG2008
andEOS_LNG
- some cubic α-functions are faster for single component models
- improved initial saturation point for cubics
CPA
andsCPA
now acceptAssocOptions
- new mixing
SLKRule
forSanchesLacombe
- easier constructors for some empty models:
NoTranslation()
instead ofNoTranslation(NoTranslationParam())
Error fixes
- GC models can now be splitted in arbitrary component subsets
absolutetolerance
fields removed from almost all EoS (except COSMO models)second_virial_coefficient
now works withSanchezLacombe
- some starting points for
softSAFT
(original) andBACKSAFT
were wrong. ``softSAFT2016` was not affected. volume_compress
now accepts integer pressures, they are converted internally.volume
for cubics now propagates the pressure type
Closed issues:
Merged pull requests:
- Add chemical stability check (#72) (@lucpaoli)
- Index reduction (#76) (@longemen3000)
- pharmaPCSAFT and combining rules (#77) (@longemen3000)
- QCPR and EPPR78 (#81) (@pw0908)
v0.3.3
Clapeyron v0.3.3
New Features
gibbs_solvation(model,T)
: For calculation of the solvation energy in a binary model- speed up for activity coefficients and excess gibbs free energies for
NRTL
,Wilson
,UNIQUAC
andUNIFAC
- new EoS model:
softSAFT2016
, that uses the LJ helmholtz energy from thol et al. (2016) - new utility function:
correct_composition_derivative
, that returns∑xᵢμᵢ - G
. it should be zero or near zero for correctly written models.
Error Fixes
- fix error in parameters for
softSAFT
- fix errors in use of units. tests added.
- fix error on isobaric expansivity.
Merged pull requests:
v0.3.2
Clapeyron v0.3.2
- fixes in volume solver
- fixes in initial guesses for
MultiFuidModel
andCPA
- all multicomponent solvers now accept an initial guess
Closed issues:
- VLE/VLLLE (#67)