├── CoolPropLogo.ico ├── README.md ├── co2-abb-5.png ├── cpgui.dat ├── cpgui.py ├── cpgui_32.nsi ├── cpgui_64.nsi ├── cpgui_all.py ├── cpgui_basics.py ├── cpgui_cycle1.py ├── cpgui_cycle2.py ├── cpgui_cycle3.py ├── cpgui_diagram.py ├── cpgui_sattable.py ├── cpgui_settings.py ├── cpgui_statepoint.py ├── create_EXE.py ├── cycle2.png ├── howto.txt ├── license.txt ├── locale ├── de │ └── LC_MESSAGES │ │ ├── cpgDiagram.mo │ │ ├── cpgDiagram.pot │ │ ├── cpgSatTable.mo │ │ ├── cpgSatTable.pot │ │ ├── cpgStatePoint.mo │ │ ├── cpgStatePoint.pot │ │ ├── cpg_cycle1.mo │ │ ├── cpg_cycle1.pot │ │ ├── cpg_cycle2.mo │ │ ├── cpg_cycle2.pot │ │ ├── cpg_cycle3.mo │ │ ├── cpg_cycle3.pot │ │ ├── cpgbasics.mo │ │ ├── cpgbasics.pot │ │ ├── cpgui.mo │ │ ├── cpgui.pot │ │ ├── cpgui_all.mo │ │ └── cpgui_all.pot ├── en │ └── LC_MESSAGES │ │ ├── cpgDiagram.mo │ │ ├── cpgDiagram.pot │ │ ├── cpgSatTable.mo │ │ ├── cpgSatTable.pot │ │ ├── cpgStatePoint.mo │ │ ├── cpgStatePoint.pot │ │ ├── cpg_cycle1.mo │ │ ├── cpg_cycle1.pot │ │ ├── cpg_cycle2.mo │ │ ├── cpg_cycle2.pot │ │ ├── cpg_cycle3.mo │ │ ├── cpg_cycle3.pot │ │ ├── cpgbasics.mo │ │ ├── cpgbasics.pot │ │ ├── cpgui.mo │ │ ├── cpgui.pot │ │ ├── cpgui_all.mo │ │ └── cpgui_all.pot └── fr │ └── LC_MESSAGES │ ├── cpgDiagram.mo │ ├── cpgDiagram.pot │ ├── cpgSatTable.mo │ ├── cpgSatTable.pot │ ├── cpgStatePoint.mo │ ├── cpgStatePoint.pot │ ├── cpg_cycle1.mo │ ├── cpg_cycle1.pot │ ├── cpg_cycle2.mo │ ├── cpg_cycle2.pot │ ├── cpgbasics.mo │ ├── cpgbasics.pot │ ├── cpgui.mo │ ├── cpgui.pot │ ├── cpgui_all.mo │ └── cpgui_all.pot ├── requirements.txt └── simplecycle.png /CoolPropLogo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/CoolPropLogo.ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GUI 2 | 3 | A python3 tkinter ttk based graphical user interface for CoolProp 4 | 5 | Any help on development is welcome 6 | 7 | The GUI requires CoolProp >5, matplotlib, numpy, scipy and Pillow to work 8 | see requirements.txt taken from my Python 3.4 64 bit Windows install 9 | 10 | for me it works on Ubuntu 14.04, Windows 7,8,8.1 and OS X (ugly on OS X) 11 | 12 | To compile a .exe cx_freeze is required too, a build file 'create_EXE.py' is 13 | provided for Windows. add 'build' as parameter to run the create_EXE.py 14 | With Ubuntu just run freeze on the cpgui.py 15 | 16 | To create an installable package nsis and the HM nsis editor on windows work nicely 17 | 18 | General features : 19 | - usage of Coolprop and Refprop fluids and mixtures 20 | - different input and output units 21 | - english and german version 22 | - mixture setup by mass fractions 23 | - calculate state points 24 | - calculate simple saturation tables 25 | - calculate a simple refrigeration cycle and cycle with internal hx 26 | - rudymentary plots 27 | - simple extensibility, anyone who knows Python 3, tkinter and thermodanamics can extend the GUI 28 | - reduced complexity of GUI functions with input form generator using a data structure 29 | 30 | Issues : 31 | - still many 32 | - No plots for mixtures 33 | - Many issues with mixtures and plots 34 | - no scaling of entropy and enthalpy yet (reference of state) 35 | 36 | Next steps : 37 | - add scaling for reference of state for entropy and enthalpy (IIR, ASHRAE, NBP ... ) 38 | - add help system 39 | 40 | 41 | # Installation with conda 42 | 43 | Please be aware that in some conda packages like pillow and matplotlib the tkinter support is broken. 44 | These packages must be installed from another source to make tk/tkinter work. 45 | 46 | If you use the conda package manager for Python, you might these commands 47 | useful. This is what I tried on a 32-bit Debian Linux machine: 48 | 49 | - conda create -n py3k python=3 Cython numpy scipy six pip 50 | - source activate py3k 51 | - pip install pillow matplotlib 52 | - pip install coolprop 53 | - python cpgui.py 54 | 55 | ... and you should be up and running 56 | 57 | On Windows this will do (example) : 58 | 59 | conda create -n cpgui33 python=3.3 60 | 61 | activate cpgui33 62 | 63 | conda install -n cpgui33 scipy 64 | 65 | pip install --find-links http://www.lfd.uci.edu/~gohlke/pythonlibs/ -U --force-reinstall pillow matplotlib 66 | 67 | pip install CoolProp 68 | 69 | python cpgui.py 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /co2-abb-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/co2-abb-5.png -------------------------------------------------------------------------------- /cpgui.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/cpgui.dat -------------------------------------------------------------------------------- /cpgui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | import gettext 5 | import numpy as np 6 | np.seterr(divide='ignore', invalid='ignore') 7 | # 8 | if sys.version_info[0] < 3: 9 | pass 10 | else : 11 | import tkinter 12 | from tkinter import filedialog, simpledialog 13 | from tkinter import messagebox 14 | from tkinter import * 15 | from tkinter import ttk 16 | import CoolProp 17 | from cpgui_all import * 18 | from cpgui_settings import cpg_settings 19 | from cpgui_basics import cpgbasics 20 | from cpgui_statepoint import cpgStatepoint 21 | from cpgui_diagram import cpgDiagram 22 | from cpgui_sattable import cpgSatTable 23 | from cpgui_cycle1 import cpg_cycle1 24 | from cpgui_cycle2 import cpg_cycle2 25 | from cpgui_cycle3 import cpg_cycle3 26 | 27 | class CPGUI(Frame): 28 | 29 | def leave(self): 30 | self.master.destroy() 31 | self.master.quit() 32 | 33 | def __init__(self,master=None): 34 | Frame.__init__(self,master) 35 | # Create Canvas and frame using all the canvas 36 | self.canvas = Canvas(master, borderwidth=0, background="#ffffff") 37 | self.frame = Frame(self.canvas, background="#ffffff") 38 | # Create the scrollbars 39 | self.vsb = Scrollbar(master, orient="vertical", command=self.canvas.yview) 40 | self.hsb = Scrollbar(master, orient="horizontal", command=self.canvas.xview) 41 | # Always adjust length of the scrollbars 42 | self.canvas.configure(yscrollcommand=self.vsb.set) 43 | self.canvas.configure(xscrollcommand=self.hsb.set) 44 | # pack them into their corners 45 | self.vsb.pack(side="right", fill="y") 46 | self.hsb.pack(side="bottom", fill="x") 47 | # pack canvas into window and create it 48 | self.canvas.pack(side="left", fill="both", expand=True) 49 | self.canvas.create_window((4,4), window=self.frame, anchor="nw",tags="self.frame") 50 | # Changing size will call method 51 | self.frame.bind("", self.OnFrameConfigure) 52 | # 53 | self.initcomplete=False 54 | self.ref=' ' 55 | self.tkref=StringVar() 56 | self.master=master 57 | 58 | self.set_ref('R134a') 59 | 60 | self.Tmin=273.15 61 | self.Tcrit=273.15 62 | 63 | self.frameborder=5 64 | 65 | self.master.geometry('1000x800') 66 | self.master.title('Coolprop GUI') 67 | # 68 | self.language=cpgui_language 69 | # 70 | localedir=find_data_file('locale') 71 | self.lang = gettext.translation('cpgui', localedir=localedir, languages=[self.language],fallback=False) 72 | self.lang.install() 73 | # 74 | #self.grid() 75 | #self.master.columnconfigure(0, weight=1) 76 | # 77 | # Menu 78 | # 79 | self.menu = Menu(tearoff=False) 80 | self.master.config(menu = self.menu) 81 | # File menu 82 | filemenu = self.file_menu = None 83 | filemenu = Menu(self.menu, tearoff=False) 84 | self.menu.add_cascade(label=_('File'), menu = filemenu) 85 | filemenu.add_separator() 86 | filemenu.add_command(label=_('Quit'), command = self.leave) 87 | #Options menu 88 | setmenu = Menu(self.menu, tearoff=False) 89 | self.menu.add_cascade(label=_("Settings"), menu=setmenu) 90 | setmenu.add_separator() 91 | setmenu.add_command(label=_('English'), command = lambda: self.set_language('en') ) 92 | setmenu.add_command(label=_('German'), command = lambda: self.set_language('de') ) 93 | 94 | #Help menu 95 | helpmenu = Menu(self.menu, tearoff=False) 96 | self.menu.add_cascade(label=_("Help"), menu=helpmenu) 97 | helpmenu.add_command(label=_('About...'), command = self.about ) 98 | 99 | self.NotebookFrame=Frame(self.frame) 100 | self.TitleFrame=Frame(self.frame) 101 | #self.NotebookFrame.grid(row=1, column=0, columnspan=20,rowspan=20,sticky=W+E) 102 | #self.TitleFrame.grid(row=0, column=0, columnspan=20,sticky=W+E) 103 | self.TitleFrame.pack(side="top", fill="x", expand=True) 104 | self.NotebookFrame.pack(side="bottom", fill="both", expand=True) 105 | self.TitleLabel = Label(self.TitleFrame,textvariable=self.tkref,font=("Arial", 8) ) 106 | self.TitleLabel.grid(row=0,column=0,padx=8,columnspan=5,sticky=W,pady=5) 107 | 108 | self.notebook = ttk.Notebook(self.NotebookFrame) 109 | self.notebook.pack(fill = 'both', expand = 1, padx = 5, pady = 5) 110 | # 111 | self.debugframe = ttk.Frame(self.NotebookFrame) 112 | self.dialogframe0 = ttk.Frame(self.NotebookFrame) 113 | self.dialogframe1 = ttk.Frame(self.NotebookFrame) 114 | self.dialogframe2 = ttk.Frame(self.NotebookFrame) 115 | self.dialogframe3 = ttk.Frame(self.NotebookFrame) 116 | self.dialogframe4 = ttk.Frame(self.NotebookFrame) 117 | self.dialogframe5 = ttk.Frame(self.NotebookFrame) 118 | self.dialogframe6 = ttk.Frame(self.NotebookFrame) 119 | self.dialogframe7 = ttk.Frame(self.NotebookFrame) 120 | # 121 | self.nbdbg_text=_('Messages') 122 | self.nb0_text=_('Settings') 123 | self.nb1_text=_('Select fluid') 124 | self.nb2_text=_('State Point') 125 | self.nb3_text=_('Saturation table') 126 | self.nb4_text=_('Diagrams') 127 | self.nb5_text=_('SimpleCycle') 128 | self.nb6_text=_('Cycle with heat exchanger') 129 | self.nb7_text=_('CO2 Cycle 2 ') 130 | # 131 | if cpgui_config['debug']['ShowPanel'] : 132 | self.notebook.add(self.debugframe,text=self.nbdbg_text) 133 | # Debug box 134 | scrollbar_dbg = Scrollbar(self.debugframe, orient=VERTICAL) 135 | self.dbg_box = Text(self.debugframe, yscrollcommand=scrollbar_dbg.set) 136 | scrollbar_dbg.config(command=self.dbg_box.yview) 137 | scrollbar_dbg.pack(side=RIGHT, fill=Y) 138 | self.dbg_box.pack(side=LEFT, fill=BOTH, expand=1) 139 | mydebug = RedirectText(self.dbg_box) 140 | sys.stdout = mydebug 141 | sys.stderr = mydebug 142 | 143 | self.notebook.add(self.dialogframe0,text=self.nb0_text) 144 | self.cpgsettings=cpg_settings(self.dialogframe0,self) 145 | 146 | self.notebook.add(self.dialogframe1,text=self.nb1_text) 147 | self.cpgbasics1=cpgbasics(self.dialogframe1,self) 148 | 149 | self.notebook.add(self.dialogframe2,text=self.nb2_text) 150 | self.cpgstatepoint1=cpgStatepoint(self.dialogframe2,self) 151 | 152 | self.notebook.add(self.dialogframe3,text=self.nb3_text) 153 | self.cpgtable1=cpgSatTable(self.dialogframe3,self) 154 | 155 | #self.notebook.add(self.dialogframe4,text=self.nb4_text) 156 | #self.cpgDiagram1=cpgDiagram(self.dialogframe4,self) 157 | 158 | self.notebook.add(self.dialogframe5,text=self.nb5_text) 159 | self.cpgNewClass=cpg_cycle1(self.dialogframe5,self) 160 | 161 | self.notebook.add(self.dialogframe6,text=self.nb6_text) 162 | self.cpgNewClass=cpg_cycle2(self.dialogframe6,self) 163 | 164 | self.notebook.add(self.dialogframe7,text=self.nb7_text) 165 | self.cpgNewClass=cpg_cycle3(self.dialogframe7,self) 166 | 167 | ''' 168 | How to add a tab : 169 | Copy a class file like cpgui_SatTable.py to a new name 170 | Create your class and actions in there 171 | The Update method can be called on selection of the tab, see tabChangedEvent below 172 | Create translation .pot file e.g. python \Py34_64\Tools\i18n\pygettext.py -d de -o cpgSatTable.pot cpgui_sattable.py 173 | ''' 174 | if cpgui_config['debug']['ShowPanel'] : 175 | self.notebook.select(2) 176 | else : 177 | self.notebook.select(1) 178 | self.notebook.bind_all("<>", self.tabChangedEvent) 179 | self.initcomplete=True 180 | 181 | def OnFrameConfigure(self, event): 182 | '''Reset the scroll region to encompass the inner frame''' 183 | self.canvas.configure(scrollregion=self.canvas.bbox("all")) 184 | 185 | def about(self): 186 | messagebox.showinfo(_("About"), "Coolprop GUI 0.3 (c) Reiner J. Mayers 2015") 187 | 188 | def set_ref(self,ref): 189 | self.ref=ref 190 | self.tkref.set(ref) 191 | 192 | def get_ref(self): 193 | return self.ref 194 | 195 | def get_language(self): 196 | return self.language 197 | 198 | def set_language(self,lang): 199 | if self.initcomplete : 200 | cpgui_config['cpgui']['language'] = lang 201 | save_settings() 202 | 203 | def bindConfigure(self, event): 204 | if not self.initComplete: 205 | self.master.bind("", self.Master_Configure) 206 | self.initComplete = 1 207 | 208 | def Master_Configure(self, event): 209 | pass 210 | if event.widget != self.master: 211 | if self.w != -1: 212 | return 213 | x = int(self.master.winfo_x()) 214 | y = int(self.master.winfo_y()) 215 | w = int(self.master.winfo_width()) 216 | h = int(self.master.winfo_height()) 217 | if (self.x, self.y, self.w, self.h) == (-1,-1,-1,-1): 218 | self.x, self.y, self.w, self.h = x,y,w,h 219 | 220 | if self.w!=w or self.h!=h: 221 | print("Master reconfigured... make resize adjustments") 222 | self.w=w 223 | self.h=h 224 | 225 | def apply(self): 226 | pass #print 'apply called' 227 | 228 | def tabChangedEvent(self,event): 229 | updatebook=event.widget.tab(event.widget.index("current"),"text") 230 | if updatebook ==self.nb3_text: 231 | self.cpgtable1.Update() 232 | 233 | if __name__ == '__main__': 234 | if sys.version_info[0] < 3: 235 | import Tkinter 236 | from Tkinter import * 237 | print("Coolprop GUI requires Python 3 or later!") 238 | top = Tkinter.Tk() 239 | AlarmLabel = Label(top,text="Coolprop GUI requires Python 3 or later!",font=("Arial",22) ) 240 | AlarmLabel.grid(row=1,column=0,padx=8,columnspan=5,sticky=W,pady=5) 241 | top.mainloop() 242 | else : 243 | root =Tk() 244 | # cx_freeze needs find file 245 | cpgui_icon=find_data_file('CoolPropLogo.ico') 246 | try : 247 | root.call('wm', 'iconbitmap', root._w, '-default', cpgui_icon) 248 | except tkinter.TclError : 249 | pass 250 | # On Ubuntu we ignore the .ico file for now 251 | mygui=CPGUI(master=root) 252 | mygui.mainloop() 253 | 254 | 255 | -------------------------------------------------------------------------------- /cpgui_32.nsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/cpgui_32.nsi -------------------------------------------------------------------------------- /cpgui_64.nsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/cpgui_64.nsi -------------------------------------------------------------------------------- /cpgui_all.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | import os 5 | import pickle 6 | import json 7 | import gettext 8 | # 9 | from tkinter import * 10 | from tkinter import ttk 11 | from tkinter.simpledialog import Dialog 12 | from tkinter import messagebox 13 | # 14 | from platform import system 15 | from os import walk,path 16 | from CoolProp.CoolProp import PropsSI 17 | 18 | 19 | def find_data_file(filename): 20 | if getattr(sys, 'frozen', False): 21 | # The application is frozen 22 | datadir = os.path.dirname(sys.executable) 23 | else: 24 | # The application is not frozen 25 | # Change this bit to match where you store your data files: 26 | datadir = os.path.dirname(__file__) 27 | return os.path.join(datadir, filename) 28 | 29 | gui_unit={} 30 | cpgui_config={} 31 | # 32 | myfile=find_data_file('cpgui.dat') 33 | try: 34 | settingsfile = open(myfile) 35 | except FileNotFoundError: 36 | print('cpgui.dat not found! ... creating file') 37 | cpgui_config['cpgui']={} 38 | cpgui_config['cpgui']['language'] = 'en' 39 | cpgui_config['units']={} 40 | cpgui_config['units']['T'] ='°C' 41 | cpgui_config['units']['dT'] ='K' 42 | cpgui_config['units']['p'] ='bar' 43 | cpgui_config['units']['D'] ='kg/m³' 44 | cpgui_config['units']['v'] ='m³/kg' 45 | cpgui_config['units']['H'] ='kJ/kg' 46 | cpgui_config['units']['S'] ='kJ/kg/K' 47 | cpgui_config['units']['Q'] ='kg/kg' 48 | cpgui_config['units']['P'] ='kW' 49 | cpgui_config['units']['U'] ='kJ' 50 | cpgui_config['units']['V'] ='m/s' 51 | cpgui_config['units']['dv'] ='µPa s' 52 | cpgui_config['units']['kv'] ='m²/s' 53 | cpgui_config['units']['Cp'] ='kJ/kg/K' 54 | cpgui_config['units']['Cv'] ='kJ/kg/K' 55 | cpgui_config['units']['M'] ='kg/kmol' 56 | cpgui_config['units']['c'] ='m/s' 57 | cpgui_config['units']['kxa']='W/K' 58 | cpgui_config['units']['eta']='1' 59 | cpgui_config['debug']={} 60 | cpgui_config['debug']['ShowPanel'] = True 61 | # 62 | with open(myfile, 'wb') as datafile: 63 | pickle.dump(cpgui_config,datafile) 64 | # We must have a configfile here! 65 | with open(myfile, 'rb') as configfile: 66 | cpgui_config = pickle.load(configfile) 67 | # Now set language 68 | cpgui_language=cpgui_config['cpgui']['language'] 69 | localedir=find_data_file('locale') 70 | cpgui_lang = gettext.translation('cpgui_all', localedir=localedir, languages=[cpgui_language],fallback=False) 71 | cpgui_lang.install() 72 | 73 | # Now read units into gui_unit 74 | for quant in cpgui_config['units'].keys(): 75 | gui_unit[quant]=cpgui_config['units'][quant] 76 | #print('Gui Unit for {} set to {} .'.format(quant,gui_unit[quant])) 77 | 78 | class myDialog(Dialog): 79 | # use dialogOptions dictionary to set any values in the dialog 80 | def __init__(self, parent, title = None,dialogOptions = None): 81 | self.initComplete = 0 82 | self.dialogOptions = dialogOptions 83 | Dialog.__init__(self, parent, 'Coolprop GUI') 84 | self.master = parent 85 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 86 | #self.master.bind('', self.bindConfigure) 87 | 88 | def refprop_mixname(reflist,masslist): 89 | ''' 90 | Creates a refprop mixture string from names and mass fractions 91 | e.G. 92 | reflist = list of refrigerants in a mixture 93 | masslist = massfraction in kg/kg 94 | ''' 95 | # Calculate total 96 | molelist=[] 97 | molefrac=[] 98 | namelist=[] 99 | denominator=0 100 | # Get moles and calculate denominator 101 | for index in range(len(reflist)): 102 | m=PropsSI("M",reflist[index]) 103 | molelist.append(m) 104 | namelist.append(reflist[index].split(':')[-1]) 105 | denominator+=(masslist[index]/molelist[index]) 106 | # Denominator is calculated, now molefractions 107 | for index in range(len(reflist)): 108 | # 109 | mol=(masslist[index]/molelist[index])/denominator 110 | molefrac.append(mol) 111 | # now create string from data 112 | refpropstring='REFPROP::' 113 | add_ampersand=False 114 | # 115 | for index in range(len(namelist)): 116 | if add_ampersand : 117 | refpropstring+='&'+namelist[index]+'[%0.16f]'%molefrac[index] 118 | else : 119 | refpropstring+=namelist[index]+'[%0.16f]'%molefrac[index] 120 | add_ampersand=True 121 | # 122 | return refpropstring,molefrac 123 | 124 | def get_refprop_fluids(): 125 | # 126 | mysys=system() 127 | if mysys=='Linux' or mysys=='Darwin': 128 | if path.isdir('/opt/refprop') : 129 | rpfluids1 = next(walk('/opt/refprop/fluids'))[2] 130 | rpfluids1.sort() 131 | rpfluids=[] 132 | for fluid in rpfluids1 : 133 | rpfluids.append((fluid.split('.')[0])) 134 | rpmixtures1 = next(walk('/opt/refprop/mixtures'))[2] 135 | rpmixtures1.sort() 136 | rpmixtures=[] 137 | for mixture in rpmixtures1 : 138 | rpfluids.append((mixture)) 139 | else : 140 | rpfluids=['Refprop not found'] 141 | return rpfluids 142 | # 143 | elif mysys=='Windows': 144 | if path.isdir('C:\\Program Files (x86)\\Refprop') : 145 | rpfluids1 = next(walk('C:\\Program Files (x86)\\Refprop\\fluids'))[2] 146 | rpfluids1.sort() 147 | rpfluids=[] 148 | for fluid in rpfluids1 : 149 | rpfluids.append((fluid.split('.')[0])) 150 | rpmixtures1 = next(walk('C:\\Program Files (x86)\\Refprop\\mixtures'))[2] 151 | rpmixtures1.sort() 152 | rpmixtures=[] 153 | for mixture in rpmixtures1 : 154 | rpfluids.append((mixture)) 155 | return rpfluids 156 | else : 157 | rpfluids=['No Refprop'] 158 | return rpfluids 159 | #return ['R134a'] 160 | 161 | # Units, SI unit must be first in list 162 | units={} 163 | units['T'] =['K','°C'] 164 | units['dT'] =['K'] 165 | units['p'] =['Pa','kPa','bar'] 166 | units['D'] =['kg/m³','kg/dm³'] 167 | units['v'] =['m³/kg'] 168 | units['H'] =['J/kg','kJ/kg'] 169 | units['S'] =['J/kg/K','kJ/kg/K'] 170 | units['Q'] =['kg/kg'] 171 | units['P'] =['kW','W'] 172 | units['U'] =['J','kJ'] 173 | units['V'] =['m/s'] 174 | units['dv'] =['Pa s','mPa s','µPa s'] 175 | units['kv'] =['m²/s'] 176 | units['Cp'] =['J/kg/K','kJ/kg/K'] 177 | units['Cv'] =['J/kg/K','kJ/kg/K'] 178 | units['M'] =['kg/mol','kg/kmol'] 179 | units['c'] =['m/s'] 180 | # now the wired stuff 181 | units['kxa'] =['W/K'] 182 | units['eta'] =['1'] 183 | # we have to convert all those units to SI 184 | tosi = { 185 | 'K' : lambda x: x, 186 | '°C' : lambda x: x +273.15, 187 | 'bar' : lambda x: x * 100000.0, 188 | 'Pa' : lambda x: x, 189 | 'kPa' : lambda x: x*1000.0, 190 | 'kg/m³' : lambda x: x, 191 | 'kg/dm³' : lambda x: x*1000.0, 192 | 'm³/kg' : lambda x: x, 193 | 'J/kg' : lambda x: x, 194 | 'kJ/kg' : lambda x: x/1000.0, 195 | 'J/kg/K' : lambda x: x, 196 | 'kJ/kg/K' : lambda x: x*1000.0, 197 | 'kg/kg' : lambda x: x, 198 | 'kW' : lambda x: x*1000.0, 199 | 'W' : lambda x: x, 200 | 'J' : lambda x: x, 201 | 'kJ' : lambda x: x*1000.0, 202 | 'm/s' : lambda x: x, 203 | 'Pa s' : lambda x: x, 204 | 'mPa s' : lambda x: x/1000.0, 205 | 'µPa s' : lambda x: x/1000000.0, 206 | 'm²/s' : lambda x: x, 207 | 'kg/mol' : lambda x: x, 208 | 'kg/kmol' : lambda x: x/1000, 209 | 'W/K' : lambda x: x, 210 | '1' : lambda x: x, 211 | } 212 | # and from SI 213 | sito = { 214 | 'K' : lambda x: x, 215 | '°C' : lambda x: x -273.15, 216 | 'bar' : lambda x: x / 100000.0, 217 | 'Pa' : lambda x: x, 218 | 'kPa' : lambda x: x/1000.0, 219 | 'kg/m³' : lambda x: x, 220 | 'kg/dm³' : lambda x: x/1000.0, 221 | 'm³/kg' : lambda x: x, 222 | 'J/kg' : lambda x: x, 223 | 'kJ/kg' : lambda x: x/1000.0, 224 | 'J/kg/K' : lambda x: x, 225 | 'kJ/kg/K' : lambda x: x/1000.0, 226 | 'kg/kg' : lambda x: x, 227 | 'kW' : lambda x: x/1000.0, 228 | 'W' : lambda x: x, 229 | 'J' : lambda x: x, 230 | 'kJ' : lambda x: x/1000.0, 231 | 'm/s' : lambda x: x, 232 | 'Pa s' : lambda x: x, 233 | 'mPa s' : lambda x: x*1000.0, 234 | 'µPa s' : lambda x: x*1000000.0, 235 | 'm²/s' : lambda x: x, 236 | 'kg/mol' : lambda x: x, 237 | 'kg/kmol' : lambda x: x*1000, 238 | 'W/K' : lambda x: x, 239 | '1' : lambda x: x, 240 | } 241 | # default Values for forms as string 242 | default = { 243 | 'K' : '273.15', 244 | '°C' : '0', 245 | 'bar' : '1.01325', 246 | 'Pa' : '101325', 247 | 'kPa' : '101.325', 248 | 'kg/m³' : '1000.0', 249 | 'kg/dm³' : '1.0', 250 | 'm³/kg' : '0.001', 251 | 'J/kg' : '200000.0', 252 | 'kJ/kg' : '200.0', 253 | 'J/kg/K' : '1000.0', 254 | 'kJ/kg/K' : '1.0', 255 | 'kg/kg' : '1.0', 256 | 'kW' : '1.0', 257 | 'W' : '1000.0', 258 | 'J' : '1000.0', 259 | 'kJ' : '1.0', 260 | 'm/s' : '1.0', 261 | 'Pa s' : '1000000.0', 262 | 'mPa s' : '1000.0', 263 | 'µPa s' : '1.0', 264 | 'm²/s' : '1.0', 265 | 'kg/mol' : '0.1', 266 | 'kg/kmol' : '100.0', 267 | '1' : '0.6', 268 | 'W/K' : '23', 269 | } 270 | label={} 271 | label['T'] = _('Temperature') 272 | label['dT'] = _('Temperature difference') 273 | label['p'] = _('Pressure') 274 | label['D'] = _('Density') 275 | label['v'] = _('Specific Volume') 276 | label['H'] = _('Specific Enthalpy') 277 | label['S'] = _('Specific Entropy') 278 | label['Q'] = _('Quality') 279 | label['P'] = _('Power') 280 | label['U'] = _('Internal Energy') 281 | label['V'] = _('Speed') 282 | label['dv'] = _('Dynamic Viscosity') 283 | label['kv'] = _('Kinematic Viscosity') 284 | label['Cp'] = _('Isobaric heat Capacity') 285 | label['Cv'] = _('Iscochoric heat Capacity') 286 | label['M'] = _('Molar mass') 287 | label['c'] = _('Speed of sound') 288 | label['kxa'] = _('Heat transfer k x A') 289 | label['eta'] = _('Efficiency') 290 | # 291 | cpcode={} 292 | cpcode['T'] = 'T' 293 | cpcode['p'] = 'P' 294 | cpcode['D'] = 'D' 295 | cpcode['H'] = 'H' 296 | cpcode['S'] = 'S' 297 | cpcode['Q'] = 'Q' 298 | cpcode['U'] = 'U' 299 | cpcode['dv'] = 'V' 300 | cpcode['Cp'] = 'C' 301 | cpcode['Cv'] = 'CVMASS' 302 | cpcode['M'] = 'M' 303 | cpcode['c'] = 'A' 304 | # 305 | def german_units(): 306 | if 'units' in cpgui_config.sections() : 307 | pass 308 | else : 309 | cpgui_config.add_section('units') 310 | # 311 | cpgui_config['cpgui']={} 312 | cpgui_config['cpgui']['language'] = 'de' 313 | cpgui_config['units']={} 314 | cpgui_config['units']['T'] ='°C' 315 | cpgui_config['units']['dT'] ='K' 316 | cpgui_config['units']['p'] ='bar' 317 | cpgui_config['units']['D'] ='kg/m³' 318 | cpgui_config['units']['v'] ='m³/kg' 319 | cpgui_config['units']['H'] ='kJ/kg' 320 | cpgui_config['units']['S'] ='kJ/kg/K' 321 | cpgui_config['units']['Q'] ='kg/kg' 322 | cpgui_config['units']['P'] ='kW' 323 | cpgui_config['units']['U'] ='kJ' 324 | cpgui_config['units']['V'] ='m/s' 325 | cpgui_config['units']['dv'] ='µPa s' 326 | cpgui_config['units']['kv'] ='m²/s' 327 | cpgui_config['units']['Cp'] ='kJ/kg/K' 328 | cpgui_config['units']['Cv'] ='kJ/kg/K' 329 | cpgui_config['units']['M'] ='kg/kmol' 330 | cpgui_config['units']['c'] ='m/s' 331 | cpgui_config['units']['kxa']='W/K' 332 | cpgui_config['units']['eta']='1' 333 | cpgui_config['debug']={} 334 | cpgui_config['debug']['ShowPanel'] = True 335 | with open(myfile, 'wb') as datafile: 336 | pickle.dump(cpgui_config,datafile) 337 | messagebox.showinfo( _('Units changed'), _('Units changed ! \nRestart GUI for Unit change to take effect!')) 338 | 339 | def si_units(): 340 | if 'units' in cpgui_config.sections() : 341 | pass 342 | else : 343 | cpgui_config.add_section('units') 344 | # 345 | cpgui_config['cpgui']={} 346 | cpgui_config['cpgui']['language'] = 'en' 347 | cpgui_config['units']={} 348 | cpgui_config['units']['T'] ='K' 349 | cpgui_config['units']['dT'] ='K' 350 | cpgui_config['units']['p'] ='Pa' 351 | cpgui_config['units']['D'] ='kg/m³' 352 | cpgui_config['units']['v'] ='m³/kg' 353 | cpgui_config['units']['H'] ='J/kg' 354 | cpgui_config['units']['S'] ='J/kg/K' 355 | cpgui_config['units']['Q'] ='kg/kg' 356 | cpgui_config['units']['P'] ='kW' 357 | cpgui_config['units']['U'] ='J' 358 | cpgui_config['units']['V'] ='m/s' 359 | cpgui_config['units']['dv'] ='Pa s' 360 | cpgui_config['units']['kv'] ='m²/s' 361 | cpgui_config['units']['Cp'] ='J/kg/K' 362 | cpgui_config['units']['Cv'] ='J/kg/K' 363 | cpgui_config['units']['M'] ='kg/kmol' 364 | cpgui_config['units']['c'] ='m/s' 365 | cpgui_config['units']['kxa']='W/K' 366 | cpgui_config['units']['eta']='1' 367 | cpgui_config['debug']={} 368 | cpgui_config['debug']['ShowPanel'] = True 369 | with open(myfile, 'wb') as datafile: 370 | pickle.dump(cpgui_config,datafile) 371 | messagebox.showinfo( _('Units changed'), _('Units changed ! \nRestart GUI for Unit change to take effect!')) 372 | 373 | def save_settings(): 374 | with open(myfile, 'wb') as datafile: 375 | pickle.dump(cpgui_config,datafile) 376 | messagebox.showinfo( _('Major settings changed'), _('Settings changed ! \nRestart GUI for change to take effect!')) 377 | 378 | def SI_UNIT(Quantity): 379 | return units[Quantity][0] 380 | 381 | def GUI_UNIT(Quantity): 382 | try : 383 | return gui_unit[Quantity] 384 | except KeyError : 385 | return ' ' 386 | 387 | def TO_SI(Quantity,Value): 388 | if Quantity in cpgui_config['units'] : 389 | localunit=gui_unit[Quantity] 390 | if localunit in tosi.keys(): 391 | #print('converting ',Value,GUI_UNIT(Quantity),' to ', tosi[localunit](Value) ,SI_UNIT(Quantity)) 392 | return tosi[localunit](Value) 393 | else: 394 | print('Error in tosi : No conversion for unit ',localunit,' defined') 395 | else : 396 | print('Error in get_SI : No unit for Quantity',Quantity,' defined') 397 | 398 | def SI_TO(Quantity,Value): 399 | if Quantity in cpgui_config['units'] : 400 | localunit=gui_unit[Quantity] 401 | if localunit in sito.keys(): 402 | #print('converting ',Value,SI_UNIT(Quantity),' to ', sito[localunit](Value) ,localunit) 403 | return sito[localunit](Value) 404 | else: 405 | print('Error in sito : No conversion for unit ',localunit,' defined') 406 | else : 407 | print('Error in get_SI : No unit for Quantity',Quantity,' defined') 408 | 409 | class RedirectText(): 410 | def __init__(self, text_ctrl): 411 | self.output = text_ctrl 412 | 413 | def write(self, string): 414 | self.output.insert(END, string) 415 | 416 | if __name__=='__main__': 417 | # 418 | print(refprop_mixname(['REFPROP::R134a','REFPROP::R1234ze'],[0.42,0.58])) 419 | print(refprop_mixname(['R125','R143a','R134a'],[0.44,0.52,0.04])) 420 | # 421 | #german_units() 422 | # 423 | print(type(tosi)) 424 | print(tosi['°C'](0)) 425 | print(sito['°C'](293.15)) 426 | print(TO_SI('T',0)) 427 | #print(SI_TO('H', 300000)) 428 | 429 | 430 | 431 | 432 | -------------------------------------------------------------------------------- /cpgui_basics.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | import gettext 5 | 6 | from tkinter import * 7 | from tkinter import ttk 8 | 9 | from cpgui_all import * 10 | 11 | import CoolProp 12 | from CoolProp.CoolProp import PropsSI,get_global_param_string 13 | 14 | from cpgui_all import myDialog,get_refprop_fluids,refprop_mixname 15 | 16 | class MyDialog(myDialog): 17 | 18 | def body(self, master): 19 | # 20 | Label(master, text=_("Enter Mass fraction of components in kg/kg ") ).grid(row=1,column=1,columnspan=2,sticky=NW) 21 | # 22 | mrow=2 23 | self.en=[] 24 | for ref in self.dialogOptions : 25 | dummy=Label(master, text=" %s "%ref ).grid(row=mrow,column=1) 26 | enx = Entry(master) 27 | enx.grid(row=mrow, column=2) 28 | self.en.append(enx) 29 | mrow+=1 30 | # 31 | return self.en[0] # initial focus 32 | 33 | def apply(self): 34 | mymasslist=[] 35 | for ent in range(len(self.dialogOptions)) : 36 | mymasslist.append(float(self.en[ent].get())) 37 | #print(' %s Mass : %4.3f '%(self.dialogOptions[ent],float(self.en[ent].get()))) 38 | self.mymasslist=mymasslist 39 | 40 | class cpgbasics(myDialog): 41 | 42 | def __init__(self, GridFrame,Caller, title = None, dialogOptions=None): 43 | # 44 | self.initcomplete=False 45 | # 46 | fluids=CoolProp.__fluids__ 47 | mixtures=get_global_param_string('predefined_mixtures').split(',') 48 | for mix in mixtures : 49 | fluids.append(mix) 50 | fluids.sort() 51 | self.Caller=Caller 52 | # by module translations 53 | self.language=cpgui_language 54 | localedir=find_data_file('locale') 55 | self.lang = gettext.translation('cpgbasics', localedir=localedir, languages=[self.language]) 56 | self.lang.install() 57 | # 58 | self.dialogframe1=GridFrame 59 | self.statetext="" 60 | self.tkref=StringVar() 61 | self.tkref.set(' ') 62 | self.frameborder=5 63 | self.mixnamelist=[] 64 | self.mixmasslist=[] 65 | self.mixmollist=[] 66 | # 67 | # 68 | # Beschriftungen 69 | # 70 | self.Label_1 = Label(self.dialogframe1,text=_('Refrigerant setup'),font=("Arial", 14) ) 71 | self.Label_1.grid(row=1,column=1,padx=8,columnspan=5,sticky=W,pady=5) 72 | 73 | self.Label_2 = Label(self.dialogframe1,text=_('Coolprop Refrigerant'),font=("Arial", 10) ) 74 | self.Label_2.grid(row=2,column=1,padx=8,sticky=W,columnspan=2) 75 | 76 | self.Label_3 = Label(self.dialogframe1,text=_('Chosen Refrigerant :'),font=("Arial", 10) ) 77 | self.Label_3.grid(row=4,column=1,padx=8,sticky=W,pady=4) 78 | 79 | self.Label_4 = Label(self.dialogframe1,text=_('Refprop Refrigerant'),font=("Arial", 10) ) 80 | self.Label_4.grid(row=2,column=2,padx=8,sticky=W,columnspan=2) 81 | 82 | self.reflabel = Label(self.dialogframe1,textvariable=self.tkref,font=("Arial", 10) ) 83 | self.reflabel.grid(row=4,column=2,padx=8,sticky=W,pady=4,columnspan=3) 84 | 85 | self.Label_5 = Label(self.dialogframe1,text=_('Use Refprop fluids for Refprop mixtures and Coolprop fluids for HEOS mixtures. Choose backend later'),font=("Arial", 12) ) 86 | self.Label_5.grid(row=5,column=1,padx=8,sticky=W,pady=4,columnspan=7) 87 | # 88 | # Coolprop Refrigerants 89 | # 90 | lbframe = Frame( self.dialogframe1 ) 91 | self.Listbox_1_frame = lbframe 92 | scrollbar = Scrollbar(lbframe, orient=VERTICAL) 93 | self.Listbox_1 = Listbox(lbframe, width="18", height="12", selectmode=BROWSE, yscrollcommand=scrollbar.set,font=("Arial", 10)) 94 | for item in sorted(fluids): 95 | self.Listbox_1.insert(END, item) 96 | scrollbar.config(command=self.Listbox_1.yview) 97 | scrollbar.pack(side=RIGHT, fill=Y) 98 | self.Listbox_1.pack(side=LEFT, fill=BOTH, expand=1) 99 | # 100 | self.Listbox_1_frame.grid(row=3,column=1,sticky=W,padx=5,pady=5, columnspan=1,rowspan=1) 101 | self.Listbox_1.bind("", self.Listbox_1_Click) 102 | # 103 | self.Listbox_1.select_set(13) 104 | # 105 | # 106 | # Refprop Refrigerants 107 | # 108 | lbframe2 = Frame( self.dialogframe1 ) 109 | self.Listbox_2_frame = lbframe2 110 | scrollbar2 = Scrollbar(lbframe2, orient=VERTICAL) 111 | self.Listbox_2 = Listbox(lbframe2, width="18", height="12", selectmode=BROWSE, yscrollcommand=scrollbar2.set,font=("Arial", 10)) 112 | rpfluids=get_refprop_fluids() 113 | for item in sorted(rpfluids): 114 | self.Listbox_2.insert(END, item) 115 | scrollbar2.config(command=self.Listbox_2.yview) 116 | scrollbar2.pack(side=RIGHT, fill=Y) 117 | self.Listbox_2.pack(side=LEFT, fill=BOTH, expand=1) 118 | # 119 | self.Listbox_2_frame.grid(row=3,column=2,sticky=W,padx=5,pady=5, columnspan=1,rowspan=1) 120 | self.Listbox_2.bind("", self.Listbox_2_Click) 121 | # 122 | self.Listbox_2.select_set(13) 123 | # 124 | # Textbox 125 | # 126 | lbframe1 = Frame( self.dialogframe1 ) 127 | self.Text_1_frame = lbframe1 128 | scrollbar1 = Scrollbar(lbframe1, orient=VERTICAL) 129 | self.Text_1 = Text(lbframe1, width="80", height="13", yscrollcommand=scrollbar1.set) 130 | scrollbar1.config(command=self.Text_1.yview) 131 | scrollbar1.pack(side=RIGHT, fill=Y) 132 | self.Text_1.pack(side=LEFT, fill=BOTH, expand=1) 133 | self.Text_1_frame.grid(row=3,column=3,columnspan=3,padx=2,sticky=W+E,pady=4) 134 | self.Text_1.delete(1.0, END) 135 | #self.statetext=KM.KM_Info(self.refrigerant) 136 | self.Text_1.insert(END, self.statetext) 137 | # 138 | self.BT1_Frame=LabelFrame(self.dialogframe1 ,relief=GROOVE,bd=self.frameborder,text=_('Mixture components'),font=("Arial", 10)) 139 | self.BT1_Frame.grid(row=6,column=1,sticky=W,padx=5,pady=5,columnspan=1,rowspan=4) 140 | # 141 | self.Button_addmix = Button(self.BT1_Frame,text=_('Add fluid to mixture'),font=("Arial", 10, "bold") ) 142 | self.Button_addmix.grid(row=1,rowspan=1,column=1,pady=5,sticky=W,padx=8) 143 | self.Button_addmix.bind("", self.AddToMix) 144 | # 145 | self.Button_delmix = Button(self.BT1_Frame,text=_('Delete mixture') ,font=("Arial", 10, "bold")) 146 | self.Button_delmix.grid(row=2,rowspan=1,column=1,pady=5,sticky=W,padx=8) 147 | self.Button_delmix.bind("", self.DeleteMix) 148 | # 149 | self.Button_setmix = Button(self.BT1_Frame,text=_('Define mixture') ,font=("Arial", 10, "bold")) 150 | self.Button_setmix.grid(row=3,rowspan=1,column=1,pady=5,sticky=W,padx=8) 151 | self.Button_setmix.bind("", self.SetMix) 152 | # 153 | mixframe1 = Frame( self.dialogframe1 ) 154 | self.Text_2_frame = mixframe1 155 | scrollbar3 = Scrollbar(mixframe1, orient=VERTICAL) 156 | self.Text_3 = Text(mixframe1, width="12", height="12", yscrollcommand=scrollbar3.set,font=("Arial", 10)) 157 | scrollbar3.config(command=self.Text_3.yview) 158 | scrollbar3.pack(side=RIGHT, fill=Y) 159 | self.Text_3.pack(side=LEFT, fill=BOTH, expand=1) 160 | self.Text_2_frame.grid(row=6,column=2,columnspan=1,rowspan=7,padx=2,sticky=W+E,pady=4) 161 | self.Text_3.delete(1.0, END) 162 | #self.statetext=KM.KM_Info(self.refrigerant) 163 | self.Text_3.insert(END,' ') 164 | # 165 | self.mixframe2 = Frame( self.dialogframe1 ) 166 | self.mixframe2.grid(row=7,column=2,columnspan=2,padx=2,sticky=W+E,pady=4) 167 | # 168 | self.RG1_Frame=LabelFrame(self.dialogframe1 ,relief=GROOVE,bd=self.frameborder,text=_('Choose mixture backend'),font=("Arial", 10)) 169 | self.RG1_Frame.grid(row=10,column=1,sticky=W,padx=5,pady=5,columnspan=1,rowspan=3) 170 | 171 | self.RG1_StringVar = StringVar() 172 | self.RG1_StringVar.set('HEOS') 173 | self.RG1_StringVar_traceName = self.RG1_StringVar.trace_variable("w", self.RG1_StringVar_Callback) 174 | 175 | self.RG1_Button_01 = Radiobutton(self.RG1_Frame,text='HEOS', value='HEOS', relief="raised",indicatoron=False,width=15 ) 176 | self.RG1_Button_01.grid(column=1,row=1,padx=8,sticky=W,pady=8) 177 | self.RG1_Button_01.configure(variable=self.RG1_StringVar) 178 | # 179 | self.RG1_Button_02 = Radiobutton(self.RG1_Frame,text='REFPROP', value='REFPROP', relief="raised",indicatoron=False,width=15 ) 180 | self.RG1_Button_02.grid(column=1,row=2,padx=8,sticky=W,pady=8) 181 | self.RG1_Button_02.configure(variable=self.RG1_StringVar ) 182 | # 183 | self.initcomplete=True 184 | self.Update() 185 | 186 | def AddToMix(self,event): 187 | if self.ref not in self.mixnamelist : 188 | if '::' in self.ref : 189 | self.mixnamelist.append(self.ref.split('::')[1]) 190 | else : 191 | self.mixnamelist.append(self.ref) 192 | self.Text_3.delete(1.0,END) 193 | for mix in self.mixnamelist : 194 | self.Text_3.insert(END,'%s\n'%mix) 195 | 196 | def DeleteMix(self,event): 197 | self.Text_3.delete(1.0,END) 198 | self.mixnamelist=[] 199 | self.mixmasslist=[] 200 | self.mixmollist=[] 201 | self.mixframe.grid_forget() 202 | 203 | def SetMix(self,event): 204 | # 205 | d=MyDialog(self.Caller.master,dialogOptions=self.mixnamelist) 206 | self.mixmasslist=d.mymasslist 207 | mixname,self.mixmollist=refprop_mixname(self.mixnamelist,self.mixmasslist) 208 | self.Caller.set_ref(mixname) 209 | self.ShowMix() 210 | self.Update() 211 | 212 | def ShowMix(self): 213 | # 214 | self.mixframe= LabelFrame(self.dialogframe1,relief=GROOVE,bd=self.frameborder,text=_('Mixture composition'),font=("Arial", 10)) 215 | self.mixframe.grid(row=7,column=3,padx=8,sticky=W,pady=4,columnspan=1) 216 | self.mix_tk_list=[] 217 | mixrow=1 218 | mixlabel1 = Label(self.mixframe,text=' Name kg/kg mol/mol',font=("Arial", 10) ) 219 | mixlabel1.grid(row=mixrow,column=1,padx=8,columnspan=3,sticky=W,pady=5) 220 | self.mix_tk_list.append(mixlabel1) 221 | mixrow+=1 222 | for i in range(len(self.mixnamelist)): 223 | mixlabel1 = Label(self.mixframe,text=self.mixnamelist[i],font=("Arial", 10) ) 224 | mixlabel1.grid(row=mixrow,column=1,padx=8,columnspan=1,sticky=W,pady=5) 225 | mixlabel2 = Label(self.mixframe,text=(' %2.4f'%self.mixmasslist[i]),font=("Arial", 10) ) 226 | mixlabel2.grid(row=mixrow,column=2,padx=8,columnspan=1,sticky=W,pady=5) 227 | mixlabel3 = Label(self.mixframe,text=(' %2.16f'%self.mixmollist[i]),font=("Arial", 10) ) 228 | mixlabel3.grid(row=mixrow,column=3,padx=8,columnspan=1,sticky=W,pady=5) 229 | mixrow+=1 230 | self.mix_tk_list.append(mixlabel1) 231 | self.mix_tk_list.append(mixlabel2) 232 | self.mix_tk_list.append(mixlabel3) 233 | 234 | def Listbox_1_Click(self, event): 235 | # 236 | index=self.Listbox_1.curselection() 237 | self.ref=self.Listbox_1.get(index) 238 | self.tkref.set(self.ref) 239 | self.Caller.set_ref(self.ref) 240 | self.Update() 241 | get_refprop_fluids() 242 | 243 | def Listbox_2_Click(self, event): 244 | # 245 | index=self.Listbox_2.curselection() 246 | if self.Listbox_2.get(index)==_('Refprop not found'): 247 | self.ref='R134a' 248 | else : 249 | self.ref=('REFPROP::'+self.Listbox_2.get(index)) 250 | self.tkref.set(self.ref) 251 | self.Caller.set_ref(self.ref) 252 | self.Update() 253 | 254 | def Update(self): 255 | # 256 | if self.initcomplete : 257 | self.ref=self.Caller.get_ref() 258 | self.Text_1.delete(1.0, END) 259 | self.statetext= _('Coolprop Version : %s \n')%str(CoolProp.__version__) 260 | self.statetext+=_('Coolprop gitrevision : %s \n')%str(CoolProp.__gitrevision__) 261 | self.statetext+=_('Refrigerant : %s \n')%str(self.ref) 262 | 263 | 264 | self.statetext+=self.get_GWP100() 265 | self.statetext+=self.get_ODP() 266 | molmassstring='' 267 | try : 268 | molmass=PropsSI('M',self.ref) 269 | except ValueError : 270 | molmassstring=' N/A ' 271 | if molmassstring=='' : 272 | molmassstring='%6.2f'%(molmass*1000) 273 | self.statetext+=_('Molar mass :%s \n')%molmassstring 274 | self.Text_1.insert(END,self.statetext) 275 | 276 | def RG1_StringVar_Callback(self, varName, index, mode): 277 | # 278 | backend=self.RG1_StringVar.get() 279 | self.ref=self.Caller.get_ref() 280 | if ':' in self.ref : 281 | try : 282 | myref=self.ref.split(':')[-1] 283 | except ValueError : 284 | pass 285 | if backend=='HEOS': 286 | self.ref='HEOS::'+myref 287 | elif backend=='REFPROP': 288 | self.ref='REFPROP::'+myref 289 | # 290 | self.tkref.set(self.ref) 291 | self.Caller.set_ref(self.ref) 292 | self.Update() 293 | else : 294 | pass 295 | 296 | 297 | def get_GWP100(self): 298 | # GWP 299 | try : 300 | GWP=PropsSI('GWP100',self.ref) 301 | except ValueError : 302 | GWP=-1 303 | if GWP == -1: 304 | GWP100='GWP100 : N/A \n' 305 | else : 306 | GWP100='GWP100 : %d \n'%GWP 307 | return GWP100 308 | 309 | def get_ODP(self): 310 | # ODP 311 | try : 312 | ODP=PropsSI('ODP',self.ref) 313 | except ValueError : 314 | ODP=-1 315 | if ODP == -1 or ODP==0 : 316 | ODP1='ODP : N/A \n' 317 | else : 318 | ODP1=_('Ozone depleting Substance !\nODP : %2.3F \n')%ODP 319 | return ODP1 320 | 321 | class _Testdialog: 322 | 323 | def __init__(self, master): 324 | frame = Frame(master) 325 | frame.pack() 326 | self.master = master 327 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 328 | # 329 | self.tkref=StringVar() 330 | self.ref='R134a' 331 | self.tkref.set(self.ref) 332 | App=cpgbasics(frame,self) 333 | 334 | def set_ref(self,ref): 335 | self.ref=ref 336 | self.tkref.set(ref) 337 | 338 | def get_language(self): 339 | return 'de' 340 | 341 | def get_ref(self): 342 | return 'R134a' 343 | 344 | def main(): 345 | root = Tk() 346 | app = _Testdialog(root) 347 | root.mainloop() 348 | 349 | if __name__ == '__main__': 350 | main() 351 | -------------------------------------------------------------------------------- /cpgui_cycle1.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | 5 | from tkinter import * 6 | from tkinter import ttk 7 | 8 | import CoolProp 9 | from CoolProp.CoolProp import PropsSI 10 | 11 | from cpgui_all import * 12 | import gettext 13 | 14 | import numpy as np 15 | 16 | from PIL import ImageTk, Image 17 | from scipy.optimize import bisect 18 | 19 | class cpg_cycle1(myDialog): 20 | 21 | def __init__(self, CycleFrame,Caller,Debug=False): 22 | # 23 | self.initcomplete=False 24 | # 25 | self.Caller=Caller 26 | # 27 | # by module translations 28 | self.language=cpgui_language 29 | localedir=find_data_file('locale') 30 | self.lang = gettext.translation('cpg_cycle1', localedir=localedir, languages=[self.language]) 31 | self.lang.install() 32 | # 33 | self.Debug=Debug 34 | # 35 | # add all input variables to the following list 36 | self.VarVal ={'t0':273.15, 37 | 'dt0h':10, 38 | 'dp0':10000, 39 | 'Q0':1000, 40 | 'tc':273.15+45, 41 | 'dtu':5, 42 | 'dpc':10000, 43 | 'sl_dth':10, 44 | 'sl_dp':10000, 45 | 'dl_dtu':18, 46 | 'dl_dp':10000, 47 | 'comp_eta':0.6} 48 | # 49 | # create data structure like below to generate input form 50 | self.InputPanels ={'Evaporator':{'Title':_('Evaporator'), 51 | 'row':1, # row of Evaporator Frame in InputFrame 52 | 'col':1, # coloumn of Evaporator Frame in InputFrame 53 | 'order':['t0','dt0h','dp0','Q0'], # Input fields order of appearance 54 | 't0':[_('Temperature'),self.VarVal['t0'],GUI_UNIT('T'),'T'], # Input fields, Label, Variable to change, Unit Label / this List will be extended by a tkinter StringVar for callback on change 55 | 'dt0h':[_('Superheat'),self.VarVal['dt0h'],GUI_UNIT('dT'),'dT'], 56 | 'dp0':[_('Pressure drop'),self.VarVal['dp0'],GUI_UNIT('p'),'p'], 57 | 'Q0':[_('Capacity'),self.VarVal['Q0'],GUI_UNIT('P'),'P'], 58 | }, 59 | 'Condenser':{'Title':_('Condenser'), 60 | 'row':1, 61 | 'col':2, 62 | 'order':['tc','dtu','dpc','empty'], 63 | 'tc':[_('Temperature'),self.VarVal['tc'],GUI_UNIT('T'),'T'], 64 | 'dtu':[_('Subcooling'),self.VarVal['dtu'],GUI_UNIT('dT'),'dT'], 65 | 'dpc':[_('Pressure drop'),self.VarVal['dpc'],GUI_UNIT('p'),'p'], 66 | 'empty':[' '], 67 | }, 68 | 'Pipes':{'Title':_('Suction line SL / Discharge line DL'), 69 | 'row':1, 70 | 'col':3, 71 | 'order':['sl_dth','sl_dp','dl_dtu','dl_dp'], 72 | 'sl_dth':[_('SL superheat'),self.VarVal['sl_dth'],GUI_UNIT('dT'),'dT'], 73 | 'sl_dp':[_('SL Pressure drop'),self.VarVal['sl_dp'],GUI_UNIT('p'),'p'], 74 | 'dl_dtu':[_('DL Temperature loss'),self.VarVal['dl_dtu'],GUI_UNIT('dT'),'dT'], 75 | 'dl_dp':[_('DL Pressure drop'),self.VarVal['dl_dp'],GUI_UNIT('p'),'p'], 76 | }, 77 | 'Compressor':{'Title':_('Compressor'), 78 | 'row':2, 79 | 'col':1, 80 | 'order':['comp_eta'], 81 | 'comp_eta':[_('Isentropic efficiency'),self.VarVal['comp_eta'],GUI_UNIT('eta'),'eta'], 82 | }, 83 | } 84 | # 85 | self.Caller=Caller 86 | self.ref=Caller.get_ref() 87 | # 88 | self.frameborder=5 89 | # 90 | self.statetext=' ' 91 | # 92 | self.InfoDict={'1' :('1', _('End of SL / compressor intake')), 93 | '2s' :('2s', _('Isentropic compression')), 94 | '2' :('2', _('Real compression')), 95 | '3' :('3', _('Condenser inlet')), 96 | '3dew' :('3\'\'', _('Dewpoint inside condenser')), 97 | '3dewm4bub' :('3\'\'m4\'', _('Average between 3\'\' and 4\'')), 98 | '4bub' :('4\'', _('Bubblepoint inside condenser')), 99 | '4' :('4', _('Exit condenser')), 100 | '5' :('5', _('Evaporator entry')), 101 | '5m6dew' :('5m6\'\'', _('Average between 5 and 6\'\'')), 102 | '6dew' :('6\'\'', _('Dewpoint inside evaporator')), 103 | '6' :('6', _('Exit evaporator')), 104 | 'order' :('1','2s','2','3','3dew','3dewm4bub','4bub','4','5','5m6dew','6dew','6'), 105 | } 106 | # Frames for input and output 107 | self.InputFrame= LabelFrame(CycleFrame,relief=GROOVE,bd=self.frameborder,text=_('Cycle inputs'),font=("Arial", 10, "bold")) 108 | self.InputFrame.grid(row=1,column=1,padx=8,pady=5,sticky=W) 109 | self.OutputFrame= LabelFrame(CycleFrame,relief=GROOVE,bd=self.frameborder,text=_('Cycle outputs'),font=("Arial", 10,"bold")) 110 | self.OutputFrame.grid(row=3,column=1,padx=8,pady=5,sticky=EW,rowspan=10,columnspan=3) 111 | # 112 | # create Inputs form 113 | # 114 | for key in self.InputPanels : 115 | self.GridInputPanel(self.InputFrame,key,Debug=False) 116 | # 117 | self.Button_1 = Button(self.InputFrame,text=_(' Calculate '),font=("Arial", 12, "bold") ) 118 | self.Button_1.grid(row=2,rowspan=1,column=3,pady=5,sticky=W,padx=8) 119 | self.Button_1.bind("", self.calculate) 120 | # 121 | # Output 122 | # 123 | self.out_nb = ttk.Notebook(self.OutputFrame) 124 | self.out_nb.pack(fill = 'both', expand = 1, padx = 5, pady = 5) 125 | # 126 | self.tab1_frame = ttk.Frame(self.OutputFrame) 127 | self.tab2_frame = ttk.Frame(self.OutputFrame) 128 | self.tab3_frame = ttk.Frame(self.OutputFrame) 129 | # tab 1 cycle display and selection 130 | self.out_nb.add(self.tab1_frame,text=_('Cycle information')) 131 | # 132 | self.InfoFrame= LabelFrame(self.tab1_frame,relief=GROOVE,bd=self.frameborder,text=_('Statepoints'),font=("Arial", 10, "bold")) 133 | self.InfoFrame.grid(row=1,column=1,padx=8,pady=5,sticky=W) 134 | 135 | inforow=1 136 | for point in self.InfoDict['order']: 137 | pl=Label(self.InfoFrame,text='{:<10}'.format(self.InfoDict[point][0]),font=("Arial", 10) ) 138 | pl.grid(row=inforow,rowspan=1,column=1,pady=2,sticky=W,padx=2) 139 | tl=Label(self.InfoFrame,text='{:<35}'.format(self.InfoDict[point][1]),font=("Arial", 10) ) 140 | tl.grid(row=inforow,rowspan=1,column=2,pady=2,sticky=W,padx=2) 141 | inforow+=1 142 | 143 | self.cycle1png=find_data_file('simplecycle.png') 144 | imgfile = Image.open(self.cycle1png) 145 | render = ImageTk.PhotoImage(imgfile) 146 | img = Label(self.tab1_frame, image=render) 147 | img.image = render 148 | img.grid(row=1,column=2,pady=5,sticky=NS,padx=8) 149 | # 150 | self.out_nb.add(self.tab2_frame,text=_('Output table')) 151 | # 152 | self.statetext=' ' 153 | lbframe1 = Frame( self.tab2_frame ) 154 | self.Text_1_frame = lbframe1 155 | scrollbar1 = Scrollbar(lbframe1, orient=VERTICAL) 156 | self.Text_1 = Text(lbframe1, width="110", height="25", yscrollcommand=scrollbar1.set) 157 | scrollbar1.config(command=self.Text_1.yview) 158 | scrollbar1.pack(side=RIGHT, fill=Y) 159 | self.Text_1.pack(side=LEFT, fill=BOTH, expand=1) 160 | self.Text_1_frame.grid(row=1,column=1,columnspan=1,padx=2,sticky=W+E,pady=4) 161 | self.Text_1.delete(1.0, END) 162 | # 163 | self.out_nb.bind_all("<>", self.tabChangedEvent) 164 | self.initcomplete=True 165 | 166 | def GridInputPanel(self,GridInputFrame,PanelKey,Debug=False,tfont=("Arial", 10, "bold"),font=("Arial", 10)): 167 | # 168 | LineList=self.InputPanels[PanelKey]['order'] 169 | GIPanel=LabelFrame(GridInputFrame,relief=GROOVE,bd=5,text=self.InputPanels[PanelKey]['Title']) 170 | GIPanel.grid(row=self.InputPanels[PanelKey]['row'],column=self.InputPanels[PanelKey]['col'],padx=8,pady=5,sticky=W) 171 | # 172 | i=1 173 | for k in self.InputPanels[PanelKey]['order'] : 174 | if self.InputPanels[PanelKey][k][0] != ' ' : 175 | self.InputPanels[PanelKey][k].append(StringVar()) 176 | outval=SI_TO(self.InputPanels[PanelKey][k][-2], self.InputPanels[PanelKey][k][1]) 177 | #print('cycle 1 : GridInputPanel : SI_TO : ',outval) 178 | #self.InputPanels[PanelKey][k][-1].set('%f'%self.InputPanels[PanelKey][k][1]) 179 | self.InputPanels[PanelKey][k][-1].set(outval) 180 | self.InputPanels[PanelKey][k][-1].trace("w", lambda name, index, mode, var=self.InputPanels[PanelKey][k][-1],quantity=self.InputPanels[PanelKey][k][-2], key=k: self.GridInputPanelUpdate(var, key, quantity)) 181 | Label(GIPanel, text=self.InputPanels[PanelKey][k][0],font=font).grid(column=1, row=i,padx=8,pady=5,sticky=W) 182 | Entry(GIPanel, width=15, textvariable=self.InputPanels[PanelKey][k][-1],font=font).grid(column=2, row=i,padx=8,pady=5,sticky=W) 183 | Label(GIPanel, text=self.InputPanels[PanelKey][k][2],font=font).grid(column=3, row=i,padx=8,pady=5,sticky=W) 184 | else : 185 | Label(GIPanel, text=' ',font=font).grid(column=1, row=i,padx=8,pady=5,sticky=W) 186 | # 187 | i+=1 188 | # 189 | def GridInputPanelUpdate(self, sv,key,quantity): 190 | #print(sv, key, sv.get(),quantity) 191 | #self.VarVal[key]=sv.get() 192 | try : 193 | self.VarVal[key]=TO_SI(quantity,float(sv.get().replace(',','.'))) 194 | except ValueError : 195 | pass 196 | #print( key,self.VarVal[key]) 197 | 198 | def tabChangedEvent(self,event): 199 | self.ref=self.Caller.get_ref() 200 | 201 | def calculate(self,event): 202 | # 203 | self.ref=self.Caller.get_ref() 204 | # 205 | self.t0=self.VarVal['t0'] # Evaporation temperature in °C 206 | self.dt0h=self.VarVal['dt0h'] # Superheat in K 207 | self.dp0=self.VarVal['dp0'] # pressure drop evaporator in bar 208 | self.Q0=self.VarVal['Q0'] # refrigeration capacity in W 209 | # 210 | self.tc=self.VarVal['tc'] # condensation temperature in °C 211 | self.dtu=self.VarVal['dtu'] # subcooling in K 212 | self.dpc=self.VarVal['dpc'] # pressure drop condenser in bar 213 | # 214 | self.sl_dth=self.VarVal['sl_dth'] # superheat suction line in K 215 | self.sl_dp=self.VarVal['sl_dp'] # pressure drop suction line in bar 216 | self.dl_dtu=self.VarVal['dl_dtu'] # subcooling discharge line in K 217 | self.dl_dp=self.VarVal['dl_dp'] # pressure drop discharge line in bar 218 | # 219 | self.comp_eta=self.VarVal['comp_eta'] # Compressor isentropic efficiency 220 | # 221 | self.statetext=_('Simple DX cycle statepoint Table for %s\n\n')%self.ref 222 | self.statetext+=(" Point | t | p | v | h | s | x | Description \n") 223 | self.datarow= " %6s | %6.2f | %6.2f | %10.5f | %7.2f | %7.4f | %7s | %s \n" 224 | self.statetext+=" | {} | {} | {} | {} | {} | {} | \n".format(GUI_UNIT('T'),GUI_UNIT('p'),GUI_UNIT('v'),GUI_UNIT('H'),GUI_UNIT('S'),GUI_UNIT('Q'),) 225 | self.statetext+= "-------------------------------------------------------------------------------------------------\n" 226 | self.row={} 227 | # point 6dew 228 | name='6dew' 229 | p6dew=PropsSI('P','T',self.t0,'Q',1,self.ref) 230 | t6dew=self.t0 231 | v6dew=1/PropsSI('D','T',self.t0,'Q',1,self.ref) 232 | h6dew=PropsSI('H','T',self.t0,'Q',1,self.ref) 233 | s6dew=PropsSI('S','T',self.t0,'Q',1,self.ref) 234 | x6dew=' ' 235 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t6dew),SI_TO('p',p6dew),v6dew,SI_TO('H',h6dew),SI_TO('S',s6dew),x6dew,self.InfoDict[name][1]) 236 | # superheat on evaporator exit 237 | name='6' 238 | p6=p6dew 239 | t6=self.t0+self.dt0h 240 | v6=1/PropsSI('D','T',t6,'P',p6,self.ref) 241 | h6=PropsSI('H','T',t6,'P',p6,self.ref) 242 | s6=PropsSI('S','T',t6,'P',p6,self.ref) 243 | x6=' ' 244 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t6),SI_TO('p',p6),v6,SI_TO('H',h6),SI_TO('S',s6),x6,self.InfoDict[name][1]) 245 | # + superheat and pressure drop suction line 246 | name='1' 247 | p1=p6-self.sl_dp 248 | t1=t6+self.sl_dth 249 | v1=1/PropsSI('D','T',t1,'P',p1,self.ref) 250 | h1=PropsSI('H','T',t1,'P',p1,self.ref) 251 | s1=PropsSI('S','T',t1,'P',p1,self.ref) 252 | x1=' ' 253 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t1),SI_TO('p',p1),v1,SI_TO('H',h1),SI_TO('S',s1),x1,self.InfoDict[name][1]) 254 | # isentropic compression 255 | name='2s' 256 | p2s=PropsSI('P','T',self.tc,'Q',1,self.ref)+self.dl_dp 257 | s2s=s1 258 | try : 259 | t2s=PropsSI('T','P',p2s,'S',s2s,self.ref) 260 | except ValueError : 261 | t2s=bisect(lambda T: PropsSI('S','T',T,'P',p2s,self.ref)-s2s,t1,493,xtol=0.01) 262 | print('t2s : ',t2s) 263 | v2s=1/PropsSI('D','T',t2s,'P',p2s,self.ref) 264 | h2s=PropsSI('H','T',t2s,'P',p2s,self.ref) 265 | x2s=' ' 266 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t2s),SI_TO('p',p2s),v2s,SI_TO('H',h2s),SI_TO('S',s2s),x2s,self.InfoDict[name][1]) 267 | # real compression 268 | name='2' 269 | p2=p2s 270 | h2=h1+(h2s-h1)/self.comp_eta 271 | try : 272 | t2=PropsSI('T','P',p2,'H',h2,self.ref) 273 | except ValueError : 274 | t2=bisect(lambda T: PropsSI('H','T',T,'P',p2,self.ref)-h2,t2s,493,xtol=0.01) 275 | print('t2 : ',t2) 276 | v2=1/PropsSI('D','T',t2,'P',p2,self.ref) 277 | s2=PropsSI('S','T',t2,'P',p2,self.ref) 278 | x2=' ' 279 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t2),SI_TO('p',p2),v2,SI_TO('H',h2),SI_TO('S',s2),x2,self.InfoDict[name][1]) 280 | # condenser entry 281 | name='3' 282 | p3=p2-self.dl_dp 283 | t3=t2-self.dl_dtu 284 | h3=PropsSI('H','P',p3,'T',t3,self.ref) 285 | v3=1/PropsSI('D','T',t3,'P',p3,self.ref) 286 | s3=PropsSI('S','T',t3,'P',p3,self.ref) 287 | x3=' ' 288 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t3),SI_TO('p',p3),v3,SI_TO('H',h3),SI_TO('S',s3),x3,self.InfoDict[name][1]) 289 | # inside condenser dewpoint 290 | name='3dew' 291 | t3dew=self.tc 292 | p3dew=PropsSI('P','T',t3dew,'Q',1,self.ref) 293 | h3dew=PropsSI('H','P',p3dew,'Q',1,self.ref) 294 | v3dew=1/PropsSI('D','P',p3dew,'Q',1,self.ref) 295 | s3dew=PropsSI('S','P',p3dew,'Q',1,self.ref) 296 | x3dew=' ' 297 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t3dew),SI_TO('p',p3dew),v3dew,SI_TO('H',h3dew),SI_TO('S',s3dew),x3dew,self.InfoDict[name][1]) 298 | # inside condenser bubblepoint 299 | name='4bub' 300 | p4bub=p3dew-self.dpc 301 | t4bub=PropsSI('T','P',p4bub,'Q',0,self.ref) 302 | h4bub=PropsSI('H','P',p4bub,'Q',0,self.ref) 303 | v4bub=1/PropsSI('D','P',p4bub,'Q',0,self.ref) 304 | s4bub=PropsSI('S','P',p4bub,'Q',0,self.ref) 305 | x4bub=' ' 306 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t4bub),SI_TO('p',p4bub),v4bub,SI_TO('H',h4bub),SI_TO('S',s4bub),x4bub,self.InfoDict[name][1]) 307 | # condenser exit 308 | name='4' 309 | p4=p4bub 310 | t4=t4bub-self.dtu 311 | h4=PropsSI('H','P',p4,'T',t4,self.ref) 312 | v4=1/PropsSI('D','P',p4,'T',t4,self.ref) 313 | s4=PropsSI('S','P',p4,'T',t4,self.ref) 314 | x4=' ' 315 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t4),SI_TO('p',p4),v4,SI_TO('H',h4),SI_TO('S',s4),x4,self.InfoDict[name][1]) 316 | # evaporator entry 317 | name='5' 318 | p5=p6dew+self.dp0 319 | t5=PropsSI('T','P',p5,'H',h4,self.ref) 320 | h5=h4 321 | v5=1/PropsSI('D','P',p5,'H',h5,self.ref) 322 | s5=PropsSI('S','P',p5,'H',h5,self.ref) 323 | x5=PropsSI('Q','P',p5,'H',h5,self.ref) 324 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t5),SI_TO('p',p5),v5,SI_TO('H',h5),SI_TO('S',s5),'%5.4f'%x5,self.InfoDict[name][1]) 325 | # 326 | name='3dewm4bub' 327 | p3dewm4bub=(p4bub+p3dew)/2 328 | t3dewm4bub=(t4bub+t3dew)/2 329 | h3dewm4bub=(h4bub+h3dew)/2 330 | v3dewm4bub=(v4bub+v3dew)/2 331 | s3dewm4bub=(s4bub+s3dew)/2 332 | x3dewm4bub=' ' 333 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t3dewm4bub),SI_TO('p',p3dewm4bub),v3dewm4bub,SI_TO('H',h3dewm4bub),SI_TO('S',s3dewm4bub),x3dewm4bub,self.InfoDict[name][1]) 334 | # 335 | name='5m6dew' 336 | p5m6dew=(p5+p6dew)/2 337 | t5m6dew=(t5+t6dew)/2 338 | h5m6dew=(h5+h6dew)/2 339 | v5m6dew=(v5+v6dew)/2 340 | s5m6dew=(s5+s6dew)/2 341 | x5m6dew=' ' 342 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t5m6dew),SI_TO('p',p5m6dew),v5m6dew,SI_TO('H',h5m6dew),SI_TO('S',s5m6dew),x5m6dew,self.InfoDict[name][1]) 343 | # 344 | for point in self.InfoDict['order']: 345 | self.statetext+=self.row[point] 346 | #massflux 347 | # from here units need to be fixed 348 | self.mdot=SI_TO('P',self.Q0)/(h6-h5) 349 | self.statetext+=_('\nPower calculations | Key performance values\n') 350 | self.statetext+=_('Evaporator %8.2f kW | Pressure ratio %8.2f (%8.2f)\n')%(SI_TO('P',self.Q0),(p3dew/p6),(p2/p1)) 351 | self.statetext+=_('Condenser %8.2f kW | Pressure difference %8.2f (%8.2f) %s\n')%(((h3-h4)*self.mdot),SI_TO('p',p3dew-p6),SI_TO('p',p2-p1),GUI_UNIT('p')) 352 | self.statetext+=_('Suction line %8.2f kW | Mass flow %8.6f g/s \n')%(((h1-h6)*self.mdot),(self.mdot*1000*1000)) 353 | self.statetext+=_('Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n')%(((h2-h3)*self.mdot),(self.mdot*1000*3600*v1)) 354 | self.statetext+=_('Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n')%(((h2-h1)*self.mdot),(SI_TO('P',self.Q0)/(v1*self.mdot*1000))) 355 | self.statetext+=_(' | COP %8.2f \n')%(SI_TO('P',self.Q0)/((h2-h1)*self.mdot)) 356 | # 357 | self.Text_1.delete(1.0, END) 358 | self.Text_1.insert(END, self.statetext) 359 | self.out_nb.select(1) 360 | 361 | 362 | def Update(self): 363 | # 364 | pass 365 | 366 | class _Testdialog: 367 | 368 | def __init__(self, master): 369 | frame = Frame(master) 370 | frame.pack() 371 | self.Caller = master 372 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 373 | # 374 | self.ref='R134a' 375 | # 376 | App=cpg_cycle1(frame,self,Debug=True) 377 | 378 | def get_ref(self): 379 | return 'R134a' 380 | def get_language(self): 381 | return 'de' 382 | 383 | def main(): 384 | root = Tk() 385 | 386 | 387 | 388 | app = _Testdialog(root) 389 | root.mainloop() 390 | 391 | if __name__ == '__main__': 392 | main() 393 | -------------------------------------------------------------------------------- /cpgui_cycle3.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | 5 | from tkinter import * 6 | from tkinter import ttk 7 | 8 | import CoolProp 9 | from CoolProp.CoolProp import PropsSI 10 | 11 | from cpgui_all import * 12 | import gettext 13 | 14 | import numpy as np 15 | 16 | from PIL import ImageTk, Image 17 | from scipy.optimize import bisect 18 | 19 | class cpg_cycle3(myDialog): 20 | 21 | def __init__(self, GridFrame,Caller,Debug=False): 22 | # 23 | self.initcomplete=False 24 | # 25 | self.Caller=Caller 26 | # 27 | # by module translations 28 | self.language=cpgui_language 29 | localedir=find_data_file('locale') 30 | self.lang = gettext.translation('cpg_cycle2', localedir=localedir, languages=[self.language]) 31 | self.lang.install() 32 | # 33 | self.Debug=Debug 34 | # 35 | ######################################################################################################################### 36 | # add all input variables to the following list 37 | self.VarVal ={ 38 | 't0':268.15, 39 | 'dt0h':10, 40 | 'Q0':35000, 41 | 'T_gc_out':273.15+40, 42 | 'hp':10000000, 43 | 'mp': 5500000, 44 | 'sl_dth':10, 45 | 'comp_lambda':0.87, 46 | 'comp_eta':0.769 47 | } 48 | # create data structure like below to generate input form 49 | self.InputPanels ={'Evaporator':{'Title':_('Evaporator'), 50 | 'row':1, # row of Evaporator Frame in InputFrame 51 | 'col':1, # coloumn of Evaporator Frame in InputFrame 52 | 'order':['t0','dt0h','Q0'], # Input fields order of appearance 53 | 't0':[_('Temperature'),self.VarVal['t0'],GUI_UNIT('T'),'T'], # Input fields, Label, Variable to change, Unit Label / this List will be extended by a tkinter StringVar for callback on change 54 | 'dt0h':[_('Superheat'),self.VarVal['dt0h'],GUI_UNIT('dT'),'dT'], 55 | 'Q0':[_('Capacity'),self.VarVal['Q0'],GUI_UNIT('P'),'P'], 56 | }, 57 | 'Gascooler':{'Title':_('Gascooler'), 58 | 'row':1, 59 | 'col':2, 60 | 'order':['T_gc_out','hp','empty'], 61 | 'T_gc_out':[_('T. out'),self.VarVal['T_gc_out'],GUI_UNIT('T'),'T'], 62 | 'hp':[_('High pressure'),self.VarVal['hp'],GUI_UNIT('p'),'p'], 63 | 'empty':[' '], 64 | }, 65 | 'Receiver':{'Title':_('Receiver'), 66 | 'row':1, 67 | 'col':3, 68 | 'order':['mp','empty','empty'], 69 | 'mp':[_('Middle pressure'),self.VarVal['mp'],GUI_UNIT('p'),'p'], 70 | 'empty':[' '], 71 | }, 72 | 'Pipes':{'Title':_('Suction line SL'), 73 | 'row':2, 74 | 'col':2, 75 | 'order':['sl_dth'], 76 | 'sl_dth':[_('SL superheat'),self.VarVal['sl_dth'],GUI_UNIT('dT'),'dT'], 77 | 78 | 79 | }, 80 | 'Compressor':{'Title':_('Compressor'), 81 | 'row':2, 82 | 'col':1, 83 | 'order':['comp_eta','comp_lambda'], 84 | 'comp_eta':[_('Isentropic efficiency'),self.VarVal['comp_eta'],GUI_UNIT('eta'),'eta'], 85 | 'comp_lambda':[_('Volumetric efficiency'),self.VarVal['comp_lambda'],GUI_UNIT('eta'),'eta'], 86 | }, 87 | } 88 | ################################################################################################################################# 89 | # 90 | self.dialogframe=GridFrame 91 | # 92 | self.Caller=Caller 93 | self.ref=Caller.get_ref() 94 | # 95 | self.frameborder=5 96 | # 97 | self.statetext=' ' 98 | # 99 | self.InfoDict={'1' :('1', _('Compressor intake =M ')), 100 | '2s' :('2s', _('Isentropic compression')), 101 | '2' :('2', _('Real compression')), 102 | '3' :('3', _('Gascooler out')), 103 | 'A' :('A', _('High pressure controller')), 104 | '4' :('4', _('Inlet middle pressure receiver')), 105 | 'C' :('C', _('Middle pressure receiver')), 106 | '5' :('5', _('Liquid out middle pressure receiver')), 107 | '6' :('6', _('Flashgas middle pressure receiver')), 108 | 'B' :('B', _('middle pressure controller')), 109 | '7' :('7', _('Evaporator entry')), 110 | '8' :('8', _('Exit evaporator')), 111 | '9' :('9', _('Exit middle pressure controller')), 112 | '10' :('10', _('End of suction line')), 113 | 'M' :('M', _('Mixing point 9 + 10 ')), 114 | 115 | 'order' :('1','2s','2','3','A','4','C','5','6','B','7','8','9','10','M'), 116 | } 117 | # Frames for input and output 118 | self.InputFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Cycle inputs'),font=("Arial", 10, "bold")) 119 | self.InputFrame.grid(row=1,column=1,padx=8,pady=5,sticky=W) 120 | self.OutputFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Cycle outputs'),font=("Arial", 10,"bold")) 121 | self.OutputFrame.grid(row=3,column=1,padx=8,pady=5,sticky=EW,rowspan=10,columnspan=3) 122 | # 123 | # create Inputs form 124 | # 125 | for key in self.InputPanels : 126 | self.GridInputPanel(self.InputFrame,key,Debug=False) 127 | # 128 | self.Button_1 = Button(self.InputFrame,text=_(' Calculate '),font=("Arial", 12, "bold") ) 129 | self.Button_1.grid(row=2,rowspan=1,column=3,pady=5,sticky=W,padx=8) 130 | self.Button_1.bind("", self.calculate) 131 | # 132 | # Output 133 | # 134 | self.out_nb = ttk.Notebook(self.OutputFrame) 135 | self.out_nb.pack(fill = 'both', expand = 1, padx = 5, pady = 5) 136 | # 137 | self.tab1_frame = ttk.Frame(self.OutputFrame) 138 | self.tab2_frame = ttk.Frame(self.OutputFrame) 139 | self.tab3_frame = ttk.Frame(self.OutputFrame) 140 | # tab 1 cycle display and selection 141 | self.out_nb.add(self.tab1_frame,text=_('Cycle information')) 142 | # 143 | self.InfoFrame= LabelFrame(self.tab1_frame,relief=GROOVE,bd=self.frameborder,text=_('Statepoints'),font=("Arial", 10, "bold")) 144 | self.InfoFrame.grid(row=1,column=1,padx=8,pady=5,sticky=W) 145 | 146 | inforow=1 147 | for point in self.InfoDict['order']: 148 | pl=Label(self.InfoFrame,text='{:<10}'.format(self.InfoDict[point][0]),font=("Arial", 10) ) 149 | pl.grid(row=inforow,rowspan=1,column=1,pady=2,sticky=W,padx=2) 150 | tl=Label(self.InfoFrame,text='{:<35}'.format(self.InfoDict[point][1]),font=("Arial", 10) ) 151 | tl.grid(row=inforow,rowspan=1,column=2,pady=2,sticky=W,padx=2) 152 | inforow+=1 153 | 154 | self.cycle1png=find_data_file('co2-abb-5.png') 155 | imgfile = Image.open(self.cycle1png) 156 | render = ImageTk.PhotoImage(imgfile) 157 | img = Label(self.tab1_frame, image=render) 158 | img.image = render 159 | img.grid(row=1,column=2,pady=5,sticky=NS,padx=8) 160 | # 161 | self.out_nb.add(self.tab2_frame,text=_('Output table')) 162 | # 163 | self.statetext=' ' 164 | lbframe1 = Frame( self.tab2_frame ) 165 | self.Text_1_frame = lbframe1 166 | scrollbar1 = Scrollbar(lbframe1, orient=VERTICAL) 167 | self.Text_1 = Text(lbframe1, width="110", height="25", yscrollcommand=scrollbar1.set) 168 | scrollbar1.config(command=self.Text_1.yview) 169 | scrollbar1.pack(side=RIGHT, fill=Y) 170 | self.Text_1.pack(side=LEFT, fill=BOTH, expand=1) 171 | self.Text_1_frame.grid(row=1,column=1,columnspan=1,padx=2,sticky=W+E,pady=4) 172 | self.Text_1.delete(1.0, END) 173 | # 174 | self.out_nb.bind_all("<>", self.tabChangedEvent) 175 | self.initcomplete=True 176 | 177 | def GridInputPanel(self,GridFrame,PanelKey,Debug=False,tfont=("Arial", 10, "bold"),font=("Arial", 10)): 178 | # 179 | LineList=self.InputPanels[PanelKey]['order'] 180 | GIPanel=LabelFrame(GridFrame,relief=GROOVE,bd=5,text=self.InputPanels[PanelKey]['Title']) 181 | GIPanel.grid(row=self.InputPanels[PanelKey]['row'],column=self.InputPanels[PanelKey]['col'],padx=8,pady=5,sticky=W) 182 | # 183 | i=1 184 | for k in self.InputPanels[PanelKey]['order'] : 185 | if self.InputPanels[PanelKey][k][0] != ' ' : 186 | self.InputPanels[PanelKey][k].append(StringVar()) 187 | outval=SI_TO(self.InputPanels[PanelKey][k][-2], self.InputPanels[PanelKey][k][1]) 188 | #print('cycle 1 : GridInputPanel : SI_TO : ',outval) 189 | #self.InputPanels[PanelKey][k][-1].set('%f'%self.InputPanels[PanelKey][k][1]) 190 | self.InputPanels[PanelKey][k][-1].set(outval) 191 | self.InputPanels[PanelKey][k][-1].trace("w", lambda name, index, mode, var=self.InputPanels[PanelKey][k][-1],quantity=self.InputPanels[PanelKey][k][-2], key=k: self.GridInputPanelUpdate(var, key, quantity)) 192 | Label(GIPanel, text=self.InputPanels[PanelKey][k][0],font=font).grid(column=1, row=i,padx=8,pady=5,sticky=W) 193 | Entry(GIPanel, width=15, textvariable=self.InputPanels[PanelKey][k][-1],font=font).grid(column=2, row=i,padx=8,pady=5,sticky=W) 194 | Label(GIPanel, text=self.InputPanels[PanelKey][k][2],font=font).grid(column=3, row=i,padx=8,pady=5,sticky=W) 195 | else : 196 | Label(GIPanel, text=' ',font=font).grid(column=1, row=i,padx=8,pady=5,sticky=W) 197 | # 198 | i+=1 199 | # 200 | def GridInputPanelUpdate(self, sv,key,quantity): 201 | #print(sv, key, sv.get(),quantity) 202 | #self.VarVal[key]=sv.get() 203 | try : 204 | self.VarVal[key]=TO_SI(quantity,float(sv.get().replace(',','.'))) 205 | except ValueError : 206 | pass 207 | #print( key,self.VarVal[key]) 208 | 209 | def tabChangedEvent(self,event): 210 | self.ref='CO2' 211 | 212 | def calculate(self,event): 213 | # 214 | self.ref='CO2' 215 | # 216 | t0 = self.VarVal['t0'] # Evaporation temperature in K 217 | dt0h = self.VarVal['dt0h'] # Superheat in K 218 | Q0 = self.VarVal['Q0'] # refrigeration capacity in W 219 | T_gc_out = self.VarVal['T_gc_out'] # Gascooler outlet temperature in K 220 | hp = self.VarVal['hp'] # High pressure 221 | mp = self.VarVal['mp'] # Middle pressure 222 | sl_dth = self.VarVal['sl_dth'] # superheat suction line in K 223 | comp_eta = self.VarVal['comp_eta'] # Compressor isentropic efficiency 224 | comp_lambda = self.VarVal['comp_lambda'] # Compressor volumetric efficiency 225 | # 226 | self.statetext=_('Cycle with middle pressure receiver, statepoint Table for %s\n\n')%self.ref 227 | self.statetext+=(" Point | t | p | v | h | s | x | Description \n") 228 | self.datarow= " %6s | %6.2f | %6.2f | %10.5f | %7.2f | %7.4f | %7s | %s \n" 229 | self.statetext+=" | {} | {} | {} | {} | {} | {} | \n".format(GUI_UNIT('T'),GUI_UNIT('p'),GUI_UNIT('v'),GUI_UNIT('H'),GUI_UNIT('S'),GUI_UNIT('Q'),) 230 | self.statetext+= "-------------------------------------------------------------------------------------------------\n" 231 | self.row={} 232 | # 233 | ### Gascooler Exit ######################################### 234 | # 235 | name='3' 236 | p3=hp 237 | t3=T_gc_out 238 | h3=PropsSI('H','P',p3,'T',t3,self.ref) 239 | v3=1/PropsSI('D','T',t3,'P',p3,self.ref) 240 | s3=PropsSI('S','T',t3,'P',p3,self.ref) 241 | x3=' ' 242 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t3),SI_TO('p',p3),v3,SI_TO('H',h3),SI_TO('S',s3),x3,self.InfoDict[name][1]) 243 | # 244 | ### Middle pressure receiver inlet ######################################### 245 | # 246 | name='4' 247 | p4=mp 248 | t4=PropsSI('T','P',p4,'Q',0,self.ref) 249 | h4=h3 250 | v4=1/PropsSI('D','P',p4,'H',h4,self.ref) 251 | s4=PropsSI('S','P',p4,'H',h4,self.ref) 252 | x4=PropsSI('Q','P',p4,'H',h4,self.ref) 253 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t4),SI_TO('p',p4),v4,SI_TO('H',h4),SI_TO('S',s4),'%5.4f'%x4,self.InfoDict[name][1]) 254 | # 255 | ### Middle pressure receiver Liquid out ######################################### 256 | # 257 | name='5' 258 | p5=mp 259 | t5=PropsSI('T','P',p5,'Q',0,self.ref) 260 | h5=PropsSI('H','P',p5,'Q',0,self.ref) 261 | v5=1/PropsSI('D','P',p5,'Q',0,self.ref) 262 | s5=PropsSI('S','P',p5,'Q',0,self.ref) 263 | x5=' ' 264 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t5),SI_TO('p',p5),v5,SI_TO('H',h5),SI_TO('S',s5),x5,self.InfoDict[name][1]) 265 | # 266 | ### Middle pressure receiver Gas out ######################################### 267 | # 268 | name='6' 269 | p6=mp 270 | t6=PropsSI('T','P',p6,'Q',1,self.ref) 271 | v6=1/PropsSI('D','P',p6,'Q',1,self.ref) 272 | h6=PropsSI('H','P',p6,'Q',1,self.ref) 273 | s6=PropsSI('S','P',p6,'Q',1,self.ref) 274 | x6=' ' 275 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t6),SI_TO('p',p6),v6,SI_TO('H',h6),SI_TO('S',s6),x6,self.InfoDict[name][1]) 276 | # 277 | ### Evaporator entry ######################################### 278 | # 279 | name='7' 280 | p7=PropsSI('P','T',t0,'Q',0,self.ref) 281 | t7=t0 282 | h7=h5 283 | v7=1/PropsSI('D','P',p7,'H',h7,self.ref) 284 | s7=PropsSI('S','P',p7,'H',h7,self.ref) 285 | x7=PropsSI('Q','P',p7,'H',h7,self.ref) 286 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t7),SI_TO('p',p7),v7,SI_TO('H',h7),SI_TO('S',s7),'%5.4f'%x7,self.InfoDict[name][1]) 287 | # 288 | ### Evaporator out ######################################### 289 | # 290 | name='8' 291 | p8=p7 292 | t8=t7+dt0h 293 | h8=PropsSI('H','P',p8,'T',t8,self.ref) 294 | v8=1/PropsSI('D','P',p8,'H',h8,self.ref) 295 | s8=PropsSI('S','P',p8,'H',h8,self.ref) 296 | x8=' ' 297 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t8),SI_TO('p',p8),v8,SI_TO('H',h8),SI_TO('S',s8),x8,self.InfoDict[name][1]) 298 | # 299 | ### Exit middle pressure controller ######################################### 300 | # 301 | name='9' 302 | p9=p8 303 | h9=h6 304 | t9=t7 305 | v9=1/PropsSI('D','P',p9,'H',h9,self.ref) 306 | s9=PropsSI('S','P',p9,'H',h9,self.ref) 307 | x9=PropsSI('Q','P',p9,'H',h9,self.ref) 308 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t9),SI_TO('p',p9),v9,SI_TO('H',h9),SI_TO('S',s9),'%5.4f'%x9,self.InfoDict[name][1]) 309 | # 310 | ### Suction line out ######################################### 311 | # 312 | name='10' 313 | p10=p8 314 | t10=t8+sl_dth 315 | h10=PropsSI('H','P',p10,'T',t10,self.ref) 316 | v10=1/PropsSI('D','P',p10,'H',h10,self.ref) 317 | s10=PropsSI('S','P',p10,'H',h10,self.ref) 318 | x10=' ' 319 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t10),SI_TO('p',p10),v10,SI_TO('H',h10),SI_TO('S',s10),x10,self.InfoDict[name][1]) 320 | # 321 | ### compressor inlet ######################################### 322 | # 323 | name='1' 324 | massflow_evaporator = Q0 /(h8-h7) 325 | massflow_compressor = massflow_evaporator/(1-x4) 326 | massflow_flashgas = massflow_compressor - massflow_evaporator 327 | # 328 | p1=p10 329 | h1=(massflow_evaporator * h10 + massflow_flashgas * h9 ) / massflow_compressor 330 | t1=PropsSI('T','P',p1,'H',h1,self.ref) 331 | v1=1/PropsSI('D','H',h1,'P',p1,self.ref) 332 | h1=PropsSI('H','H',h1,'P',p1,self.ref) 333 | s1=PropsSI('S','H',h1,'P',p1,self.ref) 334 | x1=PropsSI('Q','P',p1,'H',h1,self.ref) 335 | if x1 == -1 : 336 | x8 =' ' 337 | xx1 ='sh. gas' 338 | if x1 >=0 and x1 <=1 : 339 | xx1 = '%5.4f'%x1 340 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t1),SI_TO('p',p1),v1,SI_TO('H',h1),SI_TO('S',s1),xx1,self.InfoDict[name][1]) 341 | # 342 | ### isentropic compression ######################################### 343 | # 344 | name='2s' 345 | p2s=hp 346 | s2s=s1 347 | t2s=PropsSI('T','P',p2s,'S',s2s,self.ref) 348 | v2s=1/PropsSI('D','T',t2s,'P',p2s,self.ref) 349 | h2s=PropsSI('H','T',t2s,'P',p2s,self.ref) 350 | x2s=' ' 351 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t2s),SI_TO('p',p2s),v2s,SI_TO('H',h2s),SI_TO('S',s2s),x2s,self.InfoDict[name][1]) 352 | # 353 | ### real compression ######################################### 354 | # 355 | name='2' 356 | p2=hp 357 | # 358 | isentropic_work = h2s-h1 359 | real_work = isentropic_work / comp_eta 360 | # 361 | h2= h1 + real_work 362 | # 363 | t2=PropsSI('T','P',p2,'H',h2,self.ref) 364 | v2=1/PropsSI('D','T',t2,'P',p2,self.ref) 365 | s2=PropsSI('S','T',t2,'P',p2,self.ref) 366 | x2=' ' 367 | self.row[name]=self.datarow%(self.InfoDict[name][0],SI_TO('T',t2),SI_TO('p',p2),v2,SI_TO('H',h2),SI_TO('S',s2),x2,self.InfoDict[name][1]) 368 | # 369 | for point in self.InfoDict['order']: 370 | try : 371 | self.statetext+=self.row[point] 372 | except KeyError : 373 | pass 374 | # 375 | # from here units need to be fixed 376 | # 377 | self.statetext+=_('\nPower calculations | Key performance values\n') 378 | self.statetext+=_('Evaporator %8.2f kW | Pressure ratio %8.2f \n')%(SI_TO('P',Q0),(p2/p1)) 379 | self.statetext+=_('Gascooler %8.2f kW | Pressure difference %8.2f %s\n')%(((h2-h3)*massflow_compressor/1000),SI_TO('p',p2-p1),GUI_UNIT('p')) 380 | self.statetext+=_('Compressor %8.2f kW \n\n')%((real_work*massflow_compressor/1000)) 381 | 382 | self.statetext+=_('Mass flow Evaporator %5.5f kg/s | Mass flow flashgas %8.6f kg/s \n')%(massflow_evaporator,massflow_flashgas) 383 | self.statetext+=_('Mass flow Compressor %5.5f kg/s | Volume flow Compressor %8.4f m³/h \n')%(massflow_compressor,(massflow_compressor*3600)/(comp_lambda/v1)) 384 | #self.statetext+=_('Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n')%(((h2-h1)*self.mdot),(SI_TO('P',self.Q0)/(v1*self.mdot*1000))) 385 | #self.statetext+=_(' | COP %8.2f \n')%(SI_TO('P',self.Q0)/((h2-h1)*self.mdot)) 386 | # 387 | self.Text_1.delete(1.0, END) 388 | self.Text_1.insert(END, self.statetext) 389 | self.out_nb.select(1) 390 | 391 | self.Text_1.delete(1.0, END) 392 | self.Text_1.insert(END, self.statetext) 393 | self.out_nb.select(1) 394 | 395 | def Update(self): 396 | # 397 | pass 398 | 399 | class _Testdialog: 400 | 401 | def __init__(self, master): 402 | frame = Frame(master) 403 | frame.pack() 404 | self.Caller = master 405 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 406 | # 407 | self.ref='R134a' 408 | # 409 | App=cpg_cycle3(frame,self,Debug=True) 410 | 411 | def get_ref(self): 412 | return 'R134a' 413 | def get_language(self): 414 | return 'de' 415 | 416 | def main(): 417 | root = Tk() 418 | 419 | 420 | 421 | app = _Testdialog(root) 422 | root.mainloop() 423 | 424 | if __name__ == '__main__': 425 | main() 426 | -------------------------------------------------------------------------------- /cpgui_diagram.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import matplotlib 4 | matplotlib.use('TkAgg') 5 | import gettext 6 | import sys 7 | 8 | from tkinter import * 9 | from tkinter import ttk 10 | 11 | from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg 12 | from matplotlib.backend_bases import key_press_handler 13 | import matplotlib.ticker as mplticker 14 | from matplotlib.figure import Figure 15 | import matplotlib.lines as mpllines 16 | 17 | import CoolProp 18 | from CoolProp.CoolProp import PropsSI 19 | #from CoolProp.Plots.Plots import PT,Ph,Prho,Ps,Trho,Ts,hs, drawIsoLines 20 | #from CoolProp.Plots import PsychChart 21 | #from CoolProp.Plots import PropsPlot 22 | 23 | import numpy as np 24 | 25 | from cpgui_all import * 26 | # 27 | def pa2bar(pascal): 28 | return pascal/100000.0 29 | 30 | def bar2pa(bar): 31 | return bar*100000 32 | 33 | def j2kj(joule): 34 | return joule/1000.0 35 | 36 | def C2K(temperatur): 37 | return temperatur+273.15 38 | 39 | def K2C(temperatur): 40 | return temperatur-273.15 41 | # 42 | class cpgDiagram(myDialog): 43 | 44 | def __init__(self, GridFrame,Caller): 45 | # 46 | self.dialogframe=GridFrame 47 | # 48 | self.Caller=Caller 49 | # by module translations 50 | self.language=cpgui_language 51 | localedir=find_data_file('locale') 52 | self.lang = gettext.translation('cpgDiagram', localedir=localedir, languages=[self.language]) 53 | self.lang.install() 54 | # 55 | self.ref=Caller.get_ref() 56 | # 57 | self.frameborder=5 58 | # 59 | self.h_color='DarkCyan' # b 60 | self.t_color='r' # r 61 | self.d_color='SeaGreen' # g 62 | self.x_color='k' # k 63 | self.p_color='brown' 64 | self.s_color='blue' 65 | self.cp_color='MediumPurple' 66 | self.BubbleLine_color='MediumVioletRed' 67 | self.DewLine_color='DarkBlue' 68 | self.labelfontsize=10 69 | self.tickfontsize=8 70 | # 71 | self.ObenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Available Diagrams')) 72 | self.ObenFrame.grid(row=1,column=1) 73 | # 74 | self.UntenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Diagram')) 75 | self.UntenFrame.grid(row=1,column=2) 76 | # 77 | #self.l1=Label(self.ObenFrame,text='Text',font=("Arial", 12) ) 78 | #self.l1.grid(row=0,column=0,padx=8,columnspan=5,sticky=W,pady=5) 79 | # 80 | self.RG1_Frame=Frame(self.ObenFrame,relief=GROOVE,bd=self.frameborder) 81 | self.RG1_Frame.grid(row=1,column=1,sticky=W,padx=5,pady=5) 82 | self.RG1_row=0 83 | 84 | self.RG1_StringVar = StringVar() 85 | self.RG1_StringVar.set("0") 86 | self.RG1_StringVar_traceName = self.RG1_StringVar.trace_variable("w", self.RG1_StringVar_Callback) 87 | 88 | self.RG1_Button_01 = Radiobutton(self.RG1_Frame,text='PT', value='PT', relief="raised",indicatoron=False,width=5 ) 89 | self.RG1_Button_01.grid(column=1,row=self.RG1_row+1,padx=8,sticky=W) 90 | self.RG1_Button_01.configure(variable=self.RG1_StringVar) 91 | # 92 | self.RG1_Button_02 = Radiobutton(self.RG1_Frame,text='Ph', value='Ph', relief="raised",indicatoron=False,width=5 ) 93 | self.RG1_Button_02.grid(column=1,row=self.RG1_row+2,padx=8,sticky=W) 94 | self.RG1_Button_02.configure(variable=self.RG1_StringVar ) 95 | # 96 | self.RG1_Button_03 = Radiobutton(self.RG1_Frame,text='Prho', value='Prho', relief="raised",indicatoron=False,width=5 ) 97 | self.RG1_Button_03.grid(column=1,row=self.RG1_row+3,padx=8,sticky=W) 98 | self.RG1_Button_03.configure(variable=self.RG1_StringVar ) 99 | # 100 | self.RG1_Button_04 = Radiobutton(self.RG1_Frame,text='Ps', value='Ps', relief="raised",indicatoron=False,width=5 ) 101 | self.RG1_Button_04.grid(column=1,row=self.RG1_row+4,padx=8,sticky=W) 102 | self.RG1_Button_04.configure(variable=self.RG1_StringVar) 103 | 104 | self.RG1_Button_05 = Radiobutton(self.RG1_Frame,text='Trho', value='Trho', relief="raised",indicatoron=False,width=5 ) 105 | self.RG1_Button_05.grid(column=1,row=self.RG1_row+5,padx=8,sticky=W) 106 | self.RG1_Button_05.configure(variable=self.RG1_StringVar) 107 | # 108 | self.RG1_Button_06 = Radiobutton(self.RG1_Frame,text='Ts', value='Ts', relief="raised",indicatoron=False,width=5 ) 109 | self.RG1_Button_06.grid(column=1,row=self.RG1_row+6,padx=8,sticky=W) 110 | self.RG1_Button_06.configure(variable=self.RG1_StringVar ) 111 | # 112 | self.RG1_Button_07 = Radiobutton(self.RG1_Frame,text='hs', value='hs', relief="raised",indicatoron=False,width=5 ) 113 | self.RG1_Button_07.grid(column=1,row=self.RG1_row+7,padx=8,sticky=W) 114 | self.RG1_Button_07.configure(variable=self.RG1_StringVar ) 115 | # 116 | self.RG1_Button_08 = Radiobutton(self.RG1_Frame,text='Psyc', value='PsycChart', relief="raised",indicatoron=False,width=5 ) 117 | self.RG1_Button_08.grid(column=1,row=self.RG1_row+8,padx=8,sticky=W) 118 | self.RG1_Button_08.configure(variable=self.RG1_StringVar ) 119 | # 120 | self.fig = Figure(figsize=(9,6), dpi=100) 121 | self.ax = self.fig.add_subplot(111) 122 | #Ph(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 123 | #a.plot(t,s) 124 | # a tk.DrawingArea 125 | self.canvas = FigureCanvasTkAgg(self.fig, master=self.UntenFrame) 126 | self.canvas.show() 127 | self.canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1) 128 | 129 | self.toolbar = NavigationToolbar2TkAgg( self.canvas, self.UntenFrame ) 130 | self.toolbar.update() 131 | self.canvas._tkcanvas.pack(side=TOP, fill=BOTH, expand=1) 132 | self.fig.canvas.set_window_title('Coolprop GUI plots') 133 | 134 | def format_ph_coord(self,x, y): 135 | # 136 | t,d,s=PropsSI(['T','D','S'],'P',y*1000,'H',x*1000,self.ref) 137 | v=1/d 138 | return 't=%1.2f K | h=%1.2f kJ/kg | p=%1.2f kPa | d=%1.4f kg/m*| v=%1.6f m*/kg | s=%1.4f J/kg/K '%(t,x,y,d,v,s) 139 | 140 | def format_coord(self,x, y): 141 | # 142 | return ' x = %4.4f y = %4.4f '%(x,y) 143 | 144 | 145 | def RG1_StringVar_Callback(self, varName, index, mode): 146 | # 147 | self.ref=self.Caller.get_ref() 148 | # 149 | try: 150 | dia=self.RG1_StringVar.get() 151 | except(AttributeError): 152 | pass 153 | # 154 | insert=False 155 | # 156 | if dia=="PT" : 157 | self.ax.cla() 158 | try: 159 | PT(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 160 | except ValueError : 161 | self.plot_err() 162 | self.ax.format_coord = self.format_coord 163 | self.canvas.show() 164 | elif dia=="Ph" : 165 | self.ax.cla() 166 | # 167 | try : 168 | Pmin=PropsSI(self.ref,'ptriple') 169 | except ValueError : 170 | Pmin=50000 171 | try : 172 | Tmin=PropsSI('T','P',Pmin,'Q',1,self.ref) 173 | except ValueError : 174 | print('Value error, setting Tmin to 0°C') 175 | Tmin=273.15 176 | Tmax=(220+273.15) 177 | Hmax=PropsSI('H','P',Pmin,'T',Tmax,self.ref) 178 | try : 179 | Hmin=PropsSI('H','P',Pmin,'Q',0,self.ref)-10000 180 | except ValueError : 181 | print('Value error, setting Hmin to 200000') 182 | Hmin=0 183 | Pmax=PropsSI(self.ref,'pcrit')*1.01 184 | #x-axis 185 | self.ax.xaxis.grid(True,which='both',color=self.h_color) 186 | self.ax.tick_params(axis='x',direction='in',which='both',pad=10) 187 | self.ax.set_xlim(j2kj(Hmin),j2kj(Hmax)) 188 | if (j2kj(Hmax)-j2kj(Hmin)) > 1500 : 189 | self.ax.xaxis.set_major_locator(mplticker.MultipleLocator(200)) 190 | self.ax.xaxis.set_minor_locator(mplticker.MultipleLocator(100)) 191 | elif (j2kj(Hmax)-j2kj(Hmin)) > 870 : 192 | self.ax.xaxis.set_major_locator(mplticker.MultipleLocator(50)) 193 | self.ax.xaxis.set_minor_locator(mplticker.MultipleLocator(25)) 194 | else: 195 | self.ax.xaxis.set_major_locator(mplticker.MultipleLocator(20)) 196 | self.ax.xaxis.set_minor_locator(mplticker.MultipleLocator(10)) 197 | # 198 | for i in self.ax.xaxis.get_majorticklabels(): 199 | i.set_fontsize(self.tickfontsize) 200 | for line in self.ax.get_xticklines(): 201 | line.set_marker(mpllines.TICKDOWN) 202 | for tick in self.ax.xaxis.get_major_ticks(): 203 | tick.label1.set_color(self.h_color) 204 | tick.label2.set_color(self.h_color) 205 | # y-axis 206 | self.ax.set_yscale('log') 207 | self.ax.yaxis.grid(True,which='both',color=self.p_color) 208 | self.ax.set_ylim(Pmin/1000,Pmax/1000) 209 | #base=10.0, subs=[1.0], numdecs=0, 210 | self.ax.yaxis.set_major_formatter(mplticker.FormatStrFormatter('%5.0f')) 211 | self.ax.yaxis.set_minor_formatter(mplticker.FormatStrFormatter('%5.0f')) 212 | self.ax.yaxis.set_major_locator(mplticker.LogLocator( numticks=48)) 213 | for i in self.ax.yaxis.get_majorticklabels(): 214 | i.set_fontsize(self.tickfontsize) 215 | for i in self.ax.yaxis.get_minorticklabels(): 216 | i.set_fontsize(self.tickfontsize) 217 | for tick in self.ax.yaxis.get_major_ticks(): 218 | tick.label1.set_color(self.p_color) 219 | tick.label2.set_color(self.p_color) 220 | for tick in self.ax.yaxis.get_minor_ticks(): 221 | tick.label1.set_color(self.p_color) 222 | tick.label2.set_color(self.p_color) 223 | # 224 | print('Plots PH Tmin = ',Tmin) 225 | try : 226 | self.ph_plot=PropsPlot(self.ref, 'Ph',axis = self.ax) 227 | except ValueError : 228 | self.plot_err() 229 | # Overwrite ugly labels 230 | self.ax.set_ylabel(_('Pressure in kPa'),color=self.p_color,fontsize=self.labelfontsize) 231 | self.ax.set_xlabel(_('Specific enthalpy in kJ/kg'),color=self.h_color,fontsize=self.labelfontsize) 232 | # Show values of Mousepointer 233 | self.ax.format_coord = self.format_ph_coord 234 | # 235 | pressures=np.arange(Pmin, Pmax, 1000) 236 | temperatures=self.PH_Isothermal_values(Tmin,Tmax,10) 237 | for t in range(len(temperatures)): 238 | enthalpies=pressures*0.0 239 | for p in range(len(pressures)): 240 | enthalpies[p]=PropsSI('H','P',pressures[p],'T',temperatures[t],self.ref) 241 | self.ax.plot(enthalpies/1000,pressures/1000,'r',linewidth=0.5) 242 | #print(t,enthalpies/1000,pressures/1000) 243 | try : 244 | self.ph_plot=PropsPlot(self.ref, 'Ph',axis = self.ax) 245 | except ValueError : 246 | self.plot_err() 247 | # 248 | self.canvas.show() 249 | elif dia=="Prho" : 250 | self.ax.cla() 251 | try: 252 | Prho(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 253 | except ValueError : 254 | self.plot_err() 255 | self.ax.format_coord = self.format_coord 256 | self.canvas.show() 257 | elif dia=="Ps" : 258 | self.ax.cla() 259 | try: 260 | Ps(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 261 | except ValueError : 262 | self.plot_err() 263 | self.ax.format_coord = self.format_coord 264 | self.canvas.show() 265 | elif dia=="Trho" : 266 | self.ax.cla() 267 | try: 268 | Trho(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 269 | except ValueError : 270 | self.plot_err() 271 | self.ax.format_coord = self.format_coord 272 | self.canvas.show() 273 | elif dia=="Ts" : 274 | self.ax.cla() 275 | try: 276 | Ts(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 277 | except ValueError : 278 | self.plot_err() 279 | self.ax.format_coord = self.format_coord 280 | self.canvas.show() 281 | elif dia=="hs" : 282 | self.ax.cla() 283 | try: 284 | hs(str(self.ref),axis = self.ax,Tmin = PropsSI(str(self.ref),'Ttriple')+0.01) 285 | except ValueError : 286 | self.plot_err() 287 | self.ax.format_coord = self.format_coord 288 | self.canvas.show() 289 | elif dia=="PsycChart" : 290 | self.ax.cla() 291 | Tmin = 263.15 292 | Tmax=333.15 293 | p = 101325 294 | PsychChart.p = p 295 | PsychChart.Tdb = np.linspace(Tmin,Tmax) 296 | SL = PsychChart.SaturationLine() 297 | SL.plot(self.ax) 298 | RHL = PsychChart.HumidityLines([0.05,0.1,0.15,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]) 299 | RHL.plot(self.ax) 300 | HL = PsychChart.EnthalpyLines(range(-20,100,10)) 301 | HL.plot(self.ax) 302 | PF = PsychChart.PlotFormatting() 303 | PF.plot(self.ax) 304 | 305 | self.ax.format_coord = self.format_coord 306 | self.canvas.show() 307 | 308 | def plot_err(self): 309 | self.ax.plot([0,1],[0,1],'r') 310 | self.ax.plot([0,1],[1,0],'r') 311 | self.ax.text(0.1,0.5,_('Only Coolprop single components can be used for plots!')) 312 | 313 | def Update(self): 314 | # 315 | pass 316 | 317 | def PH_Isothermal_values(self,Tmin,Tmax,steps): 318 | # 319 | t_high=round((Tmax-(steps/1.9999))/steps)*steps 320 | t_low=round((Tmin+(steps/1.9999))/steps)*steps 321 | answer=np.arange(t_low,t_high+steps,steps) 322 | return answer 323 | 324 | class _Testdialog: 325 | 326 | def __init__(self, master): 327 | frame = Frame(master) 328 | frame.pack() 329 | self.Caller = master 330 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 331 | # 332 | self.ref='R134a' 333 | # 334 | App=cpgDiagram(frame,self) 335 | 336 | def get_ref(self): 337 | return 'R134a' 338 | def get_language(self): 339 | return 'de' 340 | 341 | def main(): 342 | root = Tk() 343 | 344 | app = _Testdialog(root) 345 | root.mainloop() 346 | 347 | if __name__ == '__main__': 348 | main() 349 | -------------------------------------------------------------------------------- /cpgui_sattable.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Feb 27 2015 16:45 4 | 5 | @author: mayers 6 | """ 7 | 8 | import sys 9 | import gettext 10 | 11 | from tkinter import * 12 | from tkinter import ttk 13 | 14 | import CoolProp 15 | from CoolProp.CoolProp import PropsSI 16 | 17 | from cpgui_all import * 18 | 19 | import numpy as np 20 | 21 | class cpgSatTable(myDialog): 22 | 23 | def __init__(self, GridFrame,Caller): 24 | # 25 | self.initcomplete=False 26 | # 27 | self.dialogframe=GridFrame 28 | # 29 | self.Caller=Caller 30 | # by module translations 31 | self.language=cpgui_language 32 | localedir=find_data_file('locale') 33 | self.lang = gettext.translation('cpgSatTable', localedir=localedir, languages=[self.language]) 34 | self.lang.install() 35 | # 36 | self.kmstring=_('Refrigerant : %10s \n') 37 | self.titel=_('Saturated Table calculation for %10s \n') 38 | # 39 | self.ref=Caller.get_ref() 40 | # 41 | self.frameborder=5 42 | # 43 | self.choices=( label['T'], 44 | label['p'], 45 | ) 46 | self.symbols=('T','p') 47 | # 48 | self.ObenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Select order type and input Values'),font=("Arial", 12)) 49 | self.ObenFrame.grid(row=1,column=1) 50 | # 51 | self.UntenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Fluid data'),font=("Arial", 12)) 52 | self.UntenFrame.grid(row=2,column=1) 53 | # 54 | self.Input1Label1 = Label(self.ObenFrame,text=_('Select order type'),font=("Arial", 12) ) 55 | self.Input1Label1.grid(row=1,column=1,padx=8,sticky=W,pady=5) 56 | self.Input1Label2 = Label(self.ObenFrame,text=_(' min value'),font=("Arial", 12) ) 57 | self.Input1Label2.grid(row=1,column=3,padx=8,sticky=W,pady=5) 58 | self.Input1LabelU1 = Label(self.ObenFrame,text=_('x '),font=("Arial", 12) ) 59 | self.Input1LabelU1.grid(row=1,column=5,padx=8,sticky=W,pady=5) 60 | self.Input1Label3 = Label(self.ObenFrame,text=_(' max value'),font=("Arial", 12) ) 61 | self.Input1Label3.grid(row=2,column=3,padx=8,sticky=W,pady=5) 62 | self.Input1LabelU2 = Label(self.ObenFrame,text=_('x '),font=("Arial", 12) ) 63 | self.Input1LabelU2.grid(row=2,column=5,padx=8,sticky=W,pady=5) 64 | self.Input1Label4 = Label(self.ObenFrame,text=_(' step size'),font=("Arial", 12) ) 65 | self.Input1Label4.grid(row=3,column=3,padx=8,sticky=W,pady=5) 66 | self.Input1LabelU3 = Label(self.ObenFrame,text=_('x '),font=("Arial", 12) ) 67 | self.Input1LabelU3.grid(row=3,column=5,padx=8,sticky=W,pady=5) 68 | # 69 | self.Input1Entry1 = Entry(self.ObenFrame,width="15",font=("Arial", 12)) 70 | self.Input1Entry1.grid(row=1,column=4,sticky=W,padx=8,pady=5) 71 | self.Input1Entry1_StringVar = StringVar() 72 | self.Input1Entry1.configure(textvariable=self.Input1Entry1_StringVar) 73 | self.Input1Entry1_StringVar.set("250") 74 | self.Input1Entry1_StringVar_traceName = self.Input1Entry1_StringVar.trace_variable("w", self.Input1Entry1_StringVar_Callback) 75 | # 76 | self.Input1Entry2 = Entry(self.ObenFrame,width="15",font=("Arial", 12)) 77 | self.Input1Entry2.grid(row=2,column=4,sticky=W,padx=8,pady=5) 78 | self.Input1Entry2_StringVar = StringVar() 79 | self.Input1Entry2.configure(textvariable=self.Input1Entry2_StringVar) 80 | self.Input1Entry2_StringVar.set("373") 81 | self.Input1Entry2_StringVar_traceName = self.Input1Entry2_StringVar.trace_variable("w", self.Input1Entry2_StringVar_Callback) 82 | # 83 | self.Input1Entry3 = Entry(self.ObenFrame,width="15",font=("Arial", 12)) 84 | self.Input1Entry3.grid(row=3,column=4,sticky=W,padx=8,pady=5) 85 | self.Input1Entry3_StringVar = StringVar() 86 | self.Input1Entry3.configure(textvariable=self.Input1Entry3_StringVar) 87 | self.Input1Entry3_StringVar.set("1") 88 | self.Input1Entry3_StringVar_traceName = self.Input1Entry3_StringVar.trace_variable("w", self.Input1Entry3_StringVar_Callback) 89 | # 90 | self.CBOX1_StringVar = StringVar() 91 | self.CBOX1_StringVar.set(label['p']) 92 | self.CBOX1_StringVar_traceName = self.CBOX1_StringVar.trace_variable("w",self.CBOX1_StringVar_Callback) 93 | self.CBOX1 = ttk.Combobox(self.ObenFrame, textvariable=self.CBOX1_StringVar,font=("Arial", 12)) 94 | self.CBOX1['values'] = self.choices 95 | self.CBOX1.grid(column=2,row=1,padx=8,sticky=W,pady=5) 96 | self.CBOX1.current(1) 97 | self.ordertype=self.CBOX1_StringVar.get() 98 | # 99 | self.Button_1 = Button(self.ObenFrame,text=_('Calculate' )) 100 | self.Button_1.grid(row=1,rowspan=2,column=6,pady=5,sticky=W,padx=8) 101 | self.Button_1.bind("", self.calculate) 102 | # 103 | # Textbox 104 | # 105 | self.statetext='' 106 | lbframe1 = Frame( self.UntenFrame ) 107 | self.Text_1_frame = lbframe1 108 | scrollbar1 = Scrollbar(lbframe1, orient=VERTICAL) 109 | self.Text_1 = Text(lbframe1, width="110", height="20", yscrollcommand=scrollbar1.set) 110 | scrollbar1.config(command=self.Text_1.yview) 111 | scrollbar1.pack(side=RIGHT, fill=Y) 112 | self.Text_1.pack(side=LEFT, fill=BOTH, expand=1) 113 | self.Text_1_frame.grid(row=1,column=1,columnspan=1,padx=2,sticky=W+E,pady=4) 114 | self.Text_1.delete(1.0, END) 115 | #self.statetext=KM.KM_Info(self.refrigerant) 116 | self.Text_1.insert(END, self.statetext) 117 | # 118 | self.initcomplete=True 119 | 120 | def CBOX1_StringVar_Callback(self, varName, index, mode): 121 | # 122 | long_quant=self.CBOX1_StringVar.get() 123 | # 124 | mykey=' ' 125 | for key in label.keys(): 126 | if label[key] == long_quant: 127 | self.Input1LabelU1.config(text=GUI_UNIT(key)) 128 | self.Input1LabelU2.config(text=GUI_UNIT(key)) 129 | if key == 'T' : 130 | self.Input1LabelU3.config(text=GUI_UNIT('dT')) 131 | 132 | else : 133 | self.Input1LabelU3.config(text=GUI_UNIT(key)) 134 | self.Quantity=key 135 | # Now set default Values 136 | #self.Line1E1_StringVar.set(default[GUI_UNIT(self.Quantity1)]) 137 | #self.Value1=TO_SI(self.Quantity1,float(self.Line1E1_StringVar.get().replace(',','.'))) 138 | self.Update() 139 | 140 | def Input1Entry1_StringVar_Callback(self, varName, index, mode): 141 | # 142 | pass 143 | 144 | def Input1Entry2_StringVar_Callback(self, varName, index, mode): 145 | # 146 | pass 147 | 148 | def Input1Entry3_StringVar_Callback(self, varName, index, mode): 149 | # 150 | pass 151 | 152 | def CBOX2_StringVar_Callback(self, varName, index, mode): 153 | # 154 | pass 155 | 156 | def Input2Entry1_StringVar_Callback(self, varName, index, mode): 157 | # 158 | pass 159 | 160 | def calculate(self,event): 161 | # 162 | self.Text_1.delete(1.0, END) 163 | self.ref=self.Caller.get_ref() 164 | # 165 | self.statetext=self.titel%self.ref 166 | self.statetext+='\n' 167 | self.statetext+=u" T | p | \u03C1\' | \u03C1\'\' | h\' | h\'\' | s\' | s\'\' | cv | cp \n" 168 | self.statetext+= "-----------------------------------------------------------------------------------------------------\n" 169 | self.Text_1.insert(END, self.statetext) 170 | self.datarow=" %7.2f | %9.4f | %6.2f | %8.4f | %6.2f | %6.2f | %6.2f | %6.2f | %6.3f | %6.3f \n" 171 | 172 | #self.Value1=TO_SI(self.Quantity1,float(self.Line1E1_StringVar.get().replace(',','.'))) 173 | if self.Quantity == 'T' : 174 | self.Tmin=TO_SI(self.Quantity,float(self.Input1Entry1_StringVar.get().replace(',','.'))) 175 | self.Tmax=TO_SI(self.Quantity,float(self.Input1Entry2_StringVar.get().replace(',','.'))) 176 | self.steps=TO_SI('dT',float(self.Input1Entry3_StringVar.get().replace(',','.'))) 177 | temperatures=np.arange(self.Tmin,self.Tmax,self.steps) 178 | 179 | for T in range(len(temperatures)): 180 | TLIQ=temperatures[T] 181 | try : 182 | PLIQ,DLIQ,HLIQ,SLIQ=PropsSI(['P','D','H','S'],'T',temperatures[T],'Q',0,self.ref) 183 | except ValueError : 184 | PLIQ,DLIQ,HLIQ,SLIQ=np.NaN,np.NaN,np.NaN,np.NaN 185 | try : 186 | PVAP,DVAP,HVAP,SVAP,CV,CP=PropsSI(['P','D','H','S','CVMASS','CPMASS'],'T',temperatures[T],'Q',1,self.ref) 187 | except ValueError : 188 | PVAP,DVAP,HVAP,SVAP,CV,CP=np.NaN,np.NaN,np.NaN,np.NaN,np.NaN,np.NaN 189 | mydatarow=self.datarow%( 190 | SI_TO('T',TLIQ), 191 | SI_TO('p',PLIQ), 192 | SI_TO('D',DLIQ), 193 | SI_TO('D',DVAP), 194 | SI_TO('H',HLIQ), 195 | SI_TO('H',HVAP), 196 | SI_TO('S',SLIQ), 197 | SI_TO('S',SVAP), 198 | SI_TO('Cv',CV), 199 | SI_TO('Cp',CP) 200 | ) 201 | self.Text_1.insert(END, mydatarow) 202 | else : 203 | self.Pmin=TO_SI(self.Quantity,float(self.Input1Entry1_StringVar.get().replace(',','.'))) 204 | self.Pmax=TO_SI(self.Quantity,float(self.Input1Entry2_StringVar.get().replace(',','.'))) 205 | self.steps=TO_SI(self.Quantity,float(self.Input1Entry3_StringVar.get().replace(',','.'))) 206 | pressures=np.arange(self.Pmin,self.Pmax,self.steps) 207 | 208 | for P in range(len(pressures)): 209 | PLIQ=pressures[P] 210 | try : 211 | TLIQ,DLIQ,HLIQ,SLIQ=PropsSI(['T','D','H','S'],'P',pressures[P],'Q',0,self.ref) 212 | except ValueError : 213 | PLIQ,DLIQ,HLIQ,SLIQ=np.NaN,np.NaN,np.NaN,np.NaN 214 | try : 215 | TVAP,DVAP,HVAP,SVAP,CV,CP=PropsSI(['T','D','H','S','CVMASS','CPMASS'],'P',pressures[P],'Q',1,self.ref) 216 | except ValueError : 217 | PVAP,DVAP,HVAP,SVAP,CV,CP=np.NaN,np.NaN,np.NaN,np.NaN,np.NaN,np.NaN 218 | mydatarow=self.datarow%( 219 | SI_TO('T',TLIQ), 220 | SI_TO('p',PLIQ), 221 | SI_TO('D',DLIQ), 222 | SI_TO('D',DVAP), 223 | SI_TO('H',HLIQ), 224 | SI_TO('H',HVAP), 225 | SI_TO('S',SLIQ), 226 | SI_TO('S',SVAP), 227 | SI_TO('Cv',CV), 228 | SI_TO('Cp',CP) 229 | ) 230 | self.Text_1.insert(END, mydatarow) 231 | 232 | def Update(self): 233 | # 234 | if self.initcomplete : 235 | self.ref=self.Caller.get_ref() 236 | self.Tmin=round(self.search_Tmin()+0.5,0) 237 | self.Pmin=round((self.search_Pmin()+10000)/10000,0)*10000.0 238 | self.Tmax=self.search_Tmax() 239 | self.Pmax=self.search_Pmax() 240 | self.ordertype=self.CBOX1_StringVar.get() 241 | if self.ordertype == label['T']: 242 | self.Input1Entry1_StringVar.set('{:+12.2f}'.format(SI_TO('T',self.Tmin))) 243 | self.Input1Entry2_StringVar.set('{:+12.2f}'.format(SI_TO('T',self.Tmax))) 244 | self.Input1Entry3_StringVar.set("%d"%1) 245 | else : 246 | self.Input1Entry1_StringVar.set('{:12.2f}'.format(SI_TO('p',self.Pmin))) 247 | self.Input1Entry2_StringVar.set('{:12.2f}'.format(SI_TO('p',self.Pmax))) 248 | self.Input1Entry3_StringVar.set('{:12.2f}'.format(SI_TO('p',10000))) 249 | 250 | self.Text_1.delete(1.0, END) 251 | # 252 | self.statetext= 'Coolprop Version : %s \n'%str(CoolProp.__version__) 253 | self.statetext+='Coolprop gitrevision : %s \n'%str(CoolProp.__gitrevision__) 254 | self.statetext+=self.kmstring%str(self.ref) 255 | self.Text_1.insert(END,self.statetext) 256 | 257 | def search_Tmax(self): 258 | try : 259 | Tmax=round(PropsSI(self.ref,'TCRIT')-0.5,0) 260 | except ValueError : 261 | Tmax=0 262 | suchdruck=np.linspace(100000,10000000,1000) 263 | for sd in range(len(suchdruck)) : 264 | Pmax=suchdruck[sd] 265 | Tmax_old=Tmax 266 | try : 267 | Tmax=PropsSI('T','P',Pmax,'Q',0,self.ref) 268 | except ValueError : 269 | Tmax=Tmax_old 270 | break 271 | 272 | return(Tmax) 273 | 274 | def search_Pmax(self): 275 | try : 276 | Pmax=round((PropsSI(self.ref,'PCRIT')-100)/100,0)*100.0 277 | except ValueError : 278 | Tmax=0 279 | suchdruck=np.linspace(100000,10000000,1000) 280 | for sd in range(len(suchdruck)) : 281 | Pmax=suchdruck[sd] 282 | Pmax_old=Pmax 283 | try : 284 | Tmax=PropsSI('T','P',Pmax,'Q',0,self.ref) 285 | except ValueError : 286 | Pmax=Pmax_old 287 | break 288 | 289 | return(Pmax) 290 | 291 | def search_Tmin(self): 292 | # 293 | self.ref=self.Caller.get_ref() 294 | try : 295 | Tmin=PropsSI(self.ref,'Ttriple') 296 | except ValueError : 297 | suchdruck=np.linspace(50000,0,1000) 298 | for sd in range(len(suchdruck)) : 299 | Pmin=suchdruck[sd] 300 | try : 301 | Tmin=PropsSI('T','P',Pmin,'Q',1,self.ref) 302 | except ValueError : 303 | Pmin=Pmin+50 304 | break 305 | Tmin=PropsSI('T','P',Pmin,'Q',1,self.ref) 306 | return(Tmin) 307 | 308 | def search_Pmin(self): 309 | # 310 | self.ref=self.Caller.get_ref() 311 | try : 312 | Pmin=PropsSI(self.ref,'ptriple') 313 | except ValueError : 314 | suchdruck=np.linspace(50000,0,1000) 315 | for sd in range(len(suchdruck)) : 316 | Pmin=suchdruck[sd] 317 | try : 318 | Tmin=PropsSI('T','P',Pmin,'Q',1,self.ref) 319 | except ValueError : 320 | Pmin=Pmin+50 321 | break 322 | return(Pmin) 323 | 324 | class _Testdialog: 325 | 326 | def __init__(self, master): 327 | frame = Frame(master) 328 | frame.pack() 329 | self.master = master 330 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 331 | # 332 | App=cpgSatTable(frame,self) 333 | App.Update() 334 | 335 | def get_ref(self): 336 | return 'R134a' 337 | def get_language(self): 338 | return 'en' 339 | 340 | def main(): 341 | root = Tk() 342 | app = _Testdialog(root) 343 | root.mainloop() 344 | 345 | if __name__ == '__main__': 346 | main() 347 | -------------------------------------------------------------------------------- /cpgui_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys 4 | import gettext 5 | 6 | from tkinter import * 7 | from tkinter import ttk 8 | from tkinter import filedialog, simpledialog 9 | from cpgui_all import * 10 | 11 | from PIL import ImageTk, Image 12 | 13 | import configparser 14 | import gettext 15 | 16 | class bDialog(Dialog): 17 | # use dialogOptions dictionary to set any values in the dialog 18 | def __init__(self, parent, title = None, dialogOptions=None): 19 | self.initComplete = 0 20 | self.dialogOptions = dialogOptions 21 | Dialog.__init__(self, parent, Titel) 22 | 23 | class cpg_settings(bDialog): 24 | 25 | def __init__(self, GridFrame,Caller,Debug=False): 26 | # 27 | self.initcomplete=False 28 | # 29 | self.dialogframe=GridFrame 30 | self.Caller=Caller 31 | self.Debug=Debug 32 | # 33 | self.frameborder=1 34 | # by module translations 35 | self.language=cpgui_language 36 | localedir=find_data_file('locale') 37 | self.lang = gettext.translation('cpgui', localedir=localedir, languages=[self.language]) 38 | self.lang.install() 39 | # 40 | self.InputFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Unit settings'),font=("Arial", 10, "bold")) 41 | self.InputFrame.grid(row=1,column=1,padx=8,pady=5,sticky=W) 42 | # 43 | self.SettingsPanel = {} 44 | # 45 | LT1 = Label(self.InputFrame,text='{:<27}'.format(_('Quantity')),font=("Arial", 12) ) 46 | LT1.grid(row=1,column=1,padx=8,sticky=W,pady=5) 47 | LT2 = Label(self.InputFrame,text='{:<27}'.format(_('Select Unit')),font=("Arial", 12) ) 48 | LT2.grid(row=1,column=2,padx=8,sticky=W,pady=5) 49 | LT3 = Label(self.InputFrame,text='{:<27}'.format(_('Current Unit')),font=("Arial", 12) ) 50 | LT3.grid(row=1,column=3,padx=8,sticky=W,pady=5) 51 | # 52 | self.SettingsInputPanel(self.InputFrame) 53 | self.initcomplete=True 54 | 55 | def SettingsInputPanel(self,GridFrame,Debug=False,tfont=("Arial", 10, "bold"),font=("Arial", 10)): 56 | # 57 | srow=2 58 | ordered_keys=['T','dT','p','D','v','H','S', 'Q', 'P', 'U', 'V', 'dv','kv','Cp','Cv','M', 'c', 'kxa', 'eta'] 59 | one=len(ordered_keys) 60 | two=len(sorted(units.keys())) 61 | if one==two : 62 | mylist=ordered_keys 63 | else: 64 | mylist=sorted(units.keys()) 65 | print('\nUnordered settings error : Length of ordered keys doesn\'t match number of quantities. edit ordered_keys in cpgui_settings.py to fix\n') 66 | for quant in mylist : 67 | self.SettingsPanel[quant] = [] 68 | Label(GridFrame,text='{:<27}'.format(label[quant]),font=font ).grid(row=srow,column=1,padx=8,sticky=W,pady=5) 69 | self.SettingsPanel[quant].append(StringVar()) 70 | self.SettingsPanel[quant][0].set(gui_unit[quant]) 71 | self.SettingsPanel[quant][0].trace("w", lambda name, index, mode, var=self.SettingsPanel[quant][0], key=quant: self.SettingsInputPanelUpdate(var, key)) 72 | cbox=ttk.Combobox(GridFrame, textvariable=self.SettingsPanel[quant][0],font=font) 73 | cbox.grid(row=srow,column=2,padx=8,sticky=W,pady=5) 74 | cbox['values'] = units[quant] 75 | I1=units[quant].index(gui_unit[quant]) 76 | cbox.current(I1) 77 | self.SettingsPanel[quant].append(Label(GridFrame,text='{:<20}'.format(gui_unit[quant]),font=font )) 78 | self.SettingsPanel[quant][-1].grid(row=srow,column=3,padx=8,sticky=W,pady=5) 79 | #print(type(self.SettingsPanel[quant][-1])) 80 | #self.SettingsPanel[quant].append(LU) 81 | srow+=1 82 | # 83 | if cpgui_config['debug']['ShowPanel'] : 84 | toggletext=_('Message Panel will be shown' ) 85 | else : 86 | toggletext=_('Message Panel will be hidden' ) 87 | 88 | self.Button_2 = Button(GridFrame,text=toggletext) 89 | self.Button_2.grid(row=srow,rowspan=1,column=2,pady=5,sticky=W,padx=8) 90 | self.Button_2.bind("", self.dbg_toggle) 91 | # 92 | srow+=1 93 | self.Button_1 = Button(GridFrame,text=_('Save for startup' )) 94 | self.Button_1.grid(row=srow,rowspan=1,column=1,pady=5,sticky=W,padx=8) 95 | self.Button_1.bind("", self.calculate) 96 | # 97 | 98 | 99 | # 100 | def SettingsInputPanelUpdate(self, sv,key): 101 | #print('SettingsInputPanelUpdate sv,key ',sv,key, sv.get()) 102 | if self.initcomplete : 103 | self.SettingsPanel[key][-1].config(text=str(sv.get()),fg='red') 104 | cpgui_config['units'][key] = str(sv.get()) 105 | 106 | def tabChangedEvent(self,event): 107 | self.ref=self.Caller.get_ref() 108 | 109 | def calculate(self,event): 110 | # 111 | if self.initcomplete : 112 | save_settings() 113 | 114 | def dbg_toggle(self,event): 115 | # 116 | if self.initcomplete : 117 | if cpgui_config['debug']['ShowPanel'] : 118 | cpgui_config['debug']['ShowPanel'] = False 119 | toggletext=_('Message Panel will be hidden' ) 120 | else : 121 | cpgui_config['debug']['ShowPanel'] = True 122 | toggletext=_('Message Panel will be shown' ) 123 | self.Button_2.config(text=toggletext) 124 | 125 | 126 | def Update(self): 127 | # 128 | pass 129 | 130 | class _Testdialog: 131 | 132 | def __init__(self, master): 133 | frame = Frame(master) 134 | frame.pack() 135 | self.Caller = master 136 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 137 | # 138 | self.ref='R134a' 139 | # 140 | App=cpg_settings(frame,self,Debug=True) 141 | 142 | def get_ref(self): 143 | return 'R134a' 144 | def get_language(self): 145 | return 'de' 146 | 147 | def main(): 148 | root = Tk() 149 | 150 | 151 | 152 | app = _Testdialog(root) 153 | root.mainloop() 154 | 155 | if __name__ == '__main__': 156 | main() 157 | -------------------------------------------------------------------------------- /cpgui_statepoint.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Feb 27 2015 16:45 4 | 5 | @author: mayers 6 | """ 7 | # 8 | #import matplotlib 9 | #matplotlib.use('TkAgg') 10 | import gettext 11 | import sys 12 | from tkinter import * 13 | from tkinter import ttk 14 | import CoolProp 15 | from CoolProp.CoolProp import PropsSI 16 | 17 | from cpgui_all import * 18 | 19 | class cpgStatepoint(myDialog): 20 | 21 | def __init__(self, GridFrame,Caller): 22 | # 23 | self.dialogframe=GridFrame 24 | # 25 | self.Caller=Caller# self.Caller=Caller 26 | # by module translations 27 | self.language=cpgui_language 28 | #print('Statepoint lang : ',self.language) 29 | localedir=find_data_file('locale') 30 | self.lang = gettext.translation('cpgStatePoint', localedir=localedir, languages=[self.language]) 31 | self.lang.install() 32 | # 33 | self.ref=Caller.get_ref() 34 | # 35 | self.frameborder=5 36 | # General data 37 | self.OutVal={} 38 | self.Value1=0 39 | self.Quantity1=' ' 40 | self.Value2=0 41 | self.Quantity2=' ' 42 | # 43 | self.choices=( label['T'], 44 | label['p'], 45 | label['D'], 46 | label['H'], 47 | label['S'], 48 | label['U'], 49 | label['Q'] 50 | ) 51 | self.symbols=('T','p','D','H','S','U','Q','M','c','dv') 52 | # 53 | self.ObenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Select entry txpes and input Values'),font=("Arial", 12)) 54 | self.ObenFrame.grid(row=1,column=1) 55 | # 56 | self.UntenFrame= LabelFrame(self.dialogframe,relief=GROOVE,bd=self.frameborder,text=_('Fluid data'),font=("Arial", 12)) 57 | self.UntenFrame.grid(row=2,column=1) 58 | # Line one input 59 | self.Line1L1 = Label(self.ObenFrame,text=_('Select input type #1'),font=("Arial", 12) ) 60 | self.Line1L1.grid(row=1,column=1,padx=8,sticky=W,pady=5) 61 | self.Line1L2 = Label(self.ObenFrame,text=_('Enter input Value #1'),font=("Arial", 12) ) 62 | self.Line1L2.grid(row=1,column=3,padx=8,sticky=W,pady=5) 63 | self.Line1L3 = Label(self.ObenFrame,text=_(' '),font=("Arial", 12) ) 64 | self.Line1L3.grid(row=1,column=5,padx=8,sticky=W,pady=5) 65 | # 66 | self.Line1E1 = Entry(self.ObenFrame,width="15",font=("Arial", 12)) 67 | self.Line1E1.grid(row=1,column=4,sticky=W,padx=8,pady=5) 68 | self.Line1E1_StringVar = StringVar() 69 | self.Line1E1.configure(textvariable=self.Line1E1_StringVar) 70 | #self.Line1E1_StringVar.set("101325") 71 | self.Line1E1_StringVar_traceName = self.Line1E1_StringVar.trace_variable("w", self.Line1E1_StringVar_Callback) 72 | # 73 | self.Line1S1_StringVar = StringVar() 74 | self.Line1S1_StringVar.set(label['p']) 75 | self.Line1S1_StringVar_traceName = self.Line1S1_StringVar.trace_variable("w",self.Line1S1_StringVar_Callback) 76 | 77 | self.Line1S1 = ttk.Combobox(self.ObenFrame, textvariable=self.Line1S1_StringVar,font=("Arial", 12)) 78 | self.Line1S1['values'] = self.choices 79 | self.Line1S1.grid(column=2,row=1,padx=8,sticky=W,pady=5) 80 | self.Line1S1.current(0) 81 | # Line two input 82 | self.Line2L1 = Label(self.ObenFrame,text=_('Select input type #2'),font=("Arial", 12) ) 83 | self.Line2L1.grid(row=2,column=1,padx=8,sticky=W,pady=5) 84 | self.Line2L2 = Label(self.ObenFrame,text=_('Enter input Value #2'),font=("Arial", 12) ) 85 | self.Line2L2.grid(row=2,column=3,padx=8,sticky=W,pady=5) 86 | self.Line2L3 = Label(self.ObenFrame,text=_('UUU'),font=("Arial", 12) ) 87 | self.Line2L3.grid(row=2,column=5,padx=8,sticky=W,pady=5) 88 | # 89 | self.Line2E1 = Entry(self.ObenFrame,width="15",font=("Arial", 12)) 90 | self.Line2E1.grid(row=2,column=4,sticky=W,padx=8,pady=5) 91 | self.Line2E1_StringVar = StringVar() 92 | self.Line2E1.configure(textvariable=self.Line2E1_StringVar) 93 | #self.Line2E1_StringVar.set("298") 94 | self.Line2E1_StringVar_traceName = self.Line2E1_StringVar.trace_variable("w", self.Line2E1_StringVar_Callback) 95 | # 96 | self.Line2S1_StringVar = StringVar() 97 | self.Line2S1_StringVar.set(label['p']) 98 | self.Line2S1_StringVar_traceName = self.Line2S1_StringVar.trace_variable("w",self.Line2S1_StringVar_Callback) 99 | 100 | self.Line2S1 = ttk.Combobox(self.ObenFrame, textvariable=self.Line2S1_StringVar,font=("Arial", 12)) 101 | self.Line2S1['values'] = self.choices 102 | self.Line2S1.grid(column=2,row=2,padx=8,sticky=W,pady=5) 103 | self.Line2S1.current(1) 104 | # 105 | self.Button_1 = Button(self.ObenFrame,text=_('Calculate' )) 106 | self.Button_1.grid(row=1,rowspan=2,column=6,pady=5,sticky=W,padx=8) 107 | self.Button_1.bind("", self.calculate) 108 | # 109 | # Textbox 110 | # 111 | self.statetext='' 112 | lbframe1 = Frame( self.UntenFrame ) 113 | self.Text_1_frame = lbframe1 114 | scrollbar1 = Scrollbar(lbframe1, orient=VERTICAL) 115 | self.Text_1 = Text(lbframe1, width="110", height="20", yscrollcommand=scrollbar1.set) 116 | scrollbar1.config(command=self.Text_1.yview) 117 | scrollbar1.pack(side=RIGHT, fill=Y) 118 | self.Text_1.pack(side=LEFT, fill=BOTH, expand=1) 119 | self.Text_1_frame.grid(row=1,column=1,columnspan=1,padx=2,sticky=W+E,pady=4) 120 | self.Text_1.delete(1.0, END) 121 | self.Text_1.insert(END, self.statetext) 122 | 123 | # Line 1 Callbacks 124 | def Line1S1_StringVar_Callback(self, varName, index, mode): 125 | # 126 | long_quant=self.Line1S1_StringVar.get() 127 | # 128 | mykey=' ' 129 | for key in label.keys(): 130 | if label[key] == long_quant: 131 | self.Line1L3.config(text=GUI_UNIT(key)) 132 | self.Quantity1=key 133 | # Now set default Values 134 | self.Line1E1_StringVar.set(default[GUI_UNIT(self.Quantity1)]) 135 | self.Value1=TO_SI(self.Quantity1,float(self.Line1E1_StringVar.get().replace(',','.'))) 136 | 137 | def Line1E1_StringVar_Callback(self, varName, index, mode): 138 | # 139 | try : 140 | self.Value1=TO_SI(self.Quantity1,float(self.Line1E1_StringVar.get().replace(',','.'))) 141 | except ValueError : 142 | pass 143 | 144 | def Line2S1_StringVar_Callback(self, varName, index, mode): 145 | # 146 | long_quant=self.Line2S1_StringVar.get() 147 | # 148 | mykey=' ' 149 | for key in label.keys(): 150 | if label[key] == long_quant: 151 | self.Line2L3.config(text=GUI_UNIT(key)) 152 | self.Quantity2=key 153 | # Now set default Values 154 | self.Line2E1_StringVar.set(default[GUI_UNIT(self.Quantity2)]) 155 | self.Value2=TO_SI(self.Quantity2,float(self.Line2E1_StringVar.get().replace(',','.'))) 156 | 157 | def Line2E1_StringVar_Callback(self, varName, index, mode): 158 | # 159 | try: 160 | self.Value2=TO_SI(self.Quantity2,float(self.Line2E1_StringVar.get().replace(',','.'))) 161 | except ValueError : 162 | pass 163 | 164 | def calculate(self,event): 165 | # 166 | GoOn=True 167 | # 168 | self.Text_1.delete(1.0, END) 169 | self.ref=self.Caller.get_ref() 170 | # 171 | 172 | for k in self.symbols: 173 | try : 174 | self.OutVal[k]=SI_TO(k,PropsSI(cpcode[k],cpcode[self.Quantity1],self.Value1,cpcode[self.Quantity2],self.Value2,self.ref)) 175 | except ValueError : 176 | self.Text_1.insert(END, _('Calculation error, check your inputs!')) 177 | GoOn=False 178 | break 179 | # 180 | if GoOn : 181 | Phase=CoolProp.CoolProp.PhaseSI(cpcode[self.Quantity1],self.Value1,cpcode[self.Quantity2],self.Value2,self.ref) 182 | # 183 | self.var_ref=_('Statepoint calculation for %12s \n\n') 184 | self.lines=[] 185 | myline=self.var_ref%self.ref 186 | self.lines.append(myline) 187 | # 188 | for sy in self.symbols : 189 | one='{:<27}'.format(label[sy]) 190 | two='{:16.4f}'.format(self.OutVal[sy]) 191 | if sy =='Q': 192 | three='{:>10} {:<}\n'.format(GUI_UNIT(sy),Phase) 193 | else : 194 | three='{:>10}\n'.format(GUI_UNIT(sy)) 195 | myline=one+two+three 196 | self.lines.append(myline) 197 | # 198 | for l in self.lines : 199 | self.Text_1.insert(END, l) 200 | 201 | def Update(self): 202 | # 203 | pass 204 | 205 | class _Testdialog: 206 | 207 | def __init__(self, master): 208 | frame = Frame(master) 209 | frame.pack() 210 | self.Caller = master 211 | self.x, self.y, self.w, self.h = -1,-1,-1,-1 212 | # 213 | self.ref='R134a' 214 | # 215 | App=cpgStatepoint(frame,self) 216 | 217 | def get_ref(self): 218 | return 'R134a' 219 | def get_language(self): 220 | return 'de' 221 | 222 | def main(): 223 | root = Tk() 224 | 225 | app = _Testdialog(root) 226 | root.mainloop() 227 | 228 | if __name__ == '__main__': 229 | main() 230 | 231 | -------------------------------------------------------------------------------- /create_EXE.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon 02 of Feb 10:42:17 2015 4 | 5 | Build script to create a Windows .exe file 6 | 7 | @author: mayers 8 | """ 9 | 10 | from cx_Freeze import setup, Executable 11 | import matplotlib 12 | import site 13 | import sys 14 | import gettext 15 | 16 | site_packages_dir=site.getsitepackages() 17 | 18 | if sys.platform == "win32": 19 | base = "Win32GUI" 20 | scipy_ufuncs=site_packages_dir[-1]+'\\scipy\\special\\_ufuncs.pyd' 21 | 22 | #includefiles = ["CoolPropLogo.ico","msvcp100.dll","msvcr100.dll"] 23 | includefiles = ["CoolPropLogo.ico"] 24 | excludefiles = [] 25 | 26 | includes = [] 27 | 28 | build_exe_options = { 'packages': ['scipy'], 29 | "includes":["matplotlib.backends.backend_tkagg"], 30 | "include_files": [(scipy_ufuncs, 31 | '_ufuncs.pyd'), 32 | "CoolPropLogo.ico", 33 | "simplecycle.png", 34 | "cycle2.png", 35 | "cpgui.dat", 36 | "locale", 37 | (matplotlib.get_data_path(), 38 | "mpl-data")] 39 | } 40 | 41 | cpgui = Executable( 42 | script = "cpgui.py", 43 | initScript = None, 44 | base = base, 45 | targetName = "CPGUI.exe", 46 | compress = True, 47 | copyDependentFiles = True, 48 | appendScriptToExe = False, 49 | appendScriptToLibrary = False, 50 | icon = "CoolPropLogo.ico" 51 | ) 52 | 53 | setup( 54 | name = "CoolProp GUI", 55 | version = "1.0", 56 | author = 'Reiner Mayers', 57 | description = "GUI for Coolprop", 58 | options={"build_exe": build_exe_options}, 59 | #options = {"build_exe": {"includes":includes,'include_files':includefiles}}, 60 | executables = [cpgui] 61 | ) 62 | -------------------------------------------------------------------------------- /cycle2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/cycle2.png -------------------------------------------------------------------------------- /howto.txt: -------------------------------------------------------------------------------- 1 | 2 | Python install : 3 | 4 | Windows : 5 | 6 | If you do not have a binary package install the following : 7 | This manual is for python 32 bit 8 | Only use 64 bit if you find all packages for windows, numpy is sometimes difficult to get in 64 bit 9 | 10 | 1. Download python 3.4.2 or later from https://www.python.org/ 11 | install it to e.G. C:\CPGUI_PY34 12 | (You do not need to set the path in the install options when asked) 13 | 2. open a cmd and type 'cd c:' 14 | 3. type 'cd \CPGUI_PY34\scripts' 15 | 4. type 'mkdir downloads' 16 | 5. type 'pip install wheel' (installs the wheel installer ) 17 | 6. Install other requirements with pip, type 'pip install pyparsing six pytz python-dateutil pillow' 18 | 6. Open your internet browser 19 | 7. open the download site http://www.lfd.uci.edu/~gohlke/pythonlibs/ 20 | 8. download matplotlib‑1.4.3‑cp34‑none‑win_amd64.whl into directory c:\CPGUI_PY34\scripts\downloads 21 | 9. download numpy binary from sourceforge http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python3.4.exe/download 22 | 10. Install numpy with double click on numpy-1.9.2-win32-superpack-python3.4.exe 23 | 11. type 'wheel install downloads\matplotlib-1.4.3-cp34-none-win32.whl' 24 | 12. download CoolProp from http://www.coolprop.dreamhosters.com:8010/binaries/Python/CoolProp-5.1.0.win32-py3.4.exe 25 | 13. Install CoolProp with a double klick on CoolProp-5.1.0.win32-py3.4.exe 26 | 14. Coolprop Plots require SciPy, download it from http://www.lfd.uci.edu/~gohlke/pythonlibs/ scipy-0.15.1-cp34-none-win32.whl 27 | 15. copy it to the downloads folder 28 | 16. type 'wheel install downloads\scipy-0.15.1-cp34-none-win32.whl 29 | 30 | If you want a windows binary install cx_freeze too : 31 | 17. pip install cx_freeze 32 | run 'python3 create_EXE.py build' to create a windows executable 33 | DO NOT USE VIRTUALENV FOR CX_FREEZE OR NSIS 34 | 35 | If you want to create a setup.exe for the binary : 36 | 18. install NSIS 2.4.6 from http://nsis.sourceforge.net/Main_Page 37 | 19. install HM NSIS EDIT from http://hmne.sourceforge.net/ 38 | 20. open the provided cpgui.nsis with the HM NSIS EDIT and compile it 39 | result will be a setup.exe to install on windows 40 | 41 | 42 | Ubuntu : 43 | 44 | 1. Check python3 version, type 'python3 --version' on a command line (terminal) 45 | 2. If you get a version python 3 is already installed 46 | 3. Use the provided requirements.txt file 47 | 4. type 'pip3 install -r requirements.txt' (you need superuser privs) 48 | 49 | using a virtualenv : 50 | 1. check if cython is installed, type 51 | 2. type cython --version 52 | 3. If cython is not installed install it using your software manager/packet manager 53 | 4. set up a virtualenv (into the directory GUI or wherever you want it) 54 | type virtualenv --no-site-packages --distribute -p /usr/bin/python3 GUI 55 | 5. type source GUI/bin/activate 56 | 6. type pip install -r requirements.txt 57 | 7. type cd GUI 58 | 8. git clone https://github.com/CoolProp/GUI 59 | 9. type python GUI/cpgui.py and the CoolProp GUI will start 60 | 61 | Additional hint for Pillow : 62 | 63 | The TK toolkit is the library behind tkinter. 64 | Pillow/tkinter imaging requires a proper TK library to work, usually it is in the Python distribution. 65 | If you see errors from PIL / Pillow containing tk.call, tk , tkinter and so on, install Pillow 66 | from a binary that contains everything neccessary (http://www.lfd.uci.edu/~gohlke/pythonlibs/) or 67 | install the latest tcl/tk development kit from your distribution or from active state and then 68 | recompile/reinstall Pillow. On Ubuntu and OS/X I use tcl/tk 8.6 dev kits 69 | 70 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015 Reiner J. Mayers 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included 11 | in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 14 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 15 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 16 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 17 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgDiagram.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgDiagram.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgDiagram.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 15:37+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Poedit-SourceCharset: UTF-8\n" 20 | 21 | #: cpgui_diagram.py:59 22 | msgid "Available Diagrams" 23 | msgstr "Diagramme" 24 | 25 | #: cpgui_diagram.py:62 26 | msgid "Diagram" 27 | msgstr "Diagramm" 28 | 29 | #: cpgui_diagram.py:207 30 | msgid "Pressure in kPa" 31 | msgstr "Druck in kPa" 32 | 33 | #: cpgui_diagram.py:208 34 | msgid "Specific enthalpy in kJ/kg" 35 | msgstr "spezifische Enthalpie in kJ/kg" 36 | 37 | #: cpgui_diagram.py:288 38 | msgid "Only Coolprop single components can be used for plots!" 39 | msgstr "Plot's funktionieren nur mit Coolprop Fluiden" 40 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgSatTable.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgSatTable.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgSatTable.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 16:36+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 16:38+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | 20 | #: cpgui_sattable.py:40 21 | msgid "Refrigerant : %10s \n" 22 | msgstr "Kältemittel : %10s \n" 23 | 24 | #: cpgui_sattable.py:41 25 | msgid "Saturated Table calculation for %10s \n" 26 | msgstr "Sättigungsdampftafel für %10s \n" 27 | 28 | #: cpgui_sattable.py:47 29 | msgid "Pressure [Pa]" 30 | msgstr "Druck [Pa]" 31 | 32 | #: cpgui_sattable.py:48 33 | msgid "Temperature [K]" 34 | msgstr "Temperatur [K]" 35 | 36 | #: cpgui_sattable.py:50 37 | msgid "Pure fluid" 38 | msgstr "Reinstoff" 39 | 40 | #: cpgui_sattable.py:51 41 | msgid "Mixture" 42 | msgstr "Gemisch" 43 | 44 | #: cpgui_sattable.py:57 45 | msgid "Select order type and input Values" 46 | msgstr "Wählen sie die Ordnungsgrößen und Werte" 47 | 48 | #: cpgui_sattable.py:60 49 | msgid "Fluid data" 50 | msgstr "Fluid daten" 51 | 52 | #: cpgui_sattable.py:63 53 | msgid "Select order type" 54 | msgstr "Ordnungsgröße auswählen" 55 | 56 | #: cpgui_sattable.py:65 57 | msgid " min value" 58 | msgstr "min. Wert" 59 | 60 | #: cpgui_sattable.py:67 61 | msgid " max value" 62 | msgstr "max. Wert" 63 | 64 | #: cpgui_sattable.py:69 65 | msgid " step size" 66 | msgstr "Schrittweite" 67 | 68 | #: cpgui_sattable.py:102 69 | msgid "Calculate" 70 | msgstr "Berechnen" 71 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgStatePoint.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgStatePoint.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgStatePoint.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 14:20+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 16:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | 20 | #: cpgui_statepoint.py:41 21 | msgid "Density [kg/m³]" 22 | msgstr "Dichte [kg/m ³]" 23 | 24 | #: cpgui_statepoint.py:42 cpgui_statepoint.py:69 cpgui_statepoint.py:92 25 | msgid "Pressure [Pa]" 26 | msgstr "Druck [Pa]" 27 | 28 | #: cpgui_statepoint.py:43 29 | msgid "Temperature [K]" 30 | msgstr "Temperatur" 31 | 32 | #: cpgui_statepoint.py:44 33 | msgid "Enthalpy [J/kg]" 34 | msgstr "Enthalpie [J / kg]" 35 | 36 | #: cpgui_statepoint.py:45 37 | msgid "Entropy [J/kg/K]" 38 | msgstr "Entropie [J/kg/K]" 39 | 40 | #: cpgui_statepoint.py:46 41 | msgid "Internal Energy [J/kg]" 42 | msgstr "Innere Energie [J/kg]" 43 | 44 | #: cpgui_statepoint.py:47 45 | msgid "Vapour Quality [kg/kg]" 46 | msgstr "Dampfgehalt [kg/kg]" 47 | 48 | #: cpgui_statepoint.py:50 49 | msgid "Select entry txpes and input Values" 50 | msgstr "Wählen sie die Eingabegrößen und Werte" 51 | 52 | #: cpgui_statepoint.py:53 53 | msgid "Fluid data" 54 | msgstr "Fluid daten" 55 | 56 | #: cpgui_statepoint.py:56 57 | msgid "Select input type #1" 58 | msgstr "Eingabegröße Nr. 1" 59 | 60 | #: cpgui_statepoint.py:58 61 | msgid "Enter input Value #1" 62 | msgstr "Wert Nr. 1" 63 | 64 | #: cpgui_statepoint.py:79 65 | msgid "Select input type #2" 66 | msgstr "Eingabegröße Nr. 2" 67 | 68 | #: cpgui_statepoint.py:81 69 | msgid "Enter input Value #2" 70 | msgstr "Wert Nr. 2" 71 | 72 | #: cpgui_statepoint.py:100 73 | msgid "Calculate" 74 | msgstr "Berechnen" 75 | 76 | #: cpgui_statepoint.py:148 77 | msgid "" 78 | "Statepoint calculation for %12s \n" 79 | "\n" 80 | msgstr "" 81 | "Zustandsberechnung für %12s \n" 82 | "\n" 83 | 84 | #: cpgui_statepoint.py:149 85 | msgid "" 86 | "Temperature %16.4f K \n" 87 | " %16.4f degC \n" 88 | msgstr "" 89 | "Temperatur %16.4f K \n" 90 | " %16.4f °C \n" 91 | 92 | #: cpgui_statepoint.py:150 93 | msgid "Pressure %16.4f Pa \n" 94 | msgstr "Druck %16.4f Pa \n" 95 | 96 | #: cpgui_statepoint.py:151 97 | msgid "Quality %s \n" 98 | msgstr "Dampfgehalt %s \n" 99 | 100 | #: cpgui_statepoint.py:152 101 | msgid "Density %16.4f kg/m*m*m \n" 102 | msgstr "Dichte %16.4f kg/m³\n" 103 | 104 | #: cpgui_statepoint.py:153 105 | msgid "Enthalpy %16.4f J/kg \n" 106 | msgstr "Enthalpie %16.4f J/kg \n" 107 | 108 | #: cpgui_statepoint.py:154 109 | msgid "Entropy %16.4f J/kg/K \n" 110 | msgstr "Entropie %16.4f J/kg/K \n" 111 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle1.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpg_cycle1.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle1.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 13:40+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-26 16:05+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | 20 | #: cpgui_cycle1.py:42 21 | msgid "Evaporator" 22 | msgstr "Verdampfer" 23 | 24 | #: cpgui_cycle1.py:46 cpgui_cycle1.py:55 25 | msgid "Temperature" 26 | msgstr "Temperatur" 27 | 28 | #: cpgui_cycle1.py:47 29 | msgid "Superheat" 30 | msgstr "Überhitzung" 31 | 32 | #: cpgui_cycle1.py:48 cpgui_cycle1.py:57 33 | msgid "Pressure drop" 34 | msgstr "Druckverlust" 35 | 36 | #: cpgui_cycle1.py:49 37 | msgid "Capacity" 38 | msgstr "Kälteleistung" 39 | 40 | #: cpgui_cycle1.py:51 41 | msgid "Condenser" 42 | msgstr "Verflüssiger" 43 | 44 | #: cpgui_cycle1.py:56 45 | msgid "Subcooling" 46 | msgstr "Unterkühlung" 47 | 48 | #: cpgui_cycle1.py:60 49 | msgid "Suction line SL / Discharge line DL" 50 | msgstr "Saugleitung SL / Druckleitung DL" 51 | 52 | #: cpgui_cycle1.py:64 53 | msgid "SL superheat" 54 | msgstr "SL Überhitzung" 55 | 56 | #: cpgui_cycle1.py:65 57 | msgid "SL Pressure drop" 58 | msgstr "SL Druckverlust" 59 | 60 | #: cpgui_cycle1.py:66 61 | msgid "DL Temperature loss" 62 | msgstr "DL Enthitzung" 63 | 64 | #: cpgui_cycle1.py:67 65 | msgid "DL Pressure drop" 66 | msgstr "DL Druckverlust" 67 | 68 | #: cpgui_cycle1.py:69 69 | msgid "Compressor" 70 | msgstr "Verdichter" 71 | 72 | #: cpgui_cycle1.py:73 73 | msgid "Isentropic efficiency" 74 | msgstr "Isentroper Gütegrad" 75 | 76 | #: cpgui_cycle1.py:86 77 | msgid "End of SL / compressor intake" 78 | msgstr "Saugleitungsende / Verdichtereingang" 79 | 80 | #: cpgui_cycle1.py:87 81 | msgid "Isentropic compression" 82 | msgstr "Isentrope Verdichtung" 83 | 84 | #: cpgui_cycle1.py:88 85 | msgid "Real compression" 86 | msgstr "Reale Verdichtung" 87 | 88 | #: cpgui_cycle1.py:89 89 | msgid "Condenser inlet" 90 | msgstr "Verflüssiger Eingang" 91 | 92 | #: cpgui_cycle1.py:90 93 | msgid "Dewpoint inside condenser" 94 | msgstr "Taupunkt im Verflüssiger" 95 | 96 | #: cpgui_cycle1.py:91 97 | msgid "Average between 3'' and 4'" 98 | msgstr "Mittelwert 3'' und 4'" 99 | 100 | #: cpgui_cycle1.py:92 101 | msgid "Bubblepoint inside condenser" 102 | msgstr "Siedepunkt im Verflüssiger" 103 | 104 | #: cpgui_cycle1.py:93 105 | msgid "Exit condenser" 106 | msgstr "Verflüssigerausgang" 107 | 108 | #: cpgui_cycle1.py:94 109 | msgid "Evaporator entry" 110 | msgstr "Verdampfereingang" 111 | 112 | #: cpgui_cycle1.py:95 113 | msgid "Average between 5 and 6''" 114 | msgstr "Mittelwert 5 und 6''" 115 | 116 | #: cpgui_cycle1.py:96 117 | msgid "Dewpoint inside evaporator" 118 | msgstr "Taupunkt im Verdampfer" 119 | 120 | #: cpgui_cycle1.py:97 121 | msgid "Exit evaporator" 122 | msgstr "Verdampferausgang" 123 | 124 | #: cpgui_cycle1.py:101 125 | msgid "Cycle inputs" 126 | msgstr "Angaben zum Kreislauf" 127 | 128 | #: cpgui_cycle1.py:103 129 | msgid "Cycle outputs" 130 | msgstr "Berechnete Werte" 131 | 132 | #: cpgui_cycle1.py:111 133 | msgid " Calculate " 134 | msgstr "Berechnen" 135 | 136 | #: cpgui_cycle1.py:124 137 | msgid "Cycle information" 138 | msgstr "Angaben zum Kreislauf" 139 | 140 | #: cpgui_cycle1.py:126 141 | msgid "Statepoints" 142 | msgstr "Zustandspunkte" 143 | 144 | #: cpgui_cycle1.py:144 145 | msgid "Output table" 146 | msgstr "Tabelle mit Zustandspunkten" 147 | 148 | #: cpgui_cycle1.py:211 149 | msgid "" 150 | "Simple DX cycle statepoint Table for %s\n" 151 | "\n" 152 | msgstr "" 153 | "Tabelle mit Zustandspunkten für %s\n" 154 | "\n" 155 | 156 | #: cpgui_cycle1.py:338 157 | msgid "" 158 | "\n" 159 | "Power calculations | Key performance values\n" 160 | msgstr "" 161 | "\n" 162 | "Leistungsberechnung | Eckdaten \n" 163 | 164 | #: cpgui_cycle1.py:339 165 | msgid "Evaporator %8.2f kW | Pressure ratio %8.2f (%8.2f)\n" 166 | msgstr "Verdampfer %8.2f kW | Druckverhältnis %8.2f (%8.2f)\n" 167 | 168 | #: cpgui_cycle1.py:340 169 | msgid "Condenser %8.2f kW | Pressure difference %8.2f (%8.2f) bar\n" 170 | msgstr "Verflüssiger %8.2f kW | Druckdifferenz %8.2f (%8.2f) bar\n" 171 | 172 | #: cpgui_cycle1.py:341 173 | msgid "Suction line %8.2f kW | Mass flow %8.6f g/s \n" 174 | msgstr "Saugleitung %8.2f kW | Massestrom %8.6f g/s \n" 175 | 176 | #: cpgui_cycle1.py:342 177 | msgid "Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n" 178 | msgstr "Heißgasleitung %8.2f kW | Volumenstrom Saugleit. %8.4f m³/h \n" 179 | 180 | #: cpgui_cycle1.py:343 181 | msgid "Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n" 182 | msgstr "Verdichter %8.2f kW | Volumetr. Kälteleistung %8.2f kJ/m³ \n" 183 | 184 | #: cpgui_cycle1.py:344 185 | msgid " | COP %8.2f \n" 186 | msgstr " | COP %8.2f \n" 187 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle2.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpg_cycle2.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle2.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 13:56+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 14:08+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | 20 | #: cpgui_cycle2.py:43 21 | msgid "Evaporator" 22 | msgstr "Verdampfer" 23 | 24 | #: cpgui_cycle2.py:47 cpgui_cycle2.py:56 25 | msgid "Temperature" 26 | msgstr "Temperatur" 27 | 28 | #: cpgui_cycle2.py:48 29 | msgid "Superheat" 30 | msgstr "Überhitzung" 31 | 32 | #: cpgui_cycle2.py:49 cpgui_cycle2.py:58 33 | msgid "Pressure drop" 34 | msgstr "Druckverlust" 35 | 36 | #: cpgui_cycle2.py:50 37 | msgid "Capacity" 38 | msgstr "Kälteleistung" 39 | 40 | #: cpgui_cycle2.py:52 41 | msgid "Condenser" 42 | msgstr "Verflüssiger" 43 | 44 | #: cpgui_cycle2.py:57 45 | msgid "Subcooling" 46 | msgstr "Unterkühlung" 47 | 48 | #: cpgui_cycle2.py:61 49 | msgid "Suction line SL / Discharge line DL" 50 | msgstr "Saugleitung SL / Druckleitung DL" 51 | 52 | #: cpgui_cycle2.py:65 53 | msgid "SL superheat" 54 | msgstr "SL Überhitzung" 55 | 56 | #: cpgui_cycle2.py:66 57 | msgid "SL Pressure drop" 58 | msgstr "SL Druckverlust" 59 | 60 | #: cpgui_cycle2.py:67 61 | msgid "DL Temperature loss" 62 | msgstr "DL Enthitzung" 63 | 64 | #: cpgui_cycle2.py:68 65 | msgid "DL Pressure drop" 66 | msgstr "DL Druckverlust" 67 | 68 | #: cpgui_cycle2.py:70 69 | msgid "Compressor" 70 | msgstr "Verdichter" 71 | 72 | #: cpgui_cycle2.py:74 73 | msgid "Isentropic efficiency" 74 | msgstr "Isentroper Gütegrad" 75 | 76 | #: cpgui_cycle2.py:76 77 | msgid "Internal heat exchanger" 78 | msgstr "Innerer Wärmeübertrager" 79 | 80 | #: cpgui_cycle2.py:81 81 | msgid "Gas pressure drop" 82 | msgstr "Druckverlust Gas" 83 | 84 | #: cpgui_cycle2.py:93 85 | msgid "End of SL / compressor intake" 86 | msgstr "Saugleitungsende / Verdichtereingang" 87 | 88 | #: cpgui_cycle2.py:94 89 | msgid "Isentropic compression" 90 | msgstr "Isentrope Verdichtung" 91 | 92 | #: cpgui_cycle2.py:95 93 | msgid "Real compression" 94 | msgstr "Reale Verdichtung" 95 | 96 | #: cpgui_cycle2.py:96 97 | msgid "Condenser inlet" 98 | msgstr "Verflüssiger Eingang" 99 | 100 | #: cpgui_cycle2.py:97 101 | msgid "Dewpoint inside condenser" 102 | msgstr "Taupunkt im Verflüssiger" 103 | 104 | #: cpgui_cycle2.py:98 105 | msgid "Average between 3'' and 4'" 106 | msgstr "Mittelwert 3'' und 4'" 107 | 108 | #: cpgui_cycle2.py:99 109 | msgid "Bubblepoint inside condenser" 110 | msgstr "Siedepunkt im Verflüssiger" 111 | 112 | #: cpgui_cycle2.py:100 113 | msgid "Exit condenser" 114 | msgstr "Verflüssigerausgang" 115 | 116 | #: cpgui_cycle2.py:101 cpgui_cycle2.py:106 117 | msgid "Exit Heat exchanger" 118 | msgstr "Ausgang Wärmeübertrager" 119 | 120 | #: cpgui_cycle2.py:102 121 | msgid "Evaporator entry" 122 | msgstr "Verdampfereingang" 123 | 124 | #: cpgui_cycle2.py:103 125 | msgid "Average between 6 and 7''" 126 | msgstr "Mittelwert 6 und 7''" 127 | 128 | #: cpgui_cycle2.py:104 129 | msgid "Dewpoint inside evaporator" 130 | msgstr "Taupunkt im Verdampfer" 131 | 132 | #: cpgui_cycle2.py:105 133 | msgid "Exit evaporator / Intake heat exchanger" 134 | msgstr "Verdampfer aus / Wärmeübertrager ein" 135 | 136 | #: cpgui_cycle2.py:110 137 | msgid "Cycle inputs" 138 | msgstr "Angaben zum Kreislauf" 139 | 140 | #: cpgui_cycle2.py:112 141 | msgid "Cycle outputs" 142 | msgstr "Berechnete Werte" 143 | 144 | #: cpgui_cycle2.py:120 145 | msgid " Calculate " 146 | msgstr "Berechnen" 147 | 148 | #: cpgui_cycle2.py:133 149 | msgid "Cycle information" 150 | msgstr "Angaben zum Kreislauf" 151 | 152 | #: cpgui_cycle2.py:135 153 | msgid "Statepoints" 154 | msgstr "Zustandspunkte" 155 | 156 | #: cpgui_cycle2.py:153 157 | msgid "Output table" 158 | msgstr "Tabelle mit Zustandspunkten" 159 | 160 | #: cpgui_cycle2.py:225 161 | msgid "" 162 | "Simple DX cycle statepoint Table for %s\n" 163 | "\n" 164 | msgstr "" 165 | "Tabelle mit Zustandspunkten für %s\n" 166 | "\n" 167 | 168 | #: cpgui_cycle2.py:226 169 | msgid " Point | t | p | v | h | s | x | Description \n" 170 | msgstr " Punkt | t | p | v | h | s | x | Beschreibung \n" 171 | 172 | #: cpgui_cycle2.py:437 173 | msgid "" 174 | "\n" 175 | "Power calculations | Key performance values\n" 176 | msgstr "" 177 | "\n" 178 | "Leistungsberechnung | Eckdaten \n" 179 | 180 | #: cpgui_cycle2.py:438 181 | msgid "Evaporator %8.2f kW | Pressure ratio %8.2f\n" 182 | msgstr "Verdampfer %8.2f kW | Druckverhältnis %8.2f \n" 183 | 184 | #: cpgui_cycle2.py:439 185 | msgid "Condenser %8.2f kW | Pressure difference %8.2f bar\n" 186 | msgstr "Verflüssiger %8.2f kW | Druckdifferenz %8.2f bar\n" 187 | 188 | #: cpgui_cycle2.py:440 189 | msgid "Suction line %8.2f kW | Mass flow %8.6f g/s \n" 190 | msgstr "Saugleitung %8.2f kW | Massestrom %8.6f g/s \n" 191 | 192 | #: cpgui_cycle2.py:441 193 | msgid "Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n" 194 | msgstr "Heißgasleitung %8.2f kW | Volumenstrom Saugleitung %8.4f m³/h \n" 195 | 196 | #: cpgui_cycle2.py:442 197 | msgid "Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n" 198 | msgstr "Verdichter %8.2f kW | Volumetrische Kälteleistung %8.2f kJ/m³ \n" 199 | 200 | #: cpgui_cycle2.py:443 201 | msgid "Internal hx %8.2f kW | COP %8.2f \n" 202 | msgstr "Innerer Wärmeübertrager %8.2f kW | COP %8.2f \n" 203 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle3.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpg_cycle3.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpg_cycle3.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 13:56+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 14:08+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | 20 | #: cpgui_cycle2.py:43 21 | msgid "Evaporator" 22 | msgstr "Verdampfer" 23 | 24 | #: cpgui_cycle2.py:47 cpgui_cycle2.py:56 25 | msgid "Temperature" 26 | msgstr "Temperatur" 27 | 28 | #: cpgui_cycle2.py:48 29 | msgid "Superheat" 30 | msgstr "Überhitzung" 31 | 32 | #: cpgui_cycle2.py:49 cpgui_cycle2.py:58 33 | msgid "Pressure drop" 34 | msgstr "Druckverlust" 35 | 36 | #: cpgui_cycle2.py:50 37 | msgid "Capacity" 38 | msgstr "Kälteleistung" 39 | 40 | #: cpgui_cycle2.py:52 41 | msgid "Condenser" 42 | msgstr "Verflüssiger" 43 | 44 | #: cpgui_cycle2.py:57 45 | msgid "Subcooling" 46 | msgstr "Unterkühlung" 47 | 48 | #: cpgui_cycle2.py:61 49 | msgid "Suction line SL / Discharge line DL" 50 | msgstr "Saugleitung SL / Druckleitung DL" 51 | 52 | #: cpgui_cycle2.py:65 53 | msgid "SL superheat" 54 | msgstr "SL Überhitzung" 55 | 56 | #: cpgui_cycle2.py:66 57 | msgid "SL Pressure drop" 58 | msgstr "SL Druckverlust" 59 | 60 | #: cpgui_cycle2.py:67 61 | msgid "DL Temperature loss" 62 | msgstr "DL Enthitzung" 63 | 64 | #: cpgui_cycle2.py:68 65 | msgid "DL Pressure drop" 66 | msgstr "DL Druckverlust" 67 | 68 | #: cpgui_cycle2.py:70 69 | msgid "Compressor" 70 | msgstr "Verdichter" 71 | 72 | #: cpgui_cycle2.py:74 73 | msgid "Isentropic efficiency" 74 | msgstr "Isentroper Gütegrad" 75 | 76 | #: cpgui_cycle2.py:76 77 | msgid "Internal heat exchanger" 78 | msgstr "Innerer Wärmeübertrager" 79 | 80 | #: cpgui_cycle2.py:81 81 | msgid "Gas pressure drop" 82 | msgstr "Druckverlust Gas" 83 | 84 | #: cpgui_cycle2.py:93 85 | msgid "End of SL / compressor intake" 86 | msgstr "Saugleitungsende / Verdichtereingang" 87 | 88 | #: cpgui_cycle2.py:94 89 | msgid "Isentropic compression" 90 | msgstr "Isentrope Verdichtung" 91 | 92 | #: cpgui_cycle2.py:95 93 | msgid "Real compression" 94 | msgstr "Reale Verdichtung" 95 | 96 | #: cpgui_cycle2.py:96 97 | msgid "Condenser inlet" 98 | msgstr "Verflüssiger Eingang" 99 | 100 | #: cpgui_cycle2.py:97 101 | msgid "Dewpoint inside condenser" 102 | msgstr "Taupunkt im Verflüssiger" 103 | 104 | #: cpgui_cycle2.py:98 105 | msgid "Average between 3'' and 4'" 106 | msgstr "Mittelwert 3'' und 4'" 107 | 108 | #: cpgui_cycle2.py:99 109 | msgid "Bubblepoint inside condenser" 110 | msgstr "Siedepunkt im Verflüssiger" 111 | 112 | #: cpgui_cycle2.py:100 113 | msgid "Exit condenser" 114 | msgstr "Verflüssigerausgang" 115 | 116 | #: cpgui_cycle2.py:101 cpgui_cycle2.py:106 117 | msgid "Exit Heat exchanger" 118 | msgstr "Ausgang Wärmeübertrager" 119 | 120 | #: cpgui_cycle2.py:102 121 | msgid "Evaporator entry" 122 | msgstr "Verdampfereingang" 123 | 124 | #: cpgui_cycle2.py:103 125 | msgid "Average between 6 and 7''" 126 | msgstr "Mittelwert 6 und 7''" 127 | 128 | #: cpgui_cycle2.py:104 129 | msgid "Dewpoint inside evaporator" 130 | msgstr "Taupunkt im Verdampfer" 131 | 132 | #: cpgui_cycle2.py:105 133 | msgid "Exit evaporator / Intake heat exchanger" 134 | msgstr "Verdampfer aus / Wärmeübertrager ein" 135 | 136 | #: cpgui_cycle2.py:110 137 | msgid "Cycle inputs" 138 | msgstr "Angaben zum Kreislauf" 139 | 140 | #: cpgui_cycle2.py:112 141 | msgid "Cycle outputs" 142 | msgstr "Berechnete Werte" 143 | 144 | #: cpgui_cycle2.py:120 145 | msgid " Calculate " 146 | msgstr "Berechnen" 147 | 148 | #: cpgui_cycle2.py:133 149 | msgid "Cycle information" 150 | msgstr "Angaben zum Kreislauf" 151 | 152 | #: cpgui_cycle2.py:135 153 | msgid "Statepoints" 154 | msgstr "Zustandspunkte" 155 | 156 | #: cpgui_cycle2.py:153 157 | msgid "Output table" 158 | msgstr "Tabelle mit Zustandspunkten" 159 | 160 | #: cpgui_cycle2.py:225 161 | msgid "" 162 | "Simple DX cycle statepoint Table for %s\n" 163 | "\n" 164 | msgstr "" 165 | "Tabelle mit Zustandspunkten für %s\n" 166 | "\n" 167 | 168 | #: cpgui_cycle2.py:226 169 | msgid " Point | t | p | v | h | s | x | Description \n" 170 | msgstr " Punkt | t | p | v | h | s | x | Beschreibung \n" 171 | 172 | #: cpgui_cycle2.py:437 173 | msgid "" 174 | "\n" 175 | "Power calculations | Key performance values\n" 176 | msgstr "" 177 | "\n" 178 | "Leistungsberechnung | Eckdaten \n" 179 | 180 | #: cpgui_cycle2.py:438 181 | msgid "Evaporator %8.2f kW | Pressure ratio %8.2f\n" 182 | msgstr "Verdampfer %8.2f kW | Druckverhältnis %8.2f \n" 183 | 184 | #: cpgui_cycle2.py:439 185 | msgid "Condenser %8.2f kW | Pressure difference %8.2f bar\n" 186 | msgstr "Verflüssiger %8.2f kW | Druckdifferenz %8.2f bar\n" 187 | 188 | #: cpgui_cycle2.py:440 189 | msgid "Suction line %8.2f kW | Mass flow %8.6f g/s \n" 190 | msgstr "Saugleitung %8.2f kW | Massestrom %8.6f g/s \n" 191 | 192 | #: cpgui_cycle2.py:441 193 | msgid "Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n" 194 | msgstr "Heißgasleitung %8.2f kW | Volumenstrom Saugleitung %8.4f m³/h \n" 195 | 196 | #: cpgui_cycle2.py:442 197 | msgid "Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n" 198 | msgstr "Verdichter %8.2f kW | Volumetrische Kälteleistung %8.2f kJ/m³ \n" 199 | 200 | #: cpgui_cycle2.py:443 201 | msgid "Internal hx %8.2f kW | COP %8.2f \n" 202 | msgstr "Innerer Wärmeübertrager %8.2f kW | COP %8.2f \n" 203 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgbasics.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgbasics.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgbasics.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Coolprop GUI\n" 8 | "POT-Creation-Date: 2015-03-24 12:56+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 14:10+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: de_DE\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Poedit-SourceCharset: UTF-8\n" 20 | 21 | #: cpgui_basics.py:25 22 | msgid "Enter Mass fraction of components in kg/kg " 23 | msgstr "Massenanteil der Komponenten in kg/kg" 24 | 25 | #: cpgui_basics.py:75 26 | msgid "Refrigerant setup" 27 | msgstr "Konfiguration des Kältemittels" 28 | 29 | #: cpgui_basics.py:78 30 | msgid "Coolprop Refrigerant" 31 | msgstr "Kältemittel aus CoolProp" 32 | 33 | #: cpgui_basics.py:81 34 | msgid "Chosen Refrigerant :" 35 | msgstr "Gewähltes Kältemittel" 36 | 37 | #: cpgui_basics.py:84 38 | msgid "Refprop Refrigerant" 39 | msgstr "Kältemittel aus Refprop" 40 | 41 | #: cpgui_basics.py:90 42 | msgid "Use Refprop fluids for Refprop mixtures and Coolprop fluids for HEOS mixtures. Choose backend later" 43 | msgstr "Für Refprop Gemische nur Refprop Fluide und für HEOS Gemische nur CoolProp Fluide verwenden. Das Backend zuletzt wählen" 44 | 45 | #: cpgui_basics.py:143 46 | msgid "Mixture components" 47 | msgstr "Gemischkomponenten" 48 | 49 | #: cpgui_basics.py:146 50 | msgid "Add fluid to mixture" 51 | msgstr "Fluid zu Gemisch hinzufügen" 52 | 53 | #: cpgui_basics.py:150 54 | msgid "Delete mixture" 55 | msgstr "Gemisch löschen" 56 | 57 | #: cpgui_basics.py:154 58 | msgid "Define mixture" 59 | msgstr "Gemisch definieren" 60 | 61 | #: cpgui_basics.py:173 62 | msgid "Choose mixture backend" 63 | msgstr "Gemisch backend wählen" 64 | 65 | #: cpgui_basics.py:219 66 | msgid "Mixture composition" 67 | msgstr "Gemisch zusammensetzung" 68 | 69 | #: cpgui_basics.py:251 70 | msgid "Refprop not found" 71 | msgstr "Refprop Installation nicht gefunden" 72 | 73 | #: cpgui_basics.py:264 74 | msgid "Coolprop Version : %s \n" 75 | msgstr "Coolprop Version : %s \n" 76 | 77 | #: cpgui_basics.py:265 78 | msgid "Coolprop gitrevision : %s \n" 79 | msgstr "Coolprop gitrevision : %s \n" 80 | 81 | #: cpgui_basics.py:266 82 | msgid "Refrigerant : %s \n" 83 | msgstr "Kältemittel : %s \n" 84 | 85 | #: cpgui_basics.py:278 86 | msgid "Molar mass :%s \n" 87 | msgstr "Molmasse :%s \n" 88 | 89 | #: cpgui_basics.py:323 90 | msgid "" 91 | "Ozone depleting Substance !\n" 92 | "ODP : %2.3F \n" 93 | msgstr "" 94 | "Diese Substanz zerstört Ozon !\n" 95 | "ODP : %2.3F \n" 96 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgui.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgui.pot: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # SOME DESCRIPTIVE TITLE. 3 | # Copyright (C) YEAR ORGANIZATION 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "POT-Creation-Date: 2015-03-24 13:42+Mitteleuropäische Zeit\n" 10 | "PO-Revision-Date: 2015-03-24 15:41+0100\n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: 8bit\n" 14 | "Generated-By: pygettext.py 1.5\n" 15 | "Last-Translator: Reiner Mayers\n" 16 | "Language-Team: \n" 17 | "Language: de\n" 18 | "X-Generator: Poedit 1.7.5\n" 19 | "X-Poedit-SourceCharset: UTF-8\n" 20 | 21 | #: cpgui.py:74 22 | msgid "File" 23 | msgstr "Datei" 24 | 25 | #: cpgui.py:76 26 | msgid "Quit" 27 | msgstr "Verlassen" 28 | 29 | #: cpgui.py:79 30 | msgid "Settings" 31 | msgstr "Einstellungen" 32 | 33 | #: cpgui.py:81 34 | msgid "English" 35 | msgstr "Englisch" 36 | 37 | #: cpgui.py:82 38 | msgid "German" 39 | msgstr "Deutsch" 40 | 41 | #: cpgui.py:85 42 | msgid "Help" 43 | msgstr "Hilfe" 44 | 45 | #: cpgui.py:86 46 | msgid "About..." 47 | msgstr "Über" 48 | 49 | #: cpgui.py:107 50 | msgid "Select fluid" 51 | msgstr "Fluid auswählen" 52 | 53 | #: cpgui.py:110 54 | msgid "State Point" 55 | msgstr "Zustandspunkt" 56 | 57 | #: cpgui.py:113 cpgui.py:183 58 | msgid "Saturation table" 59 | msgstr "Sättigungstafel" 60 | 61 | #: cpgui.py:116 62 | msgid "Diagrams" 63 | msgstr "Diagramme" 64 | 65 | #: cpgui.py:119 66 | msgid "SimpleCycle" 67 | msgstr "Kältekreislauf" 68 | 69 | #: cpgui.py:123 70 | msgid "Cycle with heat exchanger" 71 | msgstr "Kreislauf mit innerem Wärmeübertrager" 72 | 73 | #: cpgui.py:137 74 | msgid "About" 75 | msgstr "Über" 76 | 77 | #: cpgui.py:154 78 | msgid "Language changed to %s " 79 | msgstr "Sprache auf %s gewechselt" 80 | 81 | #: cpgui.py:154 82 | msgid "Restart GUI for language change to take effect!" 83 | msgstr "Zum ändern der Sprache Programm jetzt neu starten" 84 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgui_all.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/de/LC_MESSAGES/cpgui_all.mo -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/cpgui_all.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-25 16:54+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-04-02 15:59+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 | "Last-Translator: Reiner Mayers\n" 16 | "Language-Team: \n" 17 | "Language: de\n" 18 | "X-Generator: Poedit 1.7.5\n" 19 | "X-Poedit-SourceCharset: UTF-8\n" 20 | 21 | #: cpgui_all.py:164 22 | msgid "Temperature" 23 | msgstr "Temperatur" 24 | 25 | #: cpgui_all.py:165 26 | msgid "Pressure" 27 | msgstr "Druck" 28 | 29 | #: cpgui_all.py:166 30 | msgid "Density" 31 | msgstr "Dichte" 32 | 33 | #: cpgui_all.py:167 34 | msgid "Specific Volume" 35 | msgstr "Spezifisches Volumen" 36 | 37 | #: cpgui_all.py:168 38 | msgid "Specific Enthalpy" 39 | msgstr "Spezifische Enthalpie" 40 | 41 | #: cpgui_all.py:169 42 | msgid "Specific Entropy" 43 | msgstr "Spezifische Entropie" 44 | 45 | #: cpgui_all.py:170 46 | msgid "Quality" 47 | msgstr "Dampfgehalt" 48 | 49 | #: cpgui_all.py:171 50 | msgid "Power" 51 | msgstr "Leistung" 52 | 53 | #: cpgui_all.py:172 54 | msgid "Internal Energy" 55 | msgstr "Innere Energie" 56 | 57 | #: cpgui_all.py:173 58 | msgid "Speed" 59 | msgstr "Geschwindigkeit" 60 | 61 | #: cpgui_all.py:174 62 | msgid "Dynamic Viscosity" 63 | msgstr "Dynamische Viskosität" 64 | 65 | #: cpgui_all.py:175 66 | msgid "Kinematic Viscosity" 67 | msgstr "Kinematische Viskosität" 68 | 69 | #: cpgui_all.py:176 70 | msgid "Isobaric heat Capacity" 71 | msgstr "Isobare Wärmekapazität" 72 | 73 | #: cpgui_all.py:177 74 | msgid "Iscochoric heat Capacity" 75 | msgstr "Isochore Wärmekapazität" 76 | 77 | #: cpgui_all.py:202 cpgui_all.py:227 78 | msgid "Units changed" 79 | msgstr "Einheiten geändert" 80 | 81 | #: cpgui_all.py:268 82 | msgid "Molar mass" 83 | msgstr "Molmasse" 84 | 85 | #: cpgui_all.py:268 86 | msgid "Speed of sound" 87 | msgstr "Schallgeschwindigkeit" 88 | 89 | #: cpgui_all.py:202 cpgui_all.py:227 90 | msgid "" 91 | "Units changed ! \n" 92 | "Restart GUI for Unit change to take effect!" 93 | msgstr "" 94 | "Die Einheiten wurden geändert!\n" 95 | "Starten Sie die Anwendung neu damit es wirksam wird!" 96 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgDiagram.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgDiagram.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgDiagram.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_diagram.py:59 20 | msgid "Available Diagrams" 21 | msgstr "" 22 | 23 | #: cpgui_diagram.py:62 24 | msgid "Diagram" 25 | msgstr "" 26 | 27 | #: cpgui_diagram.py:207 28 | msgid "Pressure in kPa" 29 | msgstr "" 30 | 31 | #: cpgui_diagram.py:208 32 | msgid "Specific enthalpy in kJ/kg" 33 | msgstr "" 34 | 35 | #: cpgui_diagram.py:288 36 | msgid "Only Coolprop single components can be used for plots!" 37 | msgstr "" 38 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgSatTable.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgSatTable.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgSatTable.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:59+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_sattable.py:44 cpgui_sattable.py:85 20 | msgid "Pressure [Pa]" 21 | msgstr "" 22 | 23 | #: cpgui_sattable.py:44 cpgui_sattable.py:151 cpgui_sattable.py:177 24 | msgid "Temperature [K]" 25 | msgstr "" 26 | 27 | #: cpgui_sattable.py:46 28 | msgid "Mixture" 29 | msgstr "" 30 | 31 | #: cpgui_sattable.py:46 32 | msgid "Pure fluid" 33 | msgstr "" 34 | 35 | #: cpgui_sattable.py:48 36 | msgid "Select order type and input Values" 37 | msgstr "" 38 | 39 | #: cpgui_sattable.py:51 40 | msgid "Fluid data" 41 | msgstr "" 42 | 43 | #: cpgui_sattable.py:54 44 | msgid "Select order type" 45 | msgstr "" 46 | 47 | #: cpgui_sattable.py:56 48 | msgid " min value" 49 | msgstr "" 50 | 51 | #: cpgui_sattable.py:58 52 | msgid " max value" 53 | msgstr "" 54 | 55 | #: cpgui_sattable.py:60 56 | msgid " step size" 57 | msgstr "" 58 | 59 | #: cpgui_sattable.py:93 60 | msgid "Calculate" 61 | msgstr "" 62 | 63 | #: cpgui_sattable.py:189 64 | msgid "Refrigerant : %s \n" 65 | msgstr "" 66 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgStatePoint.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgStatePoint.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgStatePoint.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:59+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle1.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpg_cycle1.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle1.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_cycle1.py:42 20 | msgid "Evaporator" 21 | msgstr "" 22 | 23 | #: cpgui_cycle1.py:46 cpgui_cycle1.py:55 24 | msgid "Temperature" 25 | msgstr "" 26 | 27 | #: cpgui_cycle1.py:47 28 | msgid "Superheat" 29 | msgstr "" 30 | 31 | #: cpgui_cycle1.py:48 cpgui_cycle1.py:57 32 | msgid "Pressure drop" 33 | msgstr "" 34 | 35 | #: cpgui_cycle1.py:49 36 | msgid "Capacity" 37 | msgstr "" 38 | 39 | #: cpgui_cycle1.py:51 40 | msgid "Condenser" 41 | msgstr "" 42 | 43 | #: cpgui_cycle1.py:56 44 | msgid "Subcooling" 45 | msgstr "" 46 | 47 | #: cpgui_cycle1.py:60 48 | msgid "Suction line SL / Discharge line DL" 49 | msgstr "" 50 | 51 | #: cpgui_cycle1.py:64 52 | msgid "SL superheat" 53 | msgstr "" 54 | 55 | #: cpgui_cycle1.py:65 56 | msgid "SL Pressure drop" 57 | msgstr "" 58 | 59 | #: cpgui_cycle1.py:66 60 | msgid "DL Temperature loss" 61 | msgstr "" 62 | 63 | #: cpgui_cycle1.py:67 64 | msgid "DL Pressure drop" 65 | msgstr "" 66 | 67 | #: cpgui_cycle1.py:69 68 | msgid "Compressor" 69 | msgstr "" 70 | 71 | #: cpgui_cycle1.py:73 72 | msgid "Isentropic efficiency" 73 | msgstr "" 74 | 75 | #: cpgui_cycle1.py:86 76 | msgid "End of SL / compressor intake" 77 | msgstr "" 78 | 79 | #: cpgui_cycle1.py:87 80 | msgid "Isentropic compression" 81 | msgstr "" 82 | 83 | #: cpgui_cycle1.py:88 84 | msgid "Real compression" 85 | msgstr "" 86 | 87 | #: cpgui_cycle1.py:89 88 | msgid "Condenser inlet" 89 | msgstr "" 90 | 91 | #: cpgui_cycle1.py:90 92 | msgid "Dewpoint inside condenser" 93 | msgstr "" 94 | 95 | #: cpgui_cycle1.py:91 96 | msgid "Average between 3'' and 4'" 97 | msgstr "" 98 | 99 | #: cpgui_cycle1.py:92 100 | msgid "Bubblepoint inside condenser" 101 | msgstr "" 102 | 103 | #: cpgui_cycle1.py:93 104 | msgid "Exit condenser" 105 | msgstr "" 106 | 107 | #: cpgui_cycle1.py:94 108 | msgid "Evaporator entry" 109 | msgstr "" 110 | 111 | #: cpgui_cycle1.py:95 112 | msgid "Average between 5 and 6''" 113 | msgstr "" 114 | 115 | #: cpgui_cycle1.py:96 116 | msgid "Dewpoint inside evaporator" 117 | msgstr "" 118 | 119 | #: cpgui_cycle1.py:97 120 | msgid "Exit evaporator" 121 | msgstr "" 122 | 123 | #: cpgui_cycle1.py:101 124 | msgid "Cycle inputs" 125 | msgstr "" 126 | 127 | #: cpgui_cycle1.py:103 128 | msgid "Cycle outputs" 129 | msgstr "" 130 | 131 | #: cpgui_cycle1.py:111 132 | msgid " Calculate " 133 | msgstr "" 134 | 135 | #: cpgui_cycle1.py:124 136 | msgid "Cycle information" 137 | msgstr "" 138 | 139 | #: cpgui_cycle1.py:126 140 | msgid "Statepoints" 141 | msgstr "" 142 | 143 | #: cpgui_cycle1.py:144 144 | msgid "Output table" 145 | msgstr "" 146 | 147 | #: cpgui_cycle1.py:211 148 | msgid "" 149 | "Simple DX cycle statepoint Table for %s\n" 150 | "\n" 151 | msgstr "" 152 | 153 | #: cpgui_cycle1.py:338 154 | msgid "" 155 | "\n" 156 | "Power calculations | Key performance values\n" 157 | msgstr "" 158 | 159 | #: cpgui_cycle1.py:339 160 | msgid "Evaporator %8.2f kW | Pressure ratio %8.2f (%8.2f)\n" 161 | msgstr "" 162 | 163 | #: cpgui_cycle1.py:340 164 | msgid "Condenser %8.2f kW | Pressure difference %8.2f (%8.2f) bar\n" 165 | msgstr "" 166 | 167 | #: cpgui_cycle1.py:341 168 | msgid "Suction line %8.2f kW | Mass flow %8.6f g/s \n" 169 | msgstr "" 170 | 171 | #: cpgui_cycle1.py:342 172 | msgid "Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n" 173 | msgstr "" 174 | 175 | #: cpgui_cycle1.py:343 176 | msgid "Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n" 177 | msgstr "" 178 | 179 | #: cpgui_cycle1.py:344 180 | msgid " | COP %8.2f \n" 181 | msgstr "" 182 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle2.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpg_cycle2.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle2.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-04-03 16:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_cycle2.py:43 20 | msgid "Evaporator" 21 | msgstr "" 22 | 23 | #: cpgui_cycle2.py:47 cpgui_cycle2.py:56 24 | msgid "Temperature" 25 | msgstr "" 26 | 27 | #: cpgui_cycle2.py:48 28 | msgid "Superheat" 29 | msgstr "" 30 | 31 | #: cpgui_cycle2.py:49 cpgui_cycle2.py:58 32 | msgid "Pressure drop" 33 | msgstr "" 34 | 35 | #: cpgui_cycle2.py:50 36 | msgid "Capacity" 37 | msgstr "" 38 | 39 | #: cpgui_cycle2.py:52 40 | msgid "Condenser" 41 | msgstr "" 42 | 43 | #: cpgui_cycle2.py:57 44 | msgid "Subcooling" 45 | msgstr "" 46 | 47 | #: cpgui_cycle2.py:61 48 | msgid "Suction line SL / Discharge line DL" 49 | msgstr "" 50 | 51 | #: cpgui_cycle2.py:65 52 | msgid "SL superheat" 53 | msgstr "" 54 | 55 | #: cpgui_cycle2.py:66 56 | msgid "SL Pressure drop" 57 | msgstr "" 58 | 59 | #: cpgui_cycle2.py:67 60 | msgid "DL Temperature loss" 61 | msgstr "" 62 | 63 | #: cpgui_cycle2.py:68 64 | msgid "DL Pressure drop" 65 | msgstr "" 66 | 67 | #: cpgui_cycle2.py:70 68 | msgid "Compressor" 69 | msgstr "" 70 | 71 | #: cpgui_cycle2.py:74 72 | msgid "Isentropic efficiency" 73 | msgstr "" 74 | 75 | #: cpgui_cycle2.py:76 76 | msgid "Internal heat exchanger" 77 | msgstr "" 78 | 79 | #: cpgui_cycle2.py:76 80 | msgid "K x A Value" 81 | msgstr "HX UA factor" 82 | 83 | #: cpgui_cycle2.py:81 84 | msgid "Gas pressure drop" 85 | msgstr "" 86 | 87 | #: cpgui_cycle2.py:93 88 | msgid "End of SL / compressor intake" 89 | msgstr "" 90 | 91 | #: cpgui_cycle2.py:94 92 | msgid "Isentropic compression" 93 | msgstr "" 94 | 95 | #: cpgui_cycle2.py:95 96 | msgid "Real compression" 97 | msgstr "" 98 | 99 | #: cpgui_cycle2.py:96 100 | msgid "Condenser inlet" 101 | msgstr "" 102 | 103 | #: cpgui_cycle2.py:97 104 | msgid "Dewpoint inside condenser" 105 | msgstr "" 106 | 107 | #: cpgui_cycle2.py:98 108 | msgid "Average between 3'' and 4'" 109 | msgstr "" 110 | 111 | #: cpgui_cycle2.py:99 112 | msgid "Bubblepoint inside condenser" 113 | msgstr "" 114 | 115 | #: cpgui_cycle2.py:100 116 | msgid "Exit condenser" 117 | msgstr "" 118 | 119 | #: cpgui_cycle2.py:101 cpgui_cycle2.py:106 120 | msgid "Exit Heat exchanger" 121 | msgstr "" 122 | 123 | #: cpgui_cycle2.py:102 124 | msgid "Evaporator entry" 125 | msgstr "" 126 | 127 | #: cpgui_cycle2.py:103 128 | msgid "Average between 6 and 7''" 129 | msgstr "" 130 | 131 | #: cpgui_cycle2.py:104 132 | msgid "Dewpoint inside evaporator" 133 | msgstr "" 134 | 135 | #: cpgui_cycle2.py:105 136 | msgid "Exit evaporator / Intake heat exchanger" 137 | msgstr "" 138 | 139 | #: cpgui_cycle2.py:110 140 | msgid "Cycle inputs" 141 | msgstr "" 142 | 143 | #: cpgui_cycle2.py:112 144 | msgid "Cycle outputs" 145 | msgstr "" 146 | 147 | #: cpgui_cycle2.py:120 148 | msgid " Calculate " 149 | msgstr "" 150 | 151 | #: cpgui_cycle2.py:133 152 | msgid "Cycle information" 153 | msgstr "" 154 | 155 | #: cpgui_cycle2.py:135 156 | msgid "Statepoints" 157 | msgstr "" 158 | 159 | #: cpgui_cycle2.py:153 160 | msgid "Output table" 161 | msgstr "" 162 | 163 | #: cpgui_cycle2.py:225 164 | msgid "" 165 | "Simple DX cycle statepoint Table for %s\n" 166 | "\n" 167 | msgstr "" 168 | 169 | #: cpgui_cycle2.py:226 170 | msgid " Point | t | p | v | h | s | x | Description \n" 171 | msgstr "" 172 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle3.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpg_cycle3.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpg_cycle3.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-04-03 16:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_cycle2.py:43 20 | msgid "Evaporator" 21 | msgstr "" 22 | 23 | #: cpgui_cycle2.py:47 cpgui_cycle2.py:56 24 | msgid "Temperature" 25 | msgstr "" 26 | 27 | #: cpgui_cycle2.py:48 28 | msgid "Superheat" 29 | msgstr "" 30 | 31 | #: cpgui_cycle2.py:49 cpgui_cycle2.py:58 32 | msgid "Pressure drop" 33 | msgstr "" 34 | 35 | #: cpgui_cycle2.py:50 36 | msgid "Capacity" 37 | msgstr "" 38 | 39 | #: cpgui_cycle2.py:52 40 | msgid "Condenser" 41 | msgstr "" 42 | 43 | #: cpgui_cycle2.py:57 44 | msgid "Subcooling" 45 | msgstr "" 46 | 47 | #: cpgui_cycle2.py:61 48 | msgid "Suction line SL / Discharge line DL" 49 | msgstr "" 50 | 51 | #: cpgui_cycle2.py:65 52 | msgid "SL superheat" 53 | msgstr "" 54 | 55 | #: cpgui_cycle2.py:66 56 | msgid "SL Pressure drop" 57 | msgstr "" 58 | 59 | #: cpgui_cycle2.py:67 60 | msgid "DL Temperature loss" 61 | msgstr "" 62 | 63 | #: cpgui_cycle2.py:68 64 | msgid "DL Pressure drop" 65 | msgstr "" 66 | 67 | #: cpgui_cycle2.py:70 68 | msgid "Compressor" 69 | msgstr "" 70 | 71 | #: cpgui_cycle2.py:74 72 | msgid "Isentropic efficiency" 73 | msgstr "" 74 | 75 | #: cpgui_cycle2.py:76 76 | msgid "Internal heat exchanger" 77 | msgstr "" 78 | 79 | #: cpgui_cycle2.py:76 80 | msgid "K x A Value" 81 | msgstr "HX UA factor" 82 | 83 | #: cpgui_cycle2.py:81 84 | msgid "Gas pressure drop" 85 | msgstr "" 86 | 87 | #: cpgui_cycle2.py:93 88 | msgid "End of SL / compressor intake" 89 | msgstr "" 90 | 91 | #: cpgui_cycle2.py:94 92 | msgid "Isentropic compression" 93 | msgstr "" 94 | 95 | #: cpgui_cycle2.py:95 96 | msgid "Real compression" 97 | msgstr "" 98 | 99 | #: cpgui_cycle2.py:96 100 | msgid "Condenser inlet" 101 | msgstr "" 102 | 103 | #: cpgui_cycle2.py:97 104 | msgid "Dewpoint inside condenser" 105 | msgstr "" 106 | 107 | #: cpgui_cycle2.py:98 108 | msgid "Average between 3'' and 4'" 109 | msgstr "" 110 | 111 | #: cpgui_cycle2.py:99 112 | msgid "Bubblepoint inside condenser" 113 | msgstr "" 114 | 115 | #: cpgui_cycle2.py:100 116 | msgid "Exit condenser" 117 | msgstr "" 118 | 119 | #: cpgui_cycle2.py:101 cpgui_cycle2.py:106 120 | msgid "Exit Heat exchanger" 121 | msgstr "" 122 | 123 | #: cpgui_cycle2.py:102 124 | msgid "Evaporator entry" 125 | msgstr "" 126 | 127 | #: cpgui_cycle2.py:103 128 | msgid "Average between 6 and 7''" 129 | msgstr "" 130 | 131 | #: cpgui_cycle2.py:104 132 | msgid "Dewpoint inside evaporator" 133 | msgstr "" 134 | 135 | #: cpgui_cycle2.py:105 136 | msgid "Exit evaporator / Intake heat exchanger" 137 | msgstr "" 138 | 139 | #: cpgui_cycle2.py:110 140 | msgid "Cycle inputs" 141 | msgstr "" 142 | 143 | #: cpgui_cycle2.py:112 144 | msgid "Cycle outputs" 145 | msgstr "" 146 | 147 | #: cpgui_cycle2.py:120 148 | msgid " Calculate " 149 | msgstr "" 150 | 151 | #: cpgui_cycle2.py:133 152 | msgid "Cycle information" 153 | msgstr "" 154 | 155 | #: cpgui_cycle2.py:135 156 | msgid "Statepoints" 157 | msgstr "" 158 | 159 | #: cpgui_cycle2.py:153 160 | msgid "Output table" 161 | msgstr "" 162 | 163 | #: cpgui_cycle2.py:225 164 | msgid "" 165 | "Simple DX cycle statepoint Table for %s\n" 166 | "\n" 167 | msgstr "" 168 | 169 | #: cpgui_cycle2.py:226 170 | msgid " Point | t | p | v | h | s | x | Description \n" 171 | msgstr "" 172 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgbasics.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgbasics.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgbasics.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:56+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_basics.py:25 20 | msgid "Enter Mass fraction of components in kg/kg " 21 | msgstr "" 22 | 23 | #: cpgui_basics.py:75 24 | msgid "Refrigerant setup" 25 | msgstr "" 26 | 27 | #: cpgui_basics.py:78 28 | msgid "Coolprop Refrigerant" 29 | msgstr "" 30 | 31 | #: cpgui_basics.py:81 32 | msgid "Chosen Refrigerant :" 33 | msgstr "" 34 | 35 | #: cpgui_basics.py:84 36 | msgid "Refprop Refrigerant" 37 | msgstr "" 38 | 39 | #: cpgui_basics.py:90 40 | msgid "Use Refprop fluids for Refprop mixtures and Coolprop fluids for HEOS mixtures. Choose backend later" 41 | msgstr "" 42 | 43 | #: cpgui_basics.py:143 44 | msgid "Mixture components" 45 | msgstr "" 46 | 47 | #: cpgui_basics.py:146 48 | msgid "Add fluid to mixture" 49 | msgstr "" 50 | 51 | #: cpgui_basics.py:150 52 | msgid "Delete mixture" 53 | msgstr "" 54 | 55 | #: cpgui_basics.py:154 56 | msgid "Define mixture" 57 | msgstr "" 58 | 59 | #: cpgui_basics.py:173 60 | msgid "Choose mixture backend" 61 | msgstr "" 62 | 63 | #: cpgui_basics.py:219 64 | msgid "Mixture composition" 65 | msgstr "" 66 | 67 | #: cpgui_basics.py:251 68 | msgid "Refprop not found" 69 | msgstr "" 70 | 71 | #: cpgui_basics.py:264 72 | msgid "Coolprop Version : %s \n" 73 | msgstr "" 74 | 75 | #: cpgui_basics.py:265 76 | msgid "Coolprop gitrevision : %s \n" 77 | msgstr "" 78 | 79 | #: cpgui_basics.py:266 80 | msgid "Refrigerant : %s \n" 81 | msgstr "" 82 | 83 | #: cpgui_basics.py:278 84 | msgid "Molar mass :%s \n" 85 | msgstr "" 86 | 87 | #: cpgui_basics.py:323 88 | msgid "" 89 | "Ozone depleting Substance !\n" 90 | "ODP : %2.3F \n" 91 | msgstr "" 92 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgui.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgui.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:55+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui.py:73 20 | msgid "File" 21 | msgstr "" 22 | 23 | #: cpgui.py:75 24 | msgid "Quit" 25 | msgstr "" 26 | 27 | #: cpgui.py:78 28 | msgid "Settings" 29 | msgstr "" 30 | 31 | #: cpgui.py:80 32 | msgid "English" 33 | msgstr "" 34 | 35 | #: cpgui.py:81 36 | msgid "German" 37 | msgstr "" 38 | 39 | #: cpgui.py:84 40 | msgid "Help" 41 | msgstr "" 42 | 43 | #: cpgui.py:85 44 | msgid "About..." 45 | msgstr "" 46 | 47 | #: cpgui.py:106 48 | msgid "Select fluid" 49 | msgstr "" 50 | 51 | #: cpgui.py:109 52 | msgid "State Point" 53 | msgstr "" 54 | 55 | #: cpgui.py:112 cpgui.py:182 56 | msgid "Saturation table" 57 | msgstr "" 58 | 59 | #: cpgui.py:115 60 | msgid "Diagrams" 61 | msgstr "" 62 | 63 | #: cpgui.py:118 64 | msgid "SimpleCycle" 65 | msgstr "" 66 | 67 | #: cpgui.py:122 68 | msgid "Cycle with heat exchanger" 69 | msgstr "" 70 | 71 | #: cpgui.py:136 72 | msgid "About" 73 | msgstr "" 74 | 75 | #: cpgui.py:153 76 | msgid "Language changed to %s " 77 | msgstr "" 78 | 79 | #: cpgui.py:153 80 | msgid "Restart GUI for language change to take effect!" 81 | msgstr "" 82 | -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgui_all.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/en/LC_MESSAGES/cpgui_all.mo -------------------------------------------------------------------------------- /locale/en/LC_MESSAGES/cpgui_all.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-25 17:00+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-26 12:28+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_all.py:164 20 | msgid "Temperature" 21 | msgstr "" 22 | 23 | #: cpgui_all.py:165 24 | msgid "Pressure" 25 | msgstr "" 26 | 27 | #: cpgui_all.py:166 28 | msgid "Density" 29 | msgstr "" 30 | 31 | #: cpgui_all.py:167 32 | msgid "specific Volume" 33 | msgstr "" 34 | 35 | #: cpgui_all.py:168 36 | msgid "specific Enthalpy" 37 | msgstr "" 38 | 39 | #: cpgui_all.py:169 40 | msgid "specific Entropy" 41 | msgstr "" 42 | 43 | #: cpgui_all.py:170 44 | msgid "Quality" 45 | msgstr "" 46 | 47 | #: cpgui_all.py:171 48 | msgid "Power" 49 | msgstr "" 50 | 51 | #: cpgui_all.py:172 52 | msgid "Inner Energy" 53 | msgstr "" 54 | 55 | #: cpgui_all.py:173 56 | msgid "Speed" 57 | msgstr "" 58 | 59 | #: cpgui_all.py:174 60 | msgid "dynamic Viscosity" 61 | msgstr "" 62 | 63 | #: cpgui_all.py:175 64 | msgid "kinematic Viscosity" 65 | msgstr "" 66 | 67 | #: cpgui_all.py:176 68 | msgid "Isobaric heat Capacity" 69 | msgstr "" 70 | 71 | #: cpgui_all.py:177 72 | msgid "Iscochoric heat Capacity" 73 | msgstr "" 74 | 75 | #: cpgui_all.py:268 76 | msgid "Molar mass" 77 | msgstr "" 78 | 79 | #: cpgui_all.py:268 80 | msgid "Speed of sound" 81 | msgstr "" 82 | 83 | #: cpgui_all.py:202 cpgui_all.py:227 84 | msgid "Units changed" 85 | msgstr "" 86 | 87 | #: cpgui_all.py:202 cpgui_all.py:227 88 | msgid "" 89 | "Units changed ! \n" 90 | "Restart GUI for Unit change to take effect!" 91 | msgstr "" 92 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgDiagram.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgDiagram.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgDiagram.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_diagram.py:59 20 | msgid "Available Diagrams" 21 | msgstr "" 22 | 23 | #: cpgui_diagram.py:62 24 | msgid "Diagram" 25 | msgstr "" 26 | 27 | #: cpgui_diagram.py:207 28 | msgid "Pressure in kPa" 29 | msgstr "" 30 | 31 | #: cpgui_diagram.py:208 32 | msgid "Specific enthalpy in kJ/kg" 33 | msgstr "" 34 | 35 | #: cpgui_diagram.py:288 36 | msgid "Only Coolprop single components can be used for plots!" 37 | msgstr "" 38 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgSatTable.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgSatTable.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgSatTable.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:59+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_sattable.py:44 cpgui_sattable.py:85 20 | msgid "Pressure [Pa]" 21 | msgstr "" 22 | 23 | #: cpgui_sattable.py:44 cpgui_sattable.py:151 cpgui_sattable.py:177 24 | msgid "Temperature [K]" 25 | msgstr "" 26 | 27 | #: cpgui_sattable.py:46 28 | msgid "Mixture" 29 | msgstr "" 30 | 31 | #: cpgui_sattable.py:46 32 | msgid "Pure fluid" 33 | msgstr "" 34 | 35 | #: cpgui_sattable.py:48 36 | msgid "Select order type and input Values" 37 | msgstr "" 38 | 39 | #: cpgui_sattable.py:51 40 | msgid "Fluid data" 41 | msgstr "" 42 | 43 | #: cpgui_sattable.py:54 44 | msgid "Select order type" 45 | msgstr "" 46 | 47 | #: cpgui_sattable.py:56 48 | msgid " min value" 49 | msgstr "" 50 | 51 | #: cpgui_sattable.py:58 52 | msgid " max value" 53 | msgstr "" 54 | 55 | #: cpgui_sattable.py:60 56 | msgid " step size" 57 | msgstr "" 58 | 59 | #: cpgui_sattable.py:93 60 | msgid "Calculate" 61 | msgstr "" 62 | 63 | #: cpgui_sattable.py:189 64 | msgid "Refrigerant : %s \n" 65 | msgstr "" 66 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgStatePoint.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgStatePoint.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgStatePoint.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:59+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpg_cycle1.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpg_cycle1.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpg_cycle1.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_cycle1.py:42 20 | msgid "Evaporator" 21 | msgstr "" 22 | 23 | #: cpgui_cycle1.py:46 cpgui_cycle1.py:55 24 | msgid "Temperature" 25 | msgstr "" 26 | 27 | #: cpgui_cycle1.py:47 28 | msgid "Superheat" 29 | msgstr "" 30 | 31 | #: cpgui_cycle1.py:48 cpgui_cycle1.py:57 32 | msgid "Pressure drop" 33 | msgstr "" 34 | 35 | #: cpgui_cycle1.py:49 36 | msgid "Capacity" 37 | msgstr "" 38 | 39 | #: cpgui_cycle1.py:51 40 | msgid "Condenser" 41 | msgstr "" 42 | 43 | #: cpgui_cycle1.py:56 44 | msgid "Subcooling" 45 | msgstr "" 46 | 47 | #: cpgui_cycle1.py:60 48 | msgid "Suction line SL / Discharge line DL" 49 | msgstr "" 50 | 51 | #: cpgui_cycle1.py:64 52 | msgid "SL superheat" 53 | msgstr "" 54 | 55 | #: cpgui_cycle1.py:65 56 | msgid "SL Pressure drop" 57 | msgstr "" 58 | 59 | #: cpgui_cycle1.py:66 60 | msgid "DL Temperature loss" 61 | msgstr "" 62 | 63 | #: cpgui_cycle1.py:67 64 | msgid "DL Pressure drop" 65 | msgstr "" 66 | 67 | #: cpgui_cycle1.py:69 68 | msgid "Compressor" 69 | msgstr "" 70 | 71 | #: cpgui_cycle1.py:73 72 | msgid "Isentropic efficiency" 73 | msgstr "" 74 | 75 | #: cpgui_cycle1.py:86 76 | msgid "End of SL / compressor intake" 77 | msgstr "" 78 | 79 | #: cpgui_cycle1.py:87 80 | msgid "Isentropic compression" 81 | msgstr "" 82 | 83 | #: cpgui_cycle1.py:88 84 | msgid "Real compression" 85 | msgstr "" 86 | 87 | #: cpgui_cycle1.py:89 88 | msgid "Condenser inlet" 89 | msgstr "" 90 | 91 | #: cpgui_cycle1.py:90 92 | msgid "Dewpoint inside condenser" 93 | msgstr "" 94 | 95 | #: cpgui_cycle1.py:91 96 | msgid "Average between 3'' and 4'" 97 | msgstr "" 98 | 99 | #: cpgui_cycle1.py:92 100 | msgid "Bubblepoint inside condenser" 101 | msgstr "" 102 | 103 | #: cpgui_cycle1.py:93 104 | msgid "Exit condenser" 105 | msgstr "" 106 | 107 | #: cpgui_cycle1.py:94 108 | msgid "Evaporator entry" 109 | msgstr "" 110 | 111 | #: cpgui_cycle1.py:95 112 | msgid "Average between 5 and 6''" 113 | msgstr "" 114 | 115 | #: cpgui_cycle1.py:96 116 | msgid "Dewpoint inside evaporator" 117 | msgstr "" 118 | 119 | #: cpgui_cycle1.py:97 120 | msgid "Exit evaporator" 121 | msgstr "" 122 | 123 | #: cpgui_cycle1.py:101 124 | msgid "Cycle inputs" 125 | msgstr "" 126 | 127 | #: cpgui_cycle1.py:103 128 | msgid "Cycle outputs" 129 | msgstr "" 130 | 131 | #: cpgui_cycle1.py:111 132 | msgid " Calculate " 133 | msgstr "" 134 | 135 | #: cpgui_cycle1.py:124 136 | msgid "Cycle information" 137 | msgstr "" 138 | 139 | #: cpgui_cycle1.py:126 140 | msgid "Statepoints" 141 | msgstr "" 142 | 143 | #: cpgui_cycle1.py:144 144 | msgid "Output table" 145 | msgstr "" 146 | 147 | #: cpgui_cycle1.py:211 148 | msgid "" 149 | "Simple DX cycle statepoint Table for %s\n" 150 | "\n" 151 | msgstr "" 152 | 153 | #: cpgui_cycle1.py:338 154 | msgid "" 155 | "\n" 156 | "Power calculations | Key performance values\n" 157 | msgstr "" 158 | 159 | #: cpgui_cycle1.py:339 160 | msgid "Evaporator %8.2f kW | Pressure ratio %8.2f (%8.2f)\n" 161 | msgstr "" 162 | 163 | #: cpgui_cycle1.py:340 164 | msgid "Condenser %8.2f kW | Pressure difference %8.2f (%8.2f) bar\n" 165 | msgstr "" 166 | 167 | #: cpgui_cycle1.py:341 168 | msgid "Suction line %8.2f kW | Mass flow %8.6f g/s \n" 169 | msgstr "" 170 | 171 | #: cpgui_cycle1.py:342 172 | msgid "Discharge line %8.2f kW | Volume flow (suction line) %8.4f m³/h \n" 173 | msgstr "" 174 | 175 | #: cpgui_cycle1.py:343 176 | msgid "Compressor %8.2f kW | Volumetric capacity %8.2f kJ/m³ \n" 177 | msgstr "" 178 | 179 | #: cpgui_cycle1.py:344 180 | msgid " | COP %8.2f \n" 181 | msgstr "" 182 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpg_cycle2.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpg_cycle2.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpg_cycle2.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:58+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-04-03 16:02+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_cycle2.py:43 20 | msgid "Evaporator" 21 | msgstr "" 22 | 23 | #: cpgui_cycle2.py:47 cpgui_cycle2.py:56 24 | msgid "Temperature" 25 | msgstr "" 26 | 27 | #: cpgui_cycle2.py:48 28 | msgid "Superheat" 29 | msgstr "" 30 | 31 | #: cpgui_cycle2.py:49 cpgui_cycle2.py:58 32 | msgid "Pressure drop" 33 | msgstr "" 34 | 35 | #: cpgui_cycle2.py:50 36 | msgid "Capacity" 37 | msgstr "" 38 | 39 | #: cpgui_cycle2.py:52 40 | msgid "Condenser" 41 | msgstr "" 42 | 43 | #: cpgui_cycle2.py:57 44 | msgid "Subcooling" 45 | msgstr "" 46 | 47 | #: cpgui_cycle2.py:61 48 | msgid "Suction line SL / Discharge line DL" 49 | msgstr "" 50 | 51 | #: cpgui_cycle2.py:65 52 | msgid "SL superheat" 53 | msgstr "" 54 | 55 | #: cpgui_cycle2.py:66 56 | msgid "SL Pressure drop" 57 | msgstr "" 58 | 59 | #: cpgui_cycle2.py:67 60 | msgid "DL Temperature loss" 61 | msgstr "" 62 | 63 | #: cpgui_cycle2.py:68 64 | msgid "DL Pressure drop" 65 | msgstr "" 66 | 67 | #: cpgui_cycle2.py:70 68 | msgid "Compressor" 69 | msgstr "" 70 | 71 | #: cpgui_cycle2.py:74 72 | msgid "Isentropic efficiency" 73 | msgstr "" 74 | 75 | #: cpgui_cycle2.py:76 76 | msgid "Internal heat exchanger" 77 | msgstr "" 78 | 79 | #: cpgui_cycle2.py:76 80 | msgid "K x A Value" 81 | msgstr "HX UA factor" 82 | 83 | #: cpgui_cycle2.py:81 84 | msgid "Gas pressure drop" 85 | msgstr "" 86 | 87 | #: cpgui_cycle2.py:93 88 | msgid "End of SL / compressor intake" 89 | msgstr "" 90 | 91 | #: cpgui_cycle2.py:94 92 | msgid "Isentropic compression" 93 | msgstr "" 94 | 95 | #: cpgui_cycle2.py:95 96 | msgid "Real compression" 97 | msgstr "" 98 | 99 | #: cpgui_cycle2.py:96 100 | msgid "Condenser inlet" 101 | msgstr "" 102 | 103 | #: cpgui_cycle2.py:97 104 | msgid "Dewpoint inside condenser" 105 | msgstr "" 106 | 107 | #: cpgui_cycle2.py:98 108 | msgid "Average between 3'' and 4'" 109 | msgstr "" 110 | 111 | #: cpgui_cycle2.py:99 112 | msgid "Bubblepoint inside condenser" 113 | msgstr "" 114 | 115 | #: cpgui_cycle2.py:100 116 | msgid "Exit condenser" 117 | msgstr "" 118 | 119 | #: cpgui_cycle2.py:101 cpgui_cycle2.py:106 120 | msgid "Exit Heat exchanger" 121 | msgstr "" 122 | 123 | #: cpgui_cycle2.py:102 124 | msgid "Evaporator entry" 125 | msgstr "" 126 | 127 | #: cpgui_cycle2.py:103 128 | msgid "Average between 6 and 7''" 129 | msgstr "" 130 | 131 | #: cpgui_cycle2.py:104 132 | msgid "Dewpoint inside evaporator" 133 | msgstr "" 134 | 135 | #: cpgui_cycle2.py:105 136 | msgid "Exit evaporator / Intake heat exchanger" 137 | msgstr "" 138 | 139 | #: cpgui_cycle2.py:110 140 | msgid "Cycle inputs" 141 | msgstr "" 142 | 143 | #: cpgui_cycle2.py:112 144 | msgid "Cycle outputs" 145 | msgstr "" 146 | 147 | #: cpgui_cycle2.py:120 148 | msgid " Calculate " 149 | msgstr "" 150 | 151 | #: cpgui_cycle2.py:133 152 | msgid "Cycle information" 153 | msgstr "" 154 | 155 | #: cpgui_cycle2.py:135 156 | msgid "Statepoints" 157 | msgstr "" 158 | 159 | #: cpgui_cycle2.py:153 160 | msgid "Output table" 161 | msgstr "" 162 | 163 | #: cpgui_cycle2.py:225 164 | msgid "" 165 | "Simple DX cycle statepoint Table for %s\n" 166 | "\n" 167 | msgstr "" 168 | 169 | #: cpgui_cycle2.py:226 170 | msgid " Point | t | p | v | h | s | x | Description \n" 171 | msgstr "" 172 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgbasics.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgbasics.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgbasics.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:56+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_basics.py:25 20 | msgid "Enter Mass fraction of components in kg/kg " 21 | msgstr "" 22 | 23 | #: cpgui_basics.py:75 24 | msgid "Refrigerant setup" 25 | msgstr "" 26 | 27 | #: cpgui_basics.py:78 28 | msgid "Coolprop Refrigerant" 29 | msgstr "" 30 | 31 | #: cpgui_basics.py:81 32 | msgid "Chosen Refrigerant :" 33 | msgstr "" 34 | 35 | #: cpgui_basics.py:84 36 | msgid "Refprop Refrigerant" 37 | msgstr "" 38 | 39 | #: cpgui_basics.py:90 40 | msgid "Use Refprop fluids for Refprop mixtures and Coolprop fluids for HEOS mixtures. Choose backend later" 41 | msgstr "" 42 | 43 | #: cpgui_basics.py:143 44 | msgid "Mixture components" 45 | msgstr "" 46 | 47 | #: cpgui_basics.py:146 48 | msgid "Add fluid to mixture" 49 | msgstr "" 50 | 51 | #: cpgui_basics.py:150 52 | msgid "Delete mixture" 53 | msgstr "" 54 | 55 | #: cpgui_basics.py:154 56 | msgid "Define mixture" 57 | msgstr "" 58 | 59 | #: cpgui_basics.py:173 60 | msgid "Choose mixture backend" 61 | msgstr "" 62 | 63 | #: cpgui_basics.py:219 64 | msgid "Mixture composition" 65 | msgstr "" 66 | 67 | #: cpgui_basics.py:251 68 | msgid "Refprop not found" 69 | msgstr "" 70 | 71 | #: cpgui_basics.py:264 72 | msgid "Coolprop Version : %s \n" 73 | msgstr "" 74 | 75 | #: cpgui_basics.py:265 76 | msgid "Coolprop gitrevision : %s \n" 77 | msgstr "" 78 | 79 | #: cpgui_basics.py:266 80 | msgid "Refrigerant : %s \n" 81 | msgstr "" 82 | 83 | #: cpgui_basics.py:278 84 | msgid "Molar mass :%s \n" 85 | msgstr "" 86 | 87 | #: cpgui_basics.py:323 88 | msgid "" 89 | "Ozone depleting Substance !\n" 90 | "ODP : %2.3F \n" 91 | msgstr "" 92 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgui.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgui.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-24 12:55+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-24 13:01+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: \n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui.py:73 20 | msgid "File" 21 | msgstr "" 22 | 23 | #: cpgui.py:75 24 | msgid "Quit" 25 | msgstr "" 26 | 27 | #: cpgui.py:78 28 | msgid "Settings" 29 | msgstr "" 30 | 31 | #: cpgui.py:80 32 | msgid "English" 33 | msgstr "" 34 | 35 | #: cpgui.py:81 36 | msgid "German" 37 | msgstr "" 38 | 39 | #: cpgui.py:84 40 | msgid "Help" 41 | msgstr "" 42 | 43 | #: cpgui.py:85 44 | msgid "About..." 45 | msgstr "" 46 | 47 | #: cpgui.py:106 48 | msgid "Select fluid" 49 | msgstr "" 50 | 51 | #: cpgui.py:109 52 | msgid "State Point" 53 | msgstr "" 54 | 55 | #: cpgui.py:112 cpgui.py:182 56 | msgid "Saturation table" 57 | msgstr "" 58 | 59 | #: cpgui.py:115 60 | msgid "Diagrams" 61 | msgstr "" 62 | 63 | #: cpgui.py:118 64 | msgid "SimpleCycle" 65 | msgstr "" 66 | 67 | #: cpgui.py:122 68 | msgid "Cycle with heat exchanger" 69 | msgstr "" 70 | 71 | #: cpgui.py:136 72 | msgid "About" 73 | msgstr "" 74 | 75 | #: cpgui.py:153 76 | msgid "Language changed to %s " 77 | msgstr "" 78 | 79 | #: cpgui.py:153 80 | msgid "Restart GUI for language change to take effect!" 81 | msgstr "" 82 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgui_all.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/locale/fr/LC_MESSAGES/cpgui_all.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/cpgui_all.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "POT-Creation-Date: 2015-03-25 17:00+Mitteleuropäische Zeit\n" 9 | "PO-Revision-Date: 2015-03-26 12:28+0100\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=cp1252\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Generated-By: pygettext.py 1.5\n" 14 | "Last-Translator: Reiner Mayers\n" 15 | "Language-Team: \n" 16 | "Language: en\n" 17 | "X-Generator: Poedit 1.7.5\n" 18 | 19 | #: cpgui_all.py:164 20 | msgid "Temperature" 21 | msgstr "" 22 | 23 | #: cpgui_all.py:165 24 | msgid "Pressure" 25 | msgstr "" 26 | 27 | #: cpgui_all.py:166 28 | msgid "Density" 29 | msgstr "" 30 | 31 | #: cpgui_all.py:167 32 | msgid "specific Volume" 33 | msgstr "" 34 | 35 | #: cpgui_all.py:168 36 | msgid "specific Enthalpy" 37 | msgstr "" 38 | 39 | #: cpgui_all.py:169 40 | msgid "specific Entropy" 41 | msgstr "" 42 | 43 | #: cpgui_all.py:170 44 | msgid "Quality" 45 | msgstr "" 46 | 47 | #: cpgui_all.py:171 48 | msgid "Power" 49 | msgstr "" 50 | 51 | #: cpgui_all.py:172 52 | msgid "Inner Energy" 53 | msgstr "" 54 | 55 | #: cpgui_all.py:173 56 | msgid "Speed" 57 | msgstr "" 58 | 59 | #: cpgui_all.py:174 60 | msgid "dynamic Viscosity" 61 | msgstr "" 62 | 63 | #: cpgui_all.py:175 64 | msgid "kinematic Viscosity" 65 | msgstr "" 66 | 67 | #: cpgui_all.py:176 68 | msgid "Isobaric heat Capacity" 69 | msgstr "" 70 | 71 | #: cpgui_all.py:177 72 | msgid "Iscochoric heat Capacity" 73 | msgstr "" 74 | 75 | #: cpgui_all.py:268 76 | msgid "Molar mass" 77 | msgstr "" 78 | 79 | #: cpgui_all.py:268 80 | msgid "Speed of sound" 81 | msgstr "" 82 | 83 | #: cpgui_all.py:202 cpgui_all.py:227 84 | msgid "Units changed" 85 | msgstr "" 86 | 87 | #: cpgui_all.py:202 cpgui_all.py:227 88 | msgid "" 89 | "Units changed ! \n" 90 | "Restart GUI for Unit change to take effect!" 91 | msgstr "" 92 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | CoolProp 2 | matplotlib 3 | numpy 4 | Pillow>=2.7.0 5 | pyparsing 6 | python-dateutil 7 | pytz 8 | scipy 9 | six 10 | 11 | -------------------------------------------------------------------------------- /simplecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoolProp/GUI/77a9a098d772987120fea3ed878c12751705faf4/simplecycle.png --------------------------------------------------------------------------------