mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-09 14:08:08 -05:00
More safe whitespace changes
This commit is contained in:
1
Web/docker/.gitignore
vendored
Normal file
1
Web/docker/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
REFPROP_sources
|
||||
@@ -5,6 +5,7 @@ CPWeb - A collection of commonly used routines to produce CoolProp's online docu
|
||||
"""
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
|
||||
def get_version():
|
||||
return 5.0
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ def getErrors(p, h, out='D', Ref=''):
|
||||
return errorTTSE,errorBICUBIC
|
||||
|
||||
|
||||
|
||||
#['YlOrRd', 'PuBuGn', 'hot', 'cubehelix', 'gnuplot', 'gnuplot2']:
|
||||
for colourmap in ['jorrithelix']:
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ def getErrors(p, h, out='D', Ref=''):
|
||||
return errorTTSE,errorBICUBIC
|
||||
|
||||
|
||||
|
||||
#['YlOrRd', 'PuBuGn', 'hot', 'cubehelix', 'gnuplot', 'gnuplot2']:
|
||||
for colourmap in ['cubehelix']:
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ class SecCoolSolutionData(DigitalData):
|
||||
# data = f(xOld,tOld)
|
||||
# return data
|
||||
|
||||
|
||||
def fitFluid(self):
|
||||
|
||||
if self.Tbase==None:
|
||||
@@ -478,6 +479,7 @@ class SecCoolIceData(SecCoolSolutionData):
|
||||
# pass
|
||||
|
||||
# Redefine some functions to avoid data loss
|
||||
|
||||
def getFile(self, data):
|
||||
return os.path.join(os.path.dirname(__file__), 'data','SecCool','xTables', self.sFolder, self.sFile+"_"+data+".csv")
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from example_generator import *
|
||||
import shutil
|
||||
import codecs
|
||||
|
||||
|
||||
def tee_call(call, file, **kwargs):
|
||||
callee = subprocess.Popen(call,
|
||||
stdout = subprocess.PIPE,
|
||||
@@ -16,10 +17,12 @@ def tee_call(call, file, **kwargs):
|
||||
#if callee.poll() != 0:
|
||||
# raise ValueError('Return code is non-zero')
|
||||
|
||||
|
||||
def copyfiles(lang, ext):
|
||||
shutil.copy2(lang+'/Example.'+ext,'../../../Web/coolprop/wrappers/'+lang+'/Example.'+ext)
|
||||
shutil.copy2(lang+'/Example.out','../../../Web/coolprop/wrappers/'+lang+'/Example.out')
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
#C++
|
||||
|
||||
@@ -4,6 +4,7 @@ from example_generator import *
|
||||
import shutil
|
||||
import codecs
|
||||
|
||||
|
||||
def tee_call(call, file, **kwargs):
|
||||
callee = subprocess.Popen(call,
|
||||
stdout = subprocess.PIPE,
|
||||
@@ -16,10 +17,12 @@ def tee_call(call, file, **kwargs):
|
||||
#if callee.poll() != 0:
|
||||
# raise ValueError('Return code is non-zero')
|
||||
|
||||
|
||||
def copyfiles(lang, ext):
|
||||
shutil.copy2(lang+'/Example.'+ext,'../../../Web/coolprop/wrappers/'+lang+'/Example.'+ext)
|
||||
shutil.copy2(lang+'/Example.out','../../../Web/coolprop/wrappers/'+lang+'/Example.out')
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
#C++
|
||||
|
||||
@@ -6,6 +6,7 @@ try:
|
||||
except ImportError:
|
||||
from urllib import urlopen
|
||||
|
||||
|
||||
def get_milestones(milestone):
|
||||
fname = milestone+'-milestones.json'
|
||||
if not os.path.exists(fname):
|
||||
|
||||
@@ -9,7 +9,6 @@ except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
"""CoolProp AddIn for LibreOffice Calc.
|
||||
|
||||
@@ -20,7 +19,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
def __init__(self, ctx):
|
||||
self.ctx = ctx
|
||||
|
||||
|
||||
def PropsSI(self, output, name1, prop1, name2, prop2, fluid_name):
|
||||
"""Calculate fluid properties for a given state from SI inputs."""
|
||||
try:
|
||||
@@ -28,7 +26,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def Props1SI(self, fluid_name, output):
|
||||
"""Get trivial fluid properties (e.g. critical temperature)."""
|
||||
try:
|
||||
@@ -36,7 +33,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def PhaseSI(self, name1, prop1, name2, prop2, fluid_name):
|
||||
"""Return the phase of a given state from SI inputs"""
|
||||
try:
|
||||
@@ -44,7 +40,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def HAPropsSI(self, output, name1, prop1, name2, prop2, name3, prop3):
|
||||
"""Calculate properties of humid air from SI inputs."""
|
||||
try:
|
||||
@@ -52,7 +47,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def get_fluid_param_string(self, fluid_name, param_name):
|
||||
"""Get fluid parameter string from CoolProp."""
|
||||
try:
|
||||
@@ -60,7 +54,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def get_global_param_string(self, param_name, split=False):
|
||||
"""Get global parameter string from CoolProp.
|
||||
|
||||
@@ -78,7 +71,6 @@ class CoolPropCalcAddin(unohelper.Base, XCoolProp):
|
||||
return [[str(e)]]
|
||||
|
||||
|
||||
|
||||
g_ImplementationHelper = unohelper.ImplementationHelper()
|
||||
g_ImplementationHelper.addImplementation(CoolPropCalcAddin,
|
||||
"org.coolprop.wrappers.libreoffice.CalcAddIn",
|
||||
|
||||
@@ -66,12 +66,15 @@ def split_pair_xy(pair):
|
||||
else:
|
||||
raise ValueError(pair)
|
||||
|
||||
|
||||
DEBUG_LEVEL = 1
|
||||
|
||||
|
||||
def myprint(level,*args,**kwargs):
|
||||
if level > DEBUG_LEVEL:
|
||||
print(*args, **kwargs)
|
||||
|
||||
|
||||
class ConsistencyFigure(object):
|
||||
def __init__(self, fluid, figsize = (15, 23), backend = 'HEOS', additional_skips = [], mole_fractions = None, p_limits_1phase = None, T_limits_1phase = None, NT_1phase = 40, Np_1phase = 40, NT_2phase = 20, NQ_2phase = 20):
|
||||
|
||||
@@ -311,7 +314,6 @@ class ConsistencyAxis(object):
|
||||
xkey = getattr(CP, 'i' + xparam)
|
||||
ykey = getattr(CP, 'i' + yparam)
|
||||
|
||||
|
||||
data = []
|
||||
|
||||
if self.p_limits_1phase is not None:
|
||||
@@ -497,6 +499,7 @@ class ConsistencyAxis(object):
|
||||
|
||||
self.ax.text(x,y,'Not\nImplemented',ha='center',va ='center',bbox = dict(fc = 'white'))
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
PVT = PdfPages('Consistency.pdf')
|
||||
CP.CoolProp.set_debug_level(0)
|
||||
|
||||
Reference in New Issue
Block a user