Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

'Air' fluid: weird results on an isentropic #233

Open
jjfPCSI1 opened this issue Aug 4, 2014 · 1 comment
Open

'Air' fluid: weird results on an isentropic #233

jjfPCSI1 opened this issue Aug 4, 2014 · 1 comment

Comments

@jjfPCSI1
Copy link

jjfPCSI1 commented Aug 4, 2014

Doing some calculation on a Diesel cycle with the 'Air' fluid, I found these weird results following an isentropic line in a Pressure-Density plot. Here is a minimal working example with CoolProp version 4.2.4 on either Python2.7 or Python3.3.

import numpy as np
import CoolProp.CoolProp as CP   # Les outils thermodynamiques
import matplotlib.pyplot as plt  # Les outils graphiques

fluid = 'Air'
T1 = 2173
P1 = 65e5
S1 = CP.PropsSI('S','P',P1,'T',T1,fluid)
P2 = 3.8e5
P_lin = np.linspace(P1,P2,1000)
D_lin = CP.PropsSI('D','P',P_lin,'S',S1,fluid)

plt.plot(D_lin,P_lin)

plt.savefig('MWE.png') 

mwe

The problem "disappear" if I only use 100 points for sampling, but I think there is an underlying bug worth signaling here.

Thanks for your work.

@ibell
Copy link
Owner

ibell commented Aug 4, 2014

Yeah sure seems like it. There's another bug with Air (
CoolProp/CoolProp#81) in the v5 in development,
so I'll try to get to them ASAP, but the 4.2.x branch is not under active
development.

On Mon, Aug 4, 2014 at 4:48 PM, jjfPCSI1 [email protected] wrote:

Doing some calculation on a Diesel cycle with the 'Air' fluid, I found
these weird results following an isentropic line in a Pressure-Density
plot. Here is a minimal working example with CoolProp version 4.2.4 on
either Python2.7 or Python3.3.

import numpy as np
import CoolProp.CoolProp as CP # Les outils thermodynamiques
import matplotlib.pyplot as plt # Les outils graphiques

fluid = 'Air'
T1 = 2173
P1 = 65e5
S1 = CP.PropsSI('S','P',P1,'T',T1,fluid)
P2 = 3.8e5
P_lin = np.linspace(P1,P2,1000)
D_lin = CP.PropsSI('D','P',P_lin,'S',S1,fluid)

plt.plot(D_lin,P_lin)

plt.savefig('MWE.png')

[image: mwe]
https://cloud.githubusercontent.com/assets/8352625/3798565/1d6d4976-1be6-11e4-818c-b1b819332ff8.png

The problem "disappear" if I only use 100 points for sampling, but I think
there is an underlying bug worth signaling here.

Thanks for your work.


Reply to this email directly or view it on GitHub
#233.

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

No branches or pull requests

2 participants