Clapeyron provides a framework for the development and use of fluid-thermodynamic models, including SAFT, cubic, activity, multi-parameter, and COSMO-SAC.
MIT License
Bot releases are visible (Hide)
Published by longemen3000 over 1 year ago
DETPFlash
now returns results sorted by increasing molar volume (heavy liquid ->light liquid -> vapour) (fixes #151)
Published by longemen3000 over 1 year ago
SAFTVRMie
's csv were incorrect.recombine!
now works with StructGroupParam
.Published by longemen3000 over 1 year ago
Published by longemen3000 over 1 year ago
assoc_translator
field when creating assoc sites with groups that have multiple association groups.β
in rachfordrice
Published by longemen3000 almost 2 years ago
StructGroupParam
, that stores groups, as well as it's bonds between them, used in heteronuclear GC approachesstructSAFTgammaMie
)gcPCSAFT
)split_model
can now differenciate between group and component parameters inside a modelPublished by longemen3000 almost 2 years ago
New estimation framework, to fit new model parameters from known data. at the moment of this release, it should support all SAFTs, Cubics, Activity models and models that don't require any special pre-computed cache.
Base.transpose(model::EoSModel)
is defined. now this is valid code:
T = 300:350
comp = ["water"]
models = [m(comp) for m in (PR,PCSAFT,SAFTVRMie)]
saturation_pressure.(transpose(models),T) #produces a 51×3 Matrix{Tuple{Float64, Float64, Float64}}:
x0_sat_pure
now returns Vl
and Vv
(in [m^3]
) instead of log10(Vl)
and log10(Vv)
.segment
is used instead of m
Vc
is used instead of vc
Pc
is used instead of pc
acentricfactor
is used instead of w
Published by longemen3000 almost 2 years ago
RKPR
)cross_second_virial
and equivol_cross_second_virial
, to calculate B12, at specified z conditions, or by setting equivolumetric mixing.recombine!
PenelouxTranslation
and RackettTranslation
now cache their results, resulting in a speed up when using volume translated EoS.Clapeyron.cite
now accepts the optional argument out
, that can be doi
(current default, DOI) or :bib
(for BibTeX)Published by longemen3000 almost 2 years ago
GEPCSAFT(components; activity)
) (https://doi.org/10.1021/acs.iecr.2c03464)UNIFACFV
)UNIFACFVPoly
)getparams
now supports inline csvs, custom locations and the ability to replace or swap out certain parameters, check getparams
docs for more informationrecombine!
to recalculate combining and mixing rules after one parameter is modified. at the moment, SAFT and activity models have this defined.sigma_LorentzBerthelot(sigma,zeta)
-> sigma_LorentzBerthelot!(sigma,zeta)
)AssocParam
has getindex
/setindex!
methods defined.GroupParam
has a new field, grouptype
, to differenciate group parametrizationsicomponents
was removed, use Clapeyron.@comps
or 1:length(model)
insteadPairParam.diagvalues
was removed, use Clapeyron.diagvalues(param)
insteadPublished by longemen3000 about 2 years ago
dew_pressure
and dew_temperature
can now by calculated with ActivityModel
s. options available can be passed via the new methods ActivityBubblePressure
, ActivityBubblwTemperature
, ActivityDewPressure
, ActivityDewTemperature
. helmholtz-based models also support solving bubble_pressure
and dew_pressure
using those methods (http://dx.doi.org/10.1021/acs.iecr.1c03800).bubble_pressure
and dew_pressure
with activity models, that is:, solving yᵢϕᵢp = γᵢp₀ᵢϕ₀ᵢ𝒫ᵢ
LeeKeslerSat
, DIPPR101Sat
for saturation pressure and temperature, COSTALD
, RackettLiquid
,DIPPR105Liquid
, for saturated liquid volume.AbbottVirial
,TsonopoulosVirial
and EoSVirial2
)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
bubble_temperature
and dew_temperature
.MichelsenTPFlash
no uses an accelerated successive substitution method.FugBubbleTemperature
Clapeyron.lnϕ
uses the specialized algorithm for volume instead of the general one.Published by longemen3000 about 2 years ago
:cr1
and :esd
/elliott
. the old elliott
combining rule was renamed to elliott_runtime
(it is only used on PharmaPCSAFT
, where is required)Published by longemen3000 about 2 years ago
bubble_pressure
, bubble_temperature
, dew_pressure
, and dew_temperature
can now support custom methods. (subtyping BubblePointMethod
or DewPointMethod
). the default methods are now named ChemPotBubblePressure
, 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 the noncondensables
keyword to leave some components out of the dew phase.
MichelsenTPFlash
can support both nonvolatiles
and noncondensables
.
SingleParam
and PairParam
support indexing and broadcasting. PairParam
has a modified indexing scheme, where param[i]
will return the diagonal elements, param[i,j]
will return off-diagonal elements. setindex!
on PairParam
is symmetric by default, that is, param[i,j] = k
will also set param[j,i]
. you can opt out of this by doing param[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
and VT_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 vector x
. 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
and SAFTGammaMie
should be a little faster on single component evaluations
activity_coefficient
and fugacity_coefficient
now works with SVector
#104
split_model
model.params.param.diagvalues
is not longer used in the codebase and it will be removed at the next breaking version. use diagvalues(model.params.param)
or model.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)
or Clapeyron.@comps
instead.
Published by longemen3000 over 2 years ago
SaturationMethod
. The default solver is now named ChemPotVSaturation
.IsoFugacitySaturation
, ChemPotDensitySaturation
, SuperAncSaturation
(for cubics)crit
keyword, to allow using precomputed critical points.saturation_temperature
was changed (now named AntoineSaturation
). The new model is much faster and with a similar reliability. the old one is available via ClapeyronSaturation
.MichelsenTPFlash
tpd
, that tries to find all negative tangent plane distanceslle_init
, that tries to find good LLE starting points, via tpd
x0_saturation_temperature(model,p)
, that returns starting points for saturation_temperature
.x0_psat(model,p)
, that returns starting points for IsoFugacitySaturation
.antoine_coef
for reduced antoine coefficients. used to accelerate initial points, if available.cite(model)
returns all references used in the evaluation of a model.bubble_temperature
, dew_temperature
, lle_temperature
, azeotrope_temperature
and vlle_temperature
methods now iterate directly over the extended-with-temperature non linear system that their pressure cointerparts.Clausius
Berthelot
PatelTeja
)PatelTeja
)KU
)ModWS
)SoaveAlpha
now works with vdW
and PR
(returning the same value of PRAlpha
)PeTS
)ECS
model.volume
now accepts a vol0
initial point.PCSAFT
should be a little bit faster for single component casesPublished by longemen3000 over 2 years ago
ZeroResidual
model (a_res = 0
)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.
Published by github-actions[bot] over 2 years ago
VT_mass_density
, VT_mol_density
vdW
, RK
and PR
models and variants use now ABCubicParam
. vdWParam
, RKParam
and PRParam
are now just aliases to ABCubicParam
.split_model
on groupsPublished by github-actions[bot] over 2 years ago
EPPR78
)QCPR
)water08
) and k0 + k1T mixing rule (pharmaPCSAFT
).index_reduction(model,z)
that removes components with compositions near zero. useful to reduce the dimensionality on multicomponent solvers.isstable(model,V,T,z)
to check for stability at the input conditions.gibbs_duhem(model,V,T,z)
to check if the Gibbs-Duhem relations holds for the input model at the specified conditions.kij_mix
and pair_mix
for arbitrary pair combining rulesphase = :stable
, before only mechanical stability checks were done.assoc_options(combining = :elliott
)assoc_options(combining = :dense_nocombining
)crit_pure
, saturation_pressure
GERG2008
and EOS_LNG
CPA
and sCPA
now accept AssocOptions
SLKRule
for SanchesLacombe
NoTranslation()
instead of NoTranslation(NoTranslationParam())
absolutetolerance
fields removed from almost all EoS (except COSMO models)second_virial_coefficient
now works with SanchezLacombe
softSAFT
(original) and BACKSAFT
were wrong. ``softSAFT2016` was not affected.volume_compress
now accepts integer pressures, they are converted internally.volume
for cubics now propagates the pressure typeClosed issues:
Merged pull requests:
Published by github-actions[bot] over 2 years ago
gibbs_solvation(model,T)
: For calculation of the solvation energy in a binary modelNRTL
, Wilson
, UNIQUAC
and UNIFAC
softSAFT2016
, that uses the LJ helmholtz energy from thol et al. (2016)correct_composition_derivative
, that returns ∑xᵢμᵢ - G
. it should be zero or near zero for correctly written models.softSAFT
Merged pull requests:
Published by github-actions[bot] over 2 years ago
MultiFuidModel
and CPA
Closed issues:
Published by github-actions[bot] over 2 years ago
Model fixes;
WSRule
MonomerIdeal
assoc_site_matrix(model::Union{SAFTModel,CPAModel},V,T,z)
to instantiate the association matrixReidIdeal(model::JacobianIdeal)
to obtain a Reid ideal model from a Joback Ideal modelcrit_pure
on cubicsMerged pull requests:
Published by github-actions[bot] almost 3 years ago
Closed issues:
Merged pull requests:
Published by github-actions[bot] almost 3 years ago
ParamTable
function to create Clapeyron tables from any Tables.jl compatible structure.Merged pull requests: