Clapeyron provides a framework for the development and use of fluid-thermodynamic models, including SAFT, cubic, activity, multi-parameter, and COSMO-SAC.
I think I am having a senior moment, but I am confused by how volume translation is applied in Clapeyron.jl for cubics. My initial idea is that we still have a highest-level function called a_res(T,V,n) (or alphar(T, rho, molefracs) in the case of teqp), and the volume translation happens in there, and only there. The input density (or volume) is the real density without shifting, and then the translation will shift the density in that function. My confusion stems from the fact that the repulsive part uses the unshifted density, but applies the shift inside the function itself:
I think I am having a senior moment, but I am confused by how volume translation is applied in Clapeyron.jl for cubics. My initial idea is that we still have a highest-level function called
a_res(T,V,n)
(oralphar(T, rho, molefracs)
in the case of teqp), and the volume translation happens in there, and only there. The input density (or volume) is the real density without shifting, and then the translation will shift the density in that function. My confusion stems from the fact that the repulsive part uses the unshifted density, but applies the shift inside the function itself:https://github.com/ClapeyronThermo/Clapeyron.jl/blob/2de8ab7915dc63347dc547d5fa4c508e92968e6d/src/models/cubic/equations.jl#L105
whereas I would have expected that all parts would use the translated volume, something more like:
a₁ = -log1p(b̄ρt)
Or does the repulsive contribution still come out right?