Norwegian Association of Refrigeration Meeting in Oslo,March 13th 2014 Function calls in Excel Tool for calculations of refrigeration cycles -Practical examples in EXCEL This is a demonstration of use of the thermodynamic library of function calls to be used in calculations using EXCEL. RnLib gives thermodynamic data for working fluids(refrigerants) HxLib gives thermodynamic data for moisture air KbLib gives thermodynamic data for secondary fluids Trygve M.Eikevik Professor Norwegian University of Science and Technology (NTNU) trygve.m.eikevik@ntnu.no http://folk.ntnu.no/tme
Function calls in Excel Tool for calculations of refrigeration cycles – Practical examples in EXCEL This is a demonstration of use of the thermodynamic library of function calls to be used in calculations using EXCEL. Trygve M. Eikevik Professor Norwegian University of Science and Technology (NTNU) trygve.m.eikevik@ntnu.no http://folk.ntnu.no/tme Norwegian Association of Refrigeration Meeting in Oslo, March 13th 2014 • RnLib gives thermodynamic data for working fluids (refrigerants) • HxLib gives thermodynamic data for moisture air • KbLib gives thermodynamic data for secondary fluids
Installation: Establish the folder: C://kktdlls/bin The following files have to be copied to this folder: KKTserver (application file -exe file) 。Master-Sheet (excel file) 。ibgcc_s_dw2-1.dll (application extension) 。libstdc++-6.dll (application extension) All new applications have to start with the Master-Sheet>and make duplicates from this file. Do not start EXCEL directly,but do it indirectly by clicking on the file
Installation: Establish the folder: C://kktdlls/bin The following files have to be copied to this folder: • KKTserver (application file – exe file) • Master-Sheet (excel file) • ibgcc_s_dw2-1.dll (application extension) • libstdc++-6.dll (application extension) All new applications have to start with the «Master-Sheet» and make duplicates from this file. Do not start EXCEL directly, but do it indirectly by clicking on the file
RnLib-Function call in Excel 。Function call 。Example: -R_cpgasTP Cp=R_cpgasTP(kR717w;25,0,857077,6) R shows that this function call for working fluids Working fluid number(have to be the first argument) cpgas:Returns the value of Specific heat>in gas phase TP:T(temperature in C)+P(pressure i Pascal)
RnLib – Function call in Excel • Function call • Example: – R_cpgasTP CP=R_cpgasTP(«R717»;25,0; 857077,6) • R_ shows that this function call for working fluids • Working fluid number (have to be the first argument) • cpgas: Returns the value of «Specific heat» in gas phase • TP: T (temperature in oC) + P (pressure i Pascal)
Description of functions Function Ingoing values ·cp-Specific heat sat-saturated condition ·Working fluid number dh-specific latent heat gas-gas 。T-temperature of evaporation lig-liquid 。P-Pressure dv-dynamic viscosity lggs-two phase area ·s-specific entropy for saturated gas x-two phase area ·H-specific enthalpy ·h-specific enthalpy max-maximum ·V-specific volume 。p-pressure min-minimum .X-vapor fraction ·s-specific entropy crit-critical point tc-thermal conductivity 。t-temperature ·v-specific volume Remember that all returned values is in 。x-vapor fraction SI units: Pressure: Pa Temperature: C Specific enthalpy: J/kg Specific entropy J/kgK Specific volume: m3/kg
Description of functions • cp- Specific heat • dh- specific latent heat of evaporation • dv- dynamic viscosity for saturated gas • h- specific enthalpy • p- pressure • s- specific entropy • tc- thermal conductivity • t- temperature • v- specific volume • x- vapor fraction • sat- saturated condition • gas- gas • liq- liquid • lqgs- two phase area • x- two phase area • max- maximum • min- minimum • crit- critical point • Working fluid number • T- temperature • P- Pressure • S- specific entropy • H- specific enthalpy • V- specific volume • X- vapor fraction Function Ingoing values Remember that all returned values is in SI units: Pressure: Pa Temperature: oC Specific enthalpy: J/kg Specific entropy J/kgK Specific volume: m3/kg
One stage refrigeration system 1 2 4 又 3 EXCEL-example
One stage refrigeration system 2 4 3 1 EXCEL-example
Two stage refrigeration system 1 2 3 4 8 又 7 6 5 EXCEL-example
Two stage refrigeration system 3 6 5 4 8 7 1 2 EXCEL-example
Descriptions of functions in HxLib Functions Ingoing values Function name Unit Function call Ingoing parameters Enthalpy moisture air J/kg HX_H_trh air pressure(Pa);actual temperature(C);relative humidity(%) J/kg HX_H_tx air pressure(Pa);actual temperature(C);absolute humidity(kg/kg) Relative humidity % HX RH_th air pressure(Pa);actual temperature(C);enthalpy(J/kg) % HX_RH_tt air pressure(Pa);actual temperature(C);wet bulb temperature(C) % HX RH tx air pressure(Pa);actual temperature(C);absolute humidity(kg/kg) Temperature C HX_T_hrh air pressure(Pa);enthalpy(J/kg);relative humidity(%) C HX_T_hx air pressure(Pa);enthalpy(J/kg);absolute humidity(kg/kg) C HX_T_xrh air pressure(Pa);absolute humidity(kg/kg);relative humidity(%) Dew point ℃ HX_Tdugg_trh air pressure(Pa);actual temperature(C);relative humidity(%) Specific volume m3/kg HX Vfukt_trh air pressure(Pa);actual temperature(oC);relative humidity(%) Specific volume m3/kg HX_Vtoerr_trh air pressure(Pa);actual temperature(C);relative humidity(%) Absolute humidity kg/kg HXX_th air pressure(Pa);actual temperature(C);enthalpy(J/kg) kg/kg HX X trh air pressure(Pa);actual temperature(C);relative humidity(%)
Descriptions of functions in HxLib Functions Ingoing values Function name Unit Function call Ingoing parameters Enthalpy moisture air J/kg HX_H_trh air pressure (Pa); actual temperature (oC); relative humidity (%) J/kg HX _H_tx air pressure (Pa); actual temperature (oC); absolute humidity (kg/kg) Relative humidity % HX _RH_th air pressure (Pa); actual temperature (oC); enthalpy (J/kg) % HX _RH_tt air pressure (Pa); actual temperature (oC); wet bulb temperature (oC) % HX _RH_tx air pressure (Pa); actual temperature (oC); absolute humidity (kg/kg) Temperature oC HX _T_hrh air pressure (Pa); enthalpy (J/kg); relative humidity (%) oC HX _T_hx air pressure (Pa); enthalpy (J/kg); absolute humidity (kg/kg) oC HX _T_xrh air pressure (Pa); absolute humidity (kg/kg); relative humidity (%) Dew point oC HX _Tdugg_trh air pressure (Pa); actual temperature (oC); relative humidity (%) Specific volume m3/kg HX _Vfukt_trh air pressure (Pa); actual temperature (oC); relative humidity (%) Specific volume m3/kg HX _Vtoerr_trh air pressure (Pa); actual temperature (oC); relative humidity (%) Absolute humidity kg/kg HX _X_th air pressure (Pa); actual temperature (oC); enthalpy (J/kg) kg/kg HX _X_trh air pressure (Pa); actual temperature (oC); relative humidity (%)
Parameters in HxLib t: temperature moisture air (C) t: wet bulb temperature (C) h: enthalpy (J/kg) rh: relative humidity(%) V: specific volume(m3/kg) X: absolute humidity(kg/kg dry air) tt: means:air temperature wet bulb temperature
t: temperature moisture air (oC) t: wet bulb temperature (oC) h: enthalpy (J/kg) rh: relative humidity (%) v: specific volume (m3/kg) x: absolute humidity (kg/kg dry air) tt: means: air temperature + wet bulb temperature Parameters in HxLib
Secondary fluids-KbLib Fluid number nr. Norwegian name English name Eutectic Eutectic temperaturee concentration (c) (weight % KB101 Vann Water KB110 Ammoniakk Ammonia -100 33 Glycols KB201 Etylenglykol Ethylene glycol(EG) -51 57 KB202 Propylenglykol Propylene glycol(PG) -50 60 Alcohols KB301 Etylalkohol Ethyl alcohol(EA) -118 93,5 KB302 Metylalkohol Methyl alcohol(MA) -116 87,7 Glycerol KB401 Glyserol Glycerol(GL) -47 67 Salts KB501 Kaliumkarbonat Potassium carbonate -37,5 40 KB502 Kalsiumklorid Calcium chloride -50 30,5 KB503 Magnesiumklorid Magnesium chloride -33 21,8 KB504 Natriumklorid Sodium chloride -21 23,4 KB505 Kaliumacetat Potassium acetate(KAC) -52 45 Fluid number is not an official number,but simplify the choice of medium
Secondary fluids - KbLib Fluid number nr. Norwegian name English name Eutectic temperaturee (oC) Eutectic concentration (weight %) KB101 Vann Water KB110 Ammoniakk Ammonia -100 33 Glycols KB201 Etylenglykol Ethylene glycol (EG) -51 57 KB202 Propylenglykol Propylene glycol (PG) -50 60 Alcohols KB301 Etylalkohol Ethyl alcohol (EA) -118 93,5 KB302 Metylalkohol Methyl alcohol (MA) -116 87,7 Glycerol KB401 Glyserol Glycerol (GL) -47 67 Salts KB501 Kaliumkarbonat Potassium carbonate -37,5 40 KB502 Kalsiumklorid Calcium chloride -50 30,5 KB503 Magnesiumklorid Magnesium chloride -33 21,8 KB504 Natriumklorid Sodium chloride -21 23,4 KB505 Kaliumacetat Potassium acetate (KAC) -52 45 Fluid number is not an official number, but simplify the choice of medium
Function name Unit Function call Ingoing parameters Specific heat J/kgK KB cp ttf Fluid number;temperature;freezing point J/kgK KB cp_tx Fluid number;temperature;concentration(%) Dynamic viscosity Pas KB dv ttf Fluid number;temperature,freezing point Pas KB dv tx Fluid number;temperature;concentration(%) Actual temperature oC KB t hx Fluid number;enthalpy;concentration(%) Thermal conductivity W/mK KB tc ttf Fluid number;temperature;freezing point W/mK KB tc tx Fluid number;temperature;concentration(%) Freezing point oC KB_tf_x Fluid number;concentration(%) Specific volume m3/kg KB v ttf Fluid number;temperature;freezing point m3/kg KB vtx Fluid number;temperature;concentration(%) Density kg/m3 KB rho tx Fluid number;temperature;concentration(%) Concentration % KB x tf Fluid number;freezing point Max temperature ℃ KB tmax Fluid number(gives maximum temperature) Min temperature C KB tmin Fluid number(gives minimum temperature) KB CoolantDe Fluid number name scrNO Fluid number KB CoolantDe Fluid number name scr Fluid number KB_GetAllNam Fluid number es Give a Fluid number-returns all number in the library
Function name Unit Function call Ingoing parameters Specific heat J/kgK KB_cp_ttf Fluid number; temperature; freezing point J/kgK KB_cp_tx Fluid number; temperature; concentration (%) Dynamic viscosity Pa s KB_dv_ttf Fluid number; temperature, freezing point Pa s KB_dv_tx Fluid number; temperature; concentration (%) Actual temperature oC KB_t_hx Fluid number; enthalpy; concentration (%) Thermal conductivity W/mK KB_tc_ttf Fluid number; temperature; freezing point W/mK KB_tc_tx Fluid number; temperature; concentration (%) Freezing point oC KB_tf_x Fluid number; concentration (%) Specific volume m3/kg KB_v_ttf Fluid number; temperature; freezing point m3/kg KB_v_tx Fluid number; temperature; concentration (%) Density kg/m3 KB_rho_tx Fluid number; temperature; concentration (%) Concentration % KB_x_tf Fluid number; freezing point Max temperature oC KB_tmax Fluid number (gives maximum temperature) Min temperature oC KB_tmin Fluid number (gives minimum temperature) Fluid number name - KB_CoolantDe scrNO Fluid number Fluid number name - KB_CoolantDe scr Fluid number Fluid number - KB_GetAllNam es Give a Fluid number – returns all number in the library