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

Incompressible entropy #413

Closed
jowr opened this issue Jan 20, 2015 · 1 comment
Closed

Incompressible entropy #413

jowr opened this issue Jan 20, 2015 · 1 comment
Assignees
Milestone

Comments

@jowr
Copy link
Member

jowr commented Jan 20, 2015

I must have broken the entropy function for incompressible fluids.

from __future__ import print_function, division
import numpy as np
from CoolProp.CoolProp import PropsSI
fluids = ['INCOMP::TX22','INCOMP::Water']
p = np.array([13961853.79075649, 15362882.97044676, 2438758.77856947])
T = np.array([     413.20095544,      408.06711477,     457.06607800])
for fluid in fluids:
    print(fluid)
    for _ in range(3):
        #print(PropsSI('S','T',T,'P',p,fluid))
        print("[",end="")
        for i in range(len(p)):
            print(PropsSI('S','T',T[i],'P',p[i],fluid),end=" ")
        print("]")
    print("")
INCOMP::TX22
[-4797.62947591 -15856.3798244 -37644.8817001 ]
[-82006.4531606 -170274.027194 -346480.176439 ]
[-699677.042638 -1405615.20615 -2817162.53435 ]

INCOMP::Water
[-22111.2063579 -69264.7382502 -162975.733605 ]
[-351813.118495 -728668.562524 -1481783.38215 ]
[-2989428.41559 -6003899.15672 -12032244.5705 ]
@jowr jowr self-assigned this Jan 20, 2015
@jowr jowr added this to the v5.0.7 milestone Jan 20, 2015
@jowr
Copy link
Member Author

jowr commented Jan 20, 2015

Looks like it works:

from __future__ import print_function, division
import numpy as np
from CoolProp.CoolProp import PropsSI
fluids = ['HEOS::Water','INCOMP::Water']
p = np.array([13961853.79075649, 15362882.97044676, 2438758.77856947])
T = np.array([     413.20095544,      408.06711477,     457.06607800])
for fluid in fluids:
    print(fluid)
    for out in ['H','S']:
        for _ in range(3):
            #print(PropsSI('S','T',T,'P',p,fluid))
            print("[",end="")
            for i in range(len(p)):
                print(PropsSI(out,'T',T[i],'P',p[i],fluid),end=" ")
            print("]")
    print("")
HEOS::Water
[598278.521655 577459.606388 781035.062803 ]
[598278.521655 577459.606388 781035.062803 ]
[598278.521655 577459.606388 781035.062803 ]
[1725.88039873 1671.53476145 2175.19280846 ]
[1725.88039873 1671.53476145 2175.19280846 ]
[1725.88039873 1671.53476145 2175.19280846 ]

INCOMP::Water
[517406.179903 496937.605375 695615.549984 ]
[517406.179903 496937.605375 695615.549984 ]
[517406.179903 496937.605375 695615.549984 ]
[24989.0668045 24935.8080746 25425.3590451 ]
[24989.0668045 24935.8080746 25425.3590451 ]
[24989.0668045 24935.8080746 25425.3590451 ]

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