This article describes the development of an educational Excel -based modelling platform for computer - aided analyse s and optimisation of thermal -fluid systems and highlights its capabilities for fundamental, design -based and research -oriented analyses . The article initially focus es on the capabilities of the two main components of the platform , which are Excel and the Solver add -in, and gives examples of fundamental and design -oriented analyses from flui d-dynamics and heat -transfer. It then shows how VBA could be used to develop a general multi -fluid Excel add -in that extends the platform capabilities to cover thermodynamic analyses . The article also describ es a technique for multi -objective optimisation (MOO) analyses of thermal -fluid system s by using the TOPSIS decision -making method and Solver . The technique enables the Excel -based platform to conduct MOO analyses without limiting the number of design variables . Finally, the article highlights the capabilities of the Excel -based platform for research applications by giving an example of a combined ORC -TFC cyc le for utilising the low -temperature heat sources such as solar energy , geothermal energy, and industrial waste . Introduction Without engineering, civilis ation does not exist [1 ]. However, t he rapid consumption of the non - renewable energy resources by the construction and operation of large engineering projects, the emissions of greenhouse and ozone -layer depleting gases, and the destruction of the flora and fauna have led to serious environmental problems that now affect the entire globe. Therefore, o ur future engineers have to be more skilful and creative in their job in order to minimise the adverse impact of their activities and our education al system s has to be more effective in equipping them with the needed theoretical knowledge and analyti cal problem -solving skills. The view that the traditional curricula and teaching methods cannot cope with the required pace of the learning process is also supported by the fact that the engineering systems themselves are becoming increasingly complicated by introducing new technologi es more frequently than before [2]. As a r esponse to the calls from industry , the integration of software -based application with theoretical methods have now become essential in the various engineering study programs [3]. The need to use electronically -based teaching materials during the COVID -19 pandemic also accelerated the use of computer -based demonstration methods to replace or supplement the traditional lab expe riments in many engineering curricula [4]. But, how can computer s and computer software be used to improve the learning process ? According to Niazkar and Afzali [5], a simple answer t o this question is that computer -based methods eliminate the tedium and error -prone nature of hand calculations and integrate the students’ knowledge of the basic analytical tools with t heir computer -oriented skills . However, according to Hofmann et al. [ 4] the full benefit of computer -aided methods can only be realised by introducing the necessary changes in the course contents and teaching methods themselves since the traditional university courses, especially the introductory courses, only go up to the third category of the six categories of the cognitive process which are: remember, unders tand, apply, analys e, evaluate, and create [6]. According to Hofmann et al. [ 4], the study goals of modern courses should be to reach the sixth level whereby the students become able to work scientifically on themselves and plan research paper s on a given topic. Concerning engineering scienc es, they recommended that it is essential to get into independent practice -relevant action in the curriculum as early as possible . There are three levels of undergraduate engineering courses and pro jects: (1) the fundamental courses, (2) the design -oriented courses, and (3) the student ’s graduation projects and research assignments. By enabling the students to perform sensitivity analyses and optimisation analyses at the three levels , computer -aided methods enable the three high -order -thinking (HOT) categories of the cognitive process to be achieved . Draft 2 2 Thermo -fluids, which a common name for thermodynamics, fluid -mechanics, and heat -transfer, are fundamental course s for most engineering disciplines including agricultural engineering, chemical engineering, civil engineering, electrical engineering, mechanical engineering , petroleum engineering and others . The two fundament al principles in thermo -fluid analyses are the c onservation of mass and the conservation of energy (the first law of thermodynamics ). Another common feature of thermo - fluid analyses is the necessity of account ing for the losses that occur in the relevant systems due to friction , heat-transfer , and irreversibility . Since steady -state and uniform systems are usually considered in the three subjects , the ir fundamental problems mostly involve algebraic equations . However , because of dependence of the physical properties of the fluids involved on the applied pressure and/or temperature , the equations can be nonlinear and, t herefore, many thermo -fluid problems require iterative solutions by using computer -aided methods . Computer -aided methods are also needed because certain problem s result in systems of algebraic equations, e.g., solving the steady heat-conduction equation by using the finite -difference method. Optimisation analyses are another type of thermo -fluid analyses that need computer -aided methods , e.g., determining the appropriate fraction of steam to be extracted in a regenerative Rankine cycle, determining the economic pipe diameter for a given pump -pipe system, and determining the economic thickness of insulation for a circular duct . The idea of using spreadsheet software in ge neral, and Microsoft Excel in particular, for teaching of engineering subjects is not new [3,5,7,8]. The reason for this was the widespread availability of Excel on most personal computers without additional cost and its powerful tools for data analysis and visualisation . According to Oke [ 9], Excel enables simplified program development and debugging, and the use of named ranges and labels enhance the readability of its formulae . The ability to manipulate matrices heightened its popularity and t he use of macros for looping and other high -level programming needs also promoted its acceptability . According to Ahmadi -Brooghani [7], using Excel as a modelling platform in the basic engineering subjects improves the learning process, helps the students with thei r design assignments and final -year projects, and provides future engineers with an effective prob lem-solving tool for their job . Moreover, t he general -purpose software has an important advantage over the dedicated software by allowing the students to deve lop white -box models for their analyses [8]. Rather than using Excel as a teaching aid for a specific subject or a specific type of problems, the present approach aimed at developing a general Excel -aided modelling platform that can be used to perform fluid-thermal analyses as varied as solving type-2 and type -3 pipe flow problem s, solving a two-dimensional heat -transfer problem by using the finite -difference method, performing optimisation design analysis of a pipe-network with multiple loops, analysing a gas -turbine system with intercooling, regeneration, and reheat, analysing the regenerative Rankine cycle with multiple feed - water heaters, analysi ng a cascade vapour -compression refrigeration (VCR) system with various working fluids , and perfor ming multi-objective optimisation (MOO) and exergoeconomic analyse s of gas-turbine cogenerat ion systems . Therefore, the modelling platform should provide the analytical tools required for conducting iterative solutions and optimisation analyses and for thermodynamic analyses it should also provide the means to determine the thermodynamic properties of various working fluids. The development of this general platform has been achieved by: 1) Developing a multi -fluid Excel add -in called Thermax that prov ides functions for determining the physical properties of the two most commonly used fluids , which are air and water/steam, in addition to 29 ideal gas, 32 synthetic and natural refrigerants, two solutions for vapour - absorption refrigeration ( VAR ) systems, as well as functions for psychromet ric analyses and combustion analyses. 2) Developing Excel -aided models for numerous fundamental and design -based analyses of thermal -fluid systems , with proper documentation , so that the models can be used for Draft 2 3 problem-based and design -based teaching of thermo -fluid courses such as thermodynamics II, applied thermodynamics, fluid -dynamics II, and computer applications . 3) Developing a technique for multi -objective optimisation analyses of fluid -thermal systems by using Excel’s Solver with the TOPSIS decision -making method [10] . The effectiveness of this technique , which allows any practical number of design parameters to be considered as design variables, is proven by comparing its solutions with those of the MIDACO solver [ 11]. The modelling platform has four components which are: (1) Excel with its user interface , (2) the Solver add -in, (3) Thermax for determining fluid properties , and (4) Visual Basic for Applications (VBA ) for developing additional user -defined functions . The present article aims to highlight the roles of the four components , give examples of using the platform for fundamental, design -based, and research analyses , and outline the areas for future application and development . Exploiting E xcel’s built -in capabilities Excel is commonly used for statistical analyse s and graphical display of data . However, the software developer s have equipped it with analytical tools that many students and Excel -users are not aware of or seldom utilise. These include the following three features : 1. The matrix functions that include addition, multiplication, and inversion of matrices 2. Excel’s own iterative solver (by invoking the circular -calculation option) 3. The Goal Seek command . While t he matrix functions can b e used for solving systems of algebraic equations by applying the matric -inversion method , the internal iterative solver is more suitable for solving small systems of equations such as those resulting from exergoeconomic analyses of energy -conversion systems . The Goal Seek command is a simple , but very useful tool for “What -If” type of analyses. By using these built-in features, Excel has been used for solving various fundamental problems in fluid-mechanics [12-15] and heat -transf er [16-19]. A good example of the basic fluid -mechanics problems that require iterative solutions is a type-2 or type-3 flow problem and a good example of the basic heat-transfer problems that involve algebraic system of equations is the solution of the two-dimensional conduction heat transfer with heat -generation shown on Figure 1 by using the finite -difference method [16]. Figure 1. Finite -difference grid for solving the 2D heat -conduction with heat -generation problem [16] Constrained iterative solutions and optimisation analyses by using Solver The Solver add -in developed by Frontline [20] gives a significant boost to Exc el’s analytical capabilities . Solver can be used for conducting constrained iterative solutions of various fluid- dynamics and heat -transfer problems with numerous changing variables by using three solution methods, viz., the Simplex LP method, the GRG Nonlinear method, and the Evolutionary method . Draft 2 4 However, the more important role for Solver is that it enables Excel to be use d for performing single - objective optimisation analyses of fluid systems with practical complexity such as pipe network s [12- 15]. Figure 2 shows a pipe network with eight loops described by Brkic [15]. By using it s own built -in analytical tools and Solver, Excel can deal with various types of fluid -mechanics and heat -transfer analyses that usually do not involve significant changes in the physical properties of the fluids involved. However, for thermodynamic analyses a means for determining the thermodynamic fluid properties is required . The following section shows how this requirement has been met by developing the Thermax add -in. Figure 2. A pipe -network with 8 loops (adapted from Brkic [ 15]) Thermodynamic analyses by using Thermax There have been many previous attempt s to develop special educational Excel add-ins for determining fluid properties , but most of these add-ins had limited options . For example, Goodwin [ 21] developed TPX (Thermodynamic Properties for Excel), that determines the properties of five gases (H 2O, H 2, O2, N 2, CH 4) and refrigerant R 134a. The Mechanical Engineering Department at the University of Alabama developed Thermotable s that determines the thermodynamic pr operties of various ideal gases, water and superheated steam, and four refrigerants R134a, R22, R410A, and R407C [ 22-24]. Oko and Diemuodeke [ 25] developed an add -in for thermodynamic properties of R152a. Dumka et al. [26] used Excel with Thermotables for analysing the influence of bleed pressure on Rankine cycle performance. Jack [ 27] developed an Excel sheet for c omputerised calculations of thermo -physical properties of steam and air . Karimi [ 28] used Excel for thermodynamic analyses of air -standard cycles and combustion processes. The add -in for thermodynamic property calculation with Excel with the largest number of fluids was that developed by Caretto et al. [ 29] which supports forty substances ten of them are refrigerants . Their add -in identifies the various substances with numbers ; air being identified with the number 1 and water with the number 40 . The tool can be used to determine individual state points by a graphical user interface (GUI) calculator and can also be used to build models of ther modynamic systems by using the spreadsheet cell formulas and VBA function calls. They say the journey of thousand miles begins with a single step . The journey for developing Thermax began with the development of a VBA function for interpolating the tabulated enthalpy and relative pressure data for air [30]. The interpolation function became the seed for developing property functions for many other fluids and the idea of determining the properties for air alone grew to become that of developing a general multi -fluid add -in [31]. To help the user select the appropriate Thermax function without having to memorise the names of t he numerous functions , the functions have been put in eight groups that deal with specific type of working fluids . Table 1 lists the eight groups of functions provided by Thermax. Note that two separate function groups deal with vapour - absorption fluids which are the “LiB” and “NH3” groups. For the “Gas” and “Ref” groups that include numerous fluids, t he same function can be used by all fluids in the group by making the fluid’s name as an input to the function. Draft 2 5 Table 1. The function groups provided by Thermax # Substance(s) of the group Prefix 1 Ideal gases (29) Gas… 2 Water and steam Wat… 3 Refrigerants (32) Ref… 4 Water lithium -bromide solution Lib… 5 Ammonia -water solution Nh3... 6 Psychrometry Psy 7 Fuels and reacting substances (18) Chm… 8 Air at atmospheric pressure Air… In addition to its fluid property functions, Thermax provides a Newton -Raphson (NR) solver that was originally developed to solve the SRK equation for the specific volume of superheated refrigerants , but later generalised for solving similar non -linear equations such as the Colebrook -White equation. The name style for Thermax property functions Figure 3 shows a function in the water group that determines the enthalpy of saturated water at a pressure of 500 kPa and quality of 0.8 . As the figure shows, the name of the function consists of the following three parts: 1. The first three letters (1) refer to the function’s group, i.e., “Wat” for water/steam. 2. The fourth letter (2), which is followed by an underscore, refers to the function’s output property, i.e., “h_” for enthalpy. 3. The letters after the underscore (3) re fer to the function’s input parameter(s), i.e., “Px” for pressure and quality. Figure 3 . An example function that illustrates t he name style for Thermax functions Using Thermax functions in Excel ’s formulae Thermax functions can be used just like Excel’s own functions. Figure 4 shows an example Excel sheet which was developed for analysing the regenerative Rankine cycle with a single open feed - water heater as described by Cengel and Boles [ 32]. Figure 5 revea ls the formulae used in the cells to determine the thermodynamic properties of water/steam at all the seven states of the cycle. The specified data of the problem are stored on the left side of the sheet, the calculations of the state properties by using T hermax functions in the middle, and the cycle output parameters on the right side of the sheet. The numerical values shown on Figure 4 can be compared with those given by Cengel and Boles [ 32]. Figure 4. The model results for analysing the regenerative Rankine cycle with a single open feed -water heater Draft 2 6 Figure 5 . The formulae in the Excel sheet for analysing the regenerative Rankine cycle with a single open feed - water heater A very useful feature of Excel that enables the intended property function to be easily found is the Function W izard. As Figure 6 shows, the wizard lists all Thermax functions alphabetically starting with those in the “Air” group . Therefore, after being familiar with name style described above , the user can easily select the required property function. Of course, practice makes perfect . Figure 6 . Finding a Thermax function by using the Function Wizard Verification of Thermax property functions in the refrigerant s group Thermax property functions for ideal gases, superheated steam, the two VAR solutions, and the functions for psychrometric and combustion analyses use mathematical formulae obtained from standard text b ooks or the open literature. For example, properties of superheated steam are obta ined by using the formulae provided by Irvine and Liley [33]. The “Air” group functions interpolate the tabulated data given by Cengel and Ghajar [ 34] and the functions for saturated liquid and saturated vapour for water and all refrigerants interpolate the data provided by ASHRAE [ 35]. However, t he functions that determine the enthalpy and entropy of superheated refrigerants use ideal -gas equations in which the specific heat is determined at an adjusted pressure by multiplying the actual pressure by a “com pressibility factor” for which an average value of 0.5 is adopted [ 36]. The accuracy of the se functions was evaluated by comparing their estimations with published data that used other software like EES (Engineering Equation Solver) [37] and REFPROP [38]. Figure 7 and Figure 8 that compare the results of analysing a cascade VCR system with R507A and R23 with those obtained by Parekh and Tailor [ 39] prove the accuracy of these functions . The accuracy of these functions was also verified for a number of other synthetic and natural refrigerants [31,36,40,41 ]. Draft 2 7 (a) (b) Figure 7. Effect of the high -temperature stage condensing temperature on COP, QeB and Wc (a) adapted from Parekh and Tailor [ 39], (b) present results (a) (b) Figure 8. Effect of the low -temperature stage condensing temperature on COP, COP A, and COP B: (a) adapted from Parekh and Tailor [ 39], (b) present results The Solver -TOPSIS technique for multi -objective optimisation analyses The concerns about the damage to the environment and the climate changes caused by use of fossil - fuels for electricity generation call for replacing the conventional power plants by the more efficient cogeneration and tri -generation systems and hybrid and int egrated system s. In addition to the technical and economic factors, design analyses of such system s have to consider the environmental, safety, and social factors. To find acceptable trade -offs between the se usually conflicting objectives the usual single -objective optimisation (SOO) methods have t o be replaced by MOO methods . While Excel’s Solver can easily be used to conduct SOO analyses with practically unlimited number of design variables , it cannot deal with MOO analyses in its present form . The free version of the MIDACO solver [ 10] can be used to conduct MOO analyses involving up to four changing variables. Therefore, a solver that allows the Excel -based platform to include more than four design variables is needed. Considering the difficulty and time required to develop a multi -objective solver [42], the author tried two methods for using Solver to conduct MOO analyses [ 43]. In the first method , Solver was used to obtain SOO solutions for each optimisation objective in addition to any other reasonable objective. T he closest solution to satisfying the multi -objective requirement was then determined by using the TOPSIS decision method [10] . In the second method , TOPSIS wa s utilised in an active way by using Solver to adjust the base design vari ables so as to maximise the value of the factor Ci that measures the relative closeness of the design to the ideal design . The results obtained for various power generation and refrigeration systems show that the technique worked well with the Evolutionary method of Solver . Figure 9 shows a schematic diagram of a cogeneration syste m with an air preheater given by Bejan e t al. [44]. Figure 10 compares the values of thermal efficiency, exerge tic efficiency, total cost rate , and 50060070080090010001100 0.50.550.60.650.70.750.80.850.90.95 25 30 35 40 45 50 Wc, QeB (W) COP TcA(oC) 11.522.533.544.5 0.680.70.720.740.760.780.8 -50 -40 -30 -20 -10 0 COP A, COP B COP TcB(oC) Draft 2 8 CO 2 emissions of the system as determined by three SOO solutions and by the Solver -TOPSIS technique to maximise the exergetic efficiency while minimising both the total cost rate and CO 2 emissions (3E) by adjusting six design variables of the base design . Figure 10 shows that the sol ution obtained by using the Solver -TOPSIS technique gave the highest values of the thermal and exergetic efficiencies and the lowest values of the total cost rate and CO 2 emissions. Figure 9. Cogeneration system (adapted from Bejan et al [ 44]) (a) η (b) ε (c) CTotal (d) m_CO2 Figure 10. Comparison of the Solver -TOPSIS optimised solution and Solver’s three single -objective solutions to the base -design values 0.388 0.407 0.411 0.412 0.415 0.370.380.390.400.410.42 η (-) Base Min Ctotal Max exg eff Min GHG 3E0.524 0.549 0.555 0.556 0.557 0.500.510.520.530.540.550.56 ε (-) Base Min Ctotal Max exg eff Min GHG 3E 3,411 2,980 3,142 3,177 2,780 01000200030004000 Ctotal ($/h) Base Min Ctotal Max exg eff Min GHG 3E273 261 258 258 257 245250255260265270275 M_CO2 (kg) Base Min Ctotal Max exg eff Min GHG 3E Draft 2 9 Research and Innovation A central objective for developing the present Excel -based modelling platform is to encourage students ’ research and innovation by supporting an appreciable number of working fluids and by enabling SOO as well as MOO analyses . In this respect, the platform is particularly useful for the students and institutions in developing countries and independent researchers who do not have access to commercial software. The potential of the platform for research and innovation related to energy - conversion systems is illustrated by the case of the combined organic Rankine cycle (ORC) with a trilateral flash cycle (TFC) shown on Figure 11 . Although b oth cycles have been analysed extensively , the two cycle s are usually compared as alternative cycles and not as a combined cycle. Figure 11. Schematic and T-s diagrams of the combined ORC -TFC cycle (a) (b) Figure 12. Comparison of (a) the power and (b) thermal efficiency of the combined cycle with R1234yf/R152a with those with R152a/R152a and the simple ORC The thermodynamic performance of the combined ORC -TFC cycle was compared to that of the simple ORC c ycle over a range of cascade temperatures by using R152a and R1234yf as working fluids [ 40]. Figure 12 shows that , below a cascade temperature of 80oC, both the power and thermal efficiency of the combined cycle with both R152a/R152a and R152a/R1234yf are higher than those of the simple ORC with R152a . A tri -objective thermodynamic analysis of th e combined cycle is given in [41 ]. 05001000150020002500 60 65 70 75 80 85 90Power (kW) Cascade temperature (oC) Simple ORC R152a/R152a R152a/R1234yf 45678910 60 65 70 75 80 85 90Thermal efficiency (%) Cascade temperature (oC) Simple ORC R152a/R152a R152a/R1234yf (a) (b) 8s 4s ΔTpp ΔTcc 2c 4b 1 2 3 4 T 1 6 7 5 8 s 2b G Cooling water Pump Pump Condenser TFC Heater Expander 6 7 Turbine 2 3 1 4 Cascade condenser 5 8 IHEX ORC Heater 2b 2c 4b Heat source Draft 2 10 Concluding remarks The effort of developing The rmax and preparing numerous models for thermo -fluid analyses would have been futile without being documented as teaching material for relevant courses. In order to be useful at different study levels , the material has been divided it into three books with distinc t focus. The first book focus es on thermodynamic analyses by using the Thermax add -in functions. After giving detailed descriptions of the different add-in function groups, this book gives examples of using the functions for the basic analyses usually covered in standard thermodynamic c ourses including power -generation, refrigeration, psychrometry and air-conditioning, and comb ustion analyses . Moreover, t he book gives examples that are not usually covered in standard textbook including first - law analysis of the organic Rankine cycle (ORC ) with different working fluids and first -law and second -law analyses of the VAR cycle and introduces the conventional energy -based thermoeconomic analyses of energy -conversion systems . This book can be used for supporting the standard thermodynamics courses: T hermodynamics I, Thermodynamics II and Applied Thermodynamics. The second book mainly deals with fluid -mechanics and heat -transfer analyses by using Excel’s iterative tools and the Solver ad d-in. It describes the components of the Excel -based m odelling platform in more details by devoting Chapter 2 to Excel and its built -in features and Chapter 3 to Solver, VBA, and Thermax. The following chapters of the book deal with basic iterative solutions and optimisation analyses, solving steady and transient heat -conduction problems by using the finite - difference method, hydraulic analyses of multi -pipe systems, pump -pipe systems , and pipe networks as well as design analyses of fluid -thermal systems, and optimisation analyses of pipelines and pipe - networks. The book can be used as the main reference for an intermediate course on computer applications or to provide supporting material for existing fluid-mechanics and heat -transfer course s. The third book focus es on MOO and exergoeconomic analyses of power -generation and refrigeration systems. It also introduces the Solver -TOPSIS techniq ue and appl ies it for conducting a MOO analysis of a regenerative gas -turbine and dev eloping a n Excel -aided procedure for MOO and exergoeconomic analyses of gas -turbine co -generation systems . Finally, it presents a thermodynamic evaluation and MOO analysis of the combined ORC -TFC cycle. The book can be used in advanced undergraduate courses on energy -conversion systems and to support relevant post -graduate courses. The application and research capabilities of the Excel -based platform can be enhanced by using other property add -ins that have been developed for research and industrial applications such as REFPROP [38], CoolProp [45] and XProps [ 46]. Future plans to extend the research capabilities of Thermax include the dev elopment of a new group for nano -fluids. In addition to developing Excel -aided models for the usual thermo -fluid analyses , the macros and animation tools provided by Excel’s Developer tab can be utilised with the help of Thermax functions for the development of pseudo - physical models of various fluid -thermal systems such as I.C. engines [47]. Acknowledgement s The author benefitted greatly from the efforts of the Mechanical E ngineering Department at the University of Alabama who made the various add -ins developed for their “Excel -for-ME” project available on the internet. Most of t he material needed for the first two books was prepared during the author’s tenure at the College of Applied Sciences (CAS) at Sohar , Oman . The author is truly indebted to CAS for the extended appointment . The author worked on the last book as an independent researcher during a difficult time in Sudan and he is grateful for th e Government of Sudan and her Engineers for their unfailing support without which this article wouldn’t have seen the light .