Skip to content

Instantly share code, notes, and snippets.

@longemen3000
Created August 19, 2022 15:25
Show Gist options
  • Save longemen3000/cd55d08539299e74335184474f12c070 to your computer and use it in GitHub Desktop.
Save longemen3000/cd55d08539299e74335184474f12c070 to your computer and use it in GitHub Desktop.
Clapeyron 0.3.8 news

New features

  • 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

Bug Fixes

  • activity_coefficient and fugacity_coefficient now works with SVector #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. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment