LiBr LiBr-50% or how?

93 views
Skip to first unread message

Reiner Johannes Mayers

unread,
Sep 29, 2014, 4:48:20 AM9/29/14
to coolpro...@googlegroups.com
Hi Guys,

I tried to use the Lithium Bromide LiBr with coolprop to plot h-xi
diagramms.

I am not able to get any output other than errors. How do I access it? Do
you have any examples?

kind regards
Reiner

All other calls I tried fail as well ... but here an example :
Python 2.7.6

import CoolProp
import CoolProp.CoolProp as cp
print(CoolProp.__version__)
print(cp.Props('LiBr','Tmin'))

4.2.5
Traceback (most recent call last):
File "/home/mayers/ws_lokal/CoolProp/testcp.py", line 5, in <module>
print(cp.Props('LiBr','Tmin'))
File "CoolProp.pyx", line 229, in CoolProp.CoolProp.Props
(build/temp.linux-x86_64-3.4/pyrex/CoolProp/CoolProp.cpp:10953)
File "CoolProp.pyx", line 313, in CoolProp.CoolProp.Props
(build/temp.linux-x86_64-3.4/pyrex/CoolProp/CoolProp.cpp:10206)
File "CoolProp.pyx", line 219, in CoolProp.CoolProp.__Props_err1
(build/temp.linux-x86_64-3.4/pyrex/CoolProp/CoolProp.cpp:9651)
ValueError: CoolProp error: Fluid "LiBr" is an invalid fluid :: inputs
were :"LiBr","Tmin"

or as a mixture

ValueError: CoolProp error: Fluid "LiBr-50%" is an invalid fluid ::
inputs were :"LiBr-50%","Tmin"

print(cp.FluidsList()) has no LiBr either but it is in the documentation ...


Jorrit Wronski

unread,
Sep 29, 2014, 5:04:21 AM9/29/14
to coolpro...@googlegroups.com

Hi Reiner

Does this help you getting started?


from __future__ import print_function
import sys
import numpy as np
import CoolProp
import CoolProp.CoolProp as CP

print(CoolProp.__version__)
fluid = "LiBr"

if int(CoolProp.__version__[0])>4:
fluid = "INCOMP::{0}".format(fluid)

xmin = 0.0
xmax = 0.75

Tmin = CP.PropsSI("Tmin","T",0,"P",0,"{0}-{1}".format(fluid,xmin))
Tmax = CP.PropsSI("Tmax","T",0,"P",0,"{0}-{1}".format(fluid,xmin))

points = 5
T = np.linspace(Tmin+1 ,Tmax-1,points)
x = np.linspace(xmin+0.01,xmax-0.01,points)
P = 100e5

print("Enthalpy in kJ/kg for LiBr")
print("")
fmt = "{0:6.3f} "
for i in range(len(T)):
for j in range(len(x)):
print(fmt.format(T[i]), end="")
print(fmt.format(x[j]), end="")
print(fmt.format(CP.PropsSI("H","T",T[i],"P",P,"{0}-{1}".format(fluid,x[j]))))

sys.exit(0)



for me, it returns:


4.2.6
Enthalpy in kJ/kg for LiBr

274.000 0.010 11383.602
274.000 0.193 256.748
274.000 0.375 -544.775
274.000 0.557 28226.752
274.000 0.740 253879.704
330.250 0.010 244836.137
330.250 0.193 184172.901
330.250 0.375 140691.605
330.250 0.557 137941.618
330.250 0.740 252169.165
386.500 0.010 478674.465
386.500 0.193 369304.023
386.500 0.375 286614.109
386.500 0.557 255411.100
386.500 0.740 349259.996
442.750 0.010 718213.844
442.750 0.193 560199.562
442.750 0.375 436647.194
442.750 0.557 376464.382
442.750 0.740 438681.512
499.000 0.010 970418.926
499.000 0.193 762604.315
499.000 0.375 595026.548
499.000 0.557 501527.484
499.000 0.740 531815.407


Cheers,
Jorrit
--
Jorrit Wronski
DTU Mechanical Engineering

Technical University of Denmark
Department of Mechanical Engineering
Nils Koppels Allé
Building 403 Room 111
2800 Kgs. Lyngby

phone: +45 45 25 41 83
email: jo...@mek.dtu.dk
http://www.mek.dtu.dk/english/Sections/TES

Jorrit Wronski

unread,
Sep 29, 2014, 5:07:30 AM9/29/14
to coolpro...@googlegroups.com

Ups, I hope you notice the unit error... It is J/kg, of course.

I agree that the documentation for the incompressibles is rather poor.
This will change soon and I encourage you to have a look at:
http://www.coolprop.dreamhosters.com:8010/sphinx/fluid_properties/Incompressibles.html

For more information on waht is going to change in version 5.

Jorrit

Reiner Johannes Mayers

unread,
Sep 29, 2014, 5:31:42 AM9/29/14
to coolpro...@googlegroups.com
Hi Jorrit,

that will do for my purpose, great :)

Is there a way to do this for Ammonia-Water mixtures too 0-100%? Currently
I use my own VBA formulas in Excel for this. It is based on Formulations
by Tillner-Roth 1997 and an implementation of Dr. Conde-Petit from
Zurich 2004.

great many thanks
Reiner

Jorrit Wronski

unread,
Sep 29, 2014, 5:44:28 AM9/29/14
to coolpro...@googlegroups.com

Hi,

Ammonia-Water is only supported within a very narrow range:
Tmin: -100.00 C
Tmax: 30.00 C
xmin: 0.00
xmax: 0.30

It is not an EOS, but a fit for secondary liquid only systems from
Åke Melinder. Properties of Secondary Working Fluids for Indirect
Systems. IIF-IIR Publishing, 2010.

Jorrit
Reply all
Reply to author
Forward
0 new messages