Professional Documents
Culture Documents
Abstract: This research aims to investigate the complexity of working on nested multi-variable equations of solar
radiation used by mechanical engineers and how the programming languages (Matlab, C++, and even Excel spread-
sheet) could facilitate their work. Mechanical engineers used several languages in executing their equations; however,
varieties exist despite coding similarities. The paper first reviews all the previous studies, discussing the advantages
and disadvantages of the recent works, then compares it with the proposed framework built using C++ programming
language platform with the intent to facilitate any sophisticated calculations needed to generate the required result.
The study concluded that mechanical engineers are highly recommended to learn at least the basics of computer
programming by adding such courses to their syllabus to make them able to think logically and polish their problems
solving skills.
Keywords: Mechanical equations, C++ language, programming language, syntax and semantics, Matlab
c 2019 The Author(s). Published by KKG Publications. This is an Open Access article distributed under a Creative Commons Attribution-
NonCommercial-NoDerivatives 4.0 .
Saeed, A. Q. et al. / International Journal of Technology and Engineering Studies 5(5) 2019 164
totype to get the accepted efficiency. Matlab is one of the Therefore, Matlab packages would be preferred more than
most computer programs used in this field, it provides other programming languages.
user friendly environment could easily used to express Other programming languages like (C++, Pascal,
problems in mathematical form and conclude the solu- Fortran) have been widely used by most of engineering
tions [10, 11]. Many researchers satisfied of using Matlab school to teach students how to logically think and solve
programming language [10] has concluded Matlab is the their mathematical problems using computer languages,
best choice for engineer and scientists due to the number to get over the problem of inaccessible source code of
of functions used in linear equation systems and the ca- the commercial packages, however programming is not
pability to graphically demonstrate the attributes of the an easy task, simulating a program using one of these
problem, another [12] has used Matlab programming lan- languages require good programming skills and a enough
guage to simulate the condensation and evaporation inside time for developing, testing and maintenance. Accord-
the still, [13] also used Matlab for theoretical analysis of ing to [20] who have done a research to clarify the role
solar still. Matlab provides advanced built in methods of computer programming in mechanical engineers in
that could be used directly to alleviate the complexity Kenyan universities concluded that Matlab, MathCAD
of programming from scratch hence freeing great time and other software application packages are very relevant
for researchers to concentrate on their basic idea and to be taught to mechanical engineers however 68.75% of
reduced the complexity associated with learning program- graduated students do not have the ability to solve engi-
ming languages. Matlab built-in methods have been used neering problems using computers.
to solve theoretical mathematical aspects in describing C++, Pascal and FORTRAN are0inexpensive, their
an approach for teaching of scientific computing, and source code is accessible so modification and updating
he enhanced the understanding of scientific computing of the simulated problem is relatively possible. [21] has
much more than before [14, 15]. However these ready worked on comparing C++ and another programming
built in methods like ode45 perfectly fits on system of language to discover their usefulness in math-intensive
equations in the first order only and not for second and real word problem regarding the easiness of implementa-
third order equations. Therefore modification must be tion and the usability with other languages, he concluded
done by researcher to utilize the algorithms code and find that C++ programming language has many elegant, good
the solution, this may led to high probability of making expressive features to simplify developing a software of
mistakes during the transformations stages then it would mathematical applications.
be reflected on the final results, needless to mention the
amount of transforming time consumed [16]. Dealing III. SIMULATING EQUATIONS USING C++
with differential0equations of the mathematical0models PROGRAMMING LANGUAGE
of engineering systems mostly encounters difficulties in
To simulate any algorithm we need to analyze it
term of the MATLAB programming.
properly, specify its requirement and understand its work
Another commercial packages used by mechani-
then select the suitable implementation tool, this is called
cal engineers researchers to virtually simulate their work
as logical0thinking. In our proposed paper we have used
are Excel [17] and MatriXx [18], these packages are rel-
C++ programming language to simulate four different
atively cheap and dont require any programming expe-
equations used by mechanical engineer to calculate:
rience, they provides built it functions and formals that
could be used to quickly simulate the problem and get the • Convective heat transfer coefficient.
outputs. Using computer simulation is very important in • Evaporative heat transfer coefficient.
the educating process of engineers [18]. However built-in • Distillate output.
package drawbacks lie in the modification or updating of • Calculating Unknown constant in Nusselt number
the simulation as the source code of functions or formulas expression (C and n values).
is inaccessible. According to [19] 64% of researchers use These equations work incrementally based on vari-
Excel spreadsheets and almost all mechanical engineers ous inputs (constants and variables). Table 1 shows the
arent skilled to write a program or to develop a package. abbreviations used in the formulas.
165 Saeed, A. Q. et al. / International Journal of Technology and Engineering Studies 5(5) 2019
TABLE 1
EXAMPLE OF A FIGURE CAPTION
Abbreviations of the Constants used in the equations Abbreviations and their values
Abbreviations Values
Designing a program code to execute and experi- easily and provides flexible implementing of the code in
ment a specific mathematic formula requires deep ana- the future in case of modifying (adding/deleting) func-
lyzing of the system, though we meant to breakdown the tions to the formula. Fig. 1 explicit the scheduling and
designing process into smaller parts (functions) in order precedence of design stage:
to facilitate the coding process, track and catch errors
Testing of
Programs
Density (ρ ) : 353.44/ (Tv + 273.15) (5) Where mew is the Distillate output (kg) expressed
(Pv − Pct ) (Tw + 273) as:
δ T; Tw − Tci + (6) mew = R.C(Gr.Pr)n (17)
268.9x103 − Pw
Viscosity ( µ ): 1.718.10−5 + 4.620.10−8 Tr (7) C is a constant and the parameter R in Eq. 15 is
derived from a set of equations to calculate distil output
These functions in turn invoke other functions like in kilogram using the following:
(Pci) partial saturated vapor pressure at condensing cover
temperature and (Pw) Partial saturated vapor pressure 0.01623 λ
R= · · Aw .t. (Pw − ϕ · Pci ) (18)
at water temperature which are encoded based on the ∆hv Lv
following:
In the built code Eq. 16 is a function which invokes
Pw = exp [25.317 − 5144/ (Tw + 273)] (8) Pw(water temperature) and Pci(condensing cover temper-
ature) functions to get their values in a specific time slap
Pci = exp [25.317 − 5144/ (Tci + 273)] (9) under other conditions like thermal humid air and relative
The second half of the Eq. 1, shown below, also humidity to calculate mew and then the value of y.
encoded as a standalone function as follow: Fulfilling all the requirements of Eq. 12 and Eq. 13
equations will facilitate in finding Eq. 17 which is as:
µ ·Cp
Pr = (10)
λ C = exp (C0 ) (19)
Simulating of Eq. 9 using C++ programming lan-
Some other equations programmed as the same
guage illustrated below is actually a sub function invoked
approach as discussed above, are:
by program during the calculation process:
(Pw − Pci ) (Tw + 273) 1/3
f loatPr( f loatT v) hcw = 0.884 Tw − Tci + (20)
268.9 × 103 − Pw
{return((viscosity(T v) ∗Cp(T v))/T hermal(T v))}
(11) And:
The terms (viscosity, Cp and Thermal) written in
the code above are in fact sub functions invoked internally λ n Pw − ϕ · Pci
hew = 0.01623 · · (Gr · Pr) (21)
calculated as: Lv Tw − Tci
REFERENCES
[1] B. Milasinovicc and K. Fertalj, “Issues and chal-
lenges of adopting agile methodologies in software
engineering courses,” International Journal of Tech-
nology and Engineering Studies, vol. 4, no. 5, pp.
197–202, 2018. doi: https://dx.doi.org/10.20469/
ijtes.4.10004-5
[2] T. A. Grossman. (2008) Source code protec-
Fig. 3. Usage ratio of C++, Matlab and Excel by 101 Mechani- tion for applications written in microsoft excel
cal engineer and google spreadsheet. [Online]. Available:
Lastly, Runtime is almost the same for all (C++, https://bit.ly/3iaO36S
Matlab and Excel) where indication varies in the range of [3] T. S. Sokolova, P. I. Dorogokupets, A. M. Dymshits,
(88-100) which reflects the velocity of running a code or B. S. Danilov, and K. D. Litasov, “Microsoft excel
a function. spreadsheets for calculation of P–V–T relations and
thermodynamic properties from equations of state of
V. CONCLUSION AND RECOMMENDATIONS MgO, diamond and nine metals as pressure markers
Mechanical engineers over years have used differ- in high-pressure and high-temperature experiments,”
ent programming languages to fulfill their needs regard- Computers & Geosciences, vol. 94, pp. 162–169,
less languages advantages or disadvantages. This study 2016. doi: https://doi.org/10.1016/j.cageo.2016.06.
shows that the core benefit of using programming lan- 002
guages by mechanical engineers could be summarized in [4] S. Litt. (2018) Mitigating spreadsheet risk in com-
the excellence of performance, high efficiency, accurate plex multi-dimensional models in excel. [Online].
results, less effort and less time required to accomplish a Available: https://bit.ly/2GbAZkd
Saeed, A. Q. et al. / International Journal of Technology and Engineering Studies 5(5) 2019 168
[5] P. L. Bewig. (2013) How do you know your of Thermal & Environmental Engineering, vol. 3,
spreadsheet is right? [Online]. Available: no. 2, pp. 113–120, 2011.
https://bit.ly/2Sas84Q [14] P. R. Turner, “Teaching scientific computing
[6] P. L. Li, A. J. Ko, and J. Zhu, “What makes a great through projects,” in FIE’99 Frontiers in Education.
software engineer?” in Proceedings of the 37th In- 29th Annual Frontiers in Education Conference. De-
ternational Conference on Software Engineering, signing the Future of Science and Engineering Edu-
Florence, Italy, 2015. cation, Puerto Rico, PR, 1999.
[7] S. Mahmudova, “Features of programming lan- [15] M. A. Rawajbeh, I. A. Haddid, and H. Al-Zoubi,
guages and algorithm for calculating the effective- “Adoption of cloud computing in higher education
ness,” Journal of Information Sciences and Comput- sector: An overview,” International Journal of Tech-
ing Technologies (JISCT), vol. 8, no. 1, pp. 769–780, nology and Engineering Studies, vol. 5, no. 1, pp.
2018. 23–29, 2019. doi: https://dx.doi.org/10.20469/ijtes.
[8] P. Byrne and G. Lyons, “The effect of student at- 5.10004-1
tributes on success in programming,” in Proceed- [16] W. K. Ahmed, “Advantages and disadvantages of
ings of the 6th Annual Conference on Innovation using MATLAB/ode45 for solving differential equa-
and Technology in Computer Science Education, tions in engineering applications,” International
Canterbury, UK, 2001, pp. 49–52. Journal of Engineering, vol. 7, no. 1, pp. 25–31,
2013.
[9] J. Li, “Computer-aided design, modeling and sim-
[17] J. Walkenbach, Excel 2007 Bible. Hoboken, NJ:
ulation of a new solar still design,” Modelling and
John Wiley & Sons, 2007.
Simulation in Engineering, vol. 2011, pp. 10–15,
[18] D. Ibrahim, “Engineering simulation with MAT-
2011.
LAB: improving teaching and learning effective-
[10] S. Sen and G. A. Shaykhian, “Matlab tutorial for sci- ness,” Procedia Computer Science, vol. 3, pp.
entific and engineering computations: International 853–858, 2011.
Federation of Nonlinear Analysts (IFNA); 2008 [19] O. Shoewu, “Problem solving using programming
World Congress of Nonlinear Analysts (WCNA),” language,” Pacific Journal of Science and Technol-
Nonlinear Analysis: Theory, Methods & Applica- ogy, vol. 10, no. 2, pp. 408–412, 2009.
tions, vol. 71, no. 12, pp. 1005–1020, 2009. doi: [20] E. Ogur and W. O. Ogola, “The role of computer
https://doi.org/10.1016/j.na.2009.01.069 technology in mechanical engineering education in
[11] D. Higham and N. Higham, MATLAB guide. Kenyan Universities,” The International Journal Of
Bangkok, Thailand: Siam, 2005. Engineering And Science (IJES), vol. 2, no. 11, pp.
[12] M. I. M. Shatat, “New and renewable energy and 77–81, 2013.
environmental engineering,” Durham University, [21] S. Frame and J. W. Coffey, “A comparison of func-
Durham, England, Unpublished master’s thesis, tional and imperative programming techniques for
2008. mathematical software development,” Journal of
[13] O. Badran, “Theoretical analysis of solar distilla- Systemics, Cybernetics and Informatics, vol. 12,
tion using active solar still,” International Journal no. 2, pp. 1–10, 2014.