Skip to content

Commit

Permalink
optimized crit_pure for ABCubics
Browse files Browse the repository at this point in the history
  • Loading branch information
longemen3000 committed Feb 4, 2022
1 parent 1c6aba5 commit 1df75f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/models/cubic/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ function p_scale(model::CubicModel,z=SA[1.0])
return a/ (b^2) # Pc mean
end

function x0_crit_pure(model::CubicModel)
lb_v = lb_volume(model)
(1.0, log10(lb_v/0.3))
function crit_pure(model::ABCubicModel)
Tc = model.params.Tc.values[1]
Pc = model.params.Pc.values[1]
Vc = volume(model,Pc,Tc,SA[1.],phase=:v)
return (Tc,Pc,Vc)
end

function volume(model::ABCubicModel,p,T,z=SA[1.0];phase=:unknown,threaded=false)
Expand Down

0 comments on commit 1df75f3

Please sign in to comment.