def inCoolProp(self, name):
     from CoolProp.CoolProp import FluidsList
     #print FluidsList()
     result = name in FluidsList()
     if not result:
         try:
             CP.PropsU('Tmin', 'T', 0, 'P', 0, name, "SI")
             return True
         except ValueError as e:
             print(e)
             return False
예제 #2
0
def listFluids():
    return FluidsList()
예제 #3
0
def fluids():
    return FluidsList()
예제 #4
0
            numpy.mean((X_vap_STDV - X_vap_TTSE) / X_vap_STDV))
        print "Average factor liquid: " + str(
            numpy.mean(X_liq_STDV / X_liq_TTSE))
        print "Average factor vapour: " + str(
            numpy.mean(X_vap_STDV / X_vap_TTSE))
        #plt.plot(numpy.append(T_liq,T_vap),numpy.append(X_liq_STDV,X_vap_STDV),label=what+", standard")
        #plt.plot(numpy.append(T_liq,T_vap),numpy.append(X_liq_TTSE,X_vap_TTSE),label=what+", TTSE")
        ##plt.show(block=True)
        #plt.savefig("/home/jowr/tmp/viscosity/"+fluid+".png")
        #plt.clf()


#toTest  = ["L","V"]
toTest = "V"
#fluids = ["n-Pentane","R134a"]
fluids = FluidsList()
c_diff = 0
c_unit = 0
c_exce = 0

for fluid in fluids:
    try:
        compareProperty(fluid=fluid, what=toTest)
    except ValueError:
        c_exce += 1
        print "An exception occurred for " + toTest + " with " + fluid

print "Finished testing TTSE:"
print "Errors occurred in " + str(c_exce) + " out of " + str(
    len(fluids)) + " fluids"
print "and differences occurred in " + str(c_diff) + " fluids."