Skip to content

T-s diagram for dry fluids #289

Closed
Closed
@Sush1090

Description

@Sush1090

Hello,
I am trying to check the T-s diagram for general "dry" fluids like toluene. I have the following code:

fluids = ["toluene"]
model = cPR(fluids)

crit_ = crit_pure(model)

p = collect(range(101325,crit_[2],100))
T0 = similar(p)
for i in eachindex(p)
    T0[i] = saturation_temperature(model,p[i])[1]
end
s_liq = entropy.(model,p,T0,phase=:liquid)
s_gas = entropy.(model,p,T0,phase=:gas)

scatter(s_liq,T0)
scatter!(s_gas,T0) 

I get the following graph:
image

The output seems incorrect as toluene is classified as a a dry fluid i.e. the slope of the red dots should always be positive. I have checked this with various cubic EoS but results are similar.

Is there something I am doing wrong with the code? Or this seems like a error in computing entropy for the :gas phase?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions