Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cubic volume translation confusion #206

Closed
ianhbell opened this issue Sep 25, 2023 · 1 comment
Closed

Cubic volume translation confusion #206

ianhbell opened this issue Sep 25, 2023 · 1 comment

Comments

@ianhbell
Copy link
Contributor

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:

function a_res(model::ABCubicModel, V, T, z,_data = data(model,V,T,z))

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?

@ianhbell
Copy link
Contributor Author

Sorry, I worked out the math on my side, and they are equivalent. Please disregard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant