It is very common for students to have trouble when completing their engineering calculations. Professor Sachs at MIT has written some excellent guidelines for doing calculations. READ THEM AND TAKE THEM TO HEART. This document is intended to show you some examples of how to clearly present your work in the various software packages. It also points out the pro's, con's, and pitfalls of each.
There are three basic packages available at MIT for doing basic engineering calculations. They are:
It is the easiest to read, complicated equations can be typed in very quickly, and it keeps track of units for you. These three features make it very easy to write, catch errors, and grade. Very easy to enter and solve linear systems.
This is good for displaying multiple designs side by side. How ever if you use it in this manner you can not take advantage of the ability to give the cells meaningful names. Grading or reviewing a design done in excel is difficult because you can't see the equations that were used. So, you have to have additional paperwork to show the equations used for each cellt. Very tedious to enter and solve linear systems.
Good for doing big numeric analysis. Code can be difficult to read, understand, and grade if it is not commented well, and variables are not given meaningful names. Very nice plotting features. Good at solving linear systems, but entering the matrices can be a pain.
Below are some example problems showing a good method of presenting your work in the various software packages. What you hand in should be very clear and easy to follow. To do well on your calculations keep the following in mind. Have a clear idea of what you know and what you are looking for. State these clearly at the top of your calculation.
This is Example 4.2 from A. F. Mill's Basic Heat and Mass Transfer (BHMT).
We are interested in finding the coefficient of convection for an air stream traveling between two plates. The plates have a temperature of 600 K and the average bulk temperature of the air is 400 K. The air is flowing at 0.11 kg/s, and the channel between the plates is 1 cm wide and 0.5 meters high. The channel is 0.8 meters long. The entrance has a 90 degree edge.
MathCAD is far and away my favorite package (of the three above) for heat transfer problems. This is due to the amount of unit checking that is needed and the complexity of the equations that are typically involved. If I wanted to test a different plate size and the values were given in inches, I could just enter the new values for w, h, and l (in inches), and keep the fluid parameters in metric units (much more convenient to look up in metric) and it would calculate hc correctly.
NOTE: If you are using units in MathCAD make sure you don't give variables the same name as a unit that you are using. For example if you are using the unit of meters (m) then do not also denote the mass of an object with the variable m. This will really screw things up.
Download this MathCAD file (heatxfer.mcd)
The following is an example of a well laid out Excel spread sheet. It produces the exact same solution as the MathCAD file above, however...
First I do the calculation out by hand. This ensures that I understand the problem, and that I am not simply the plugging things blindly into cells. It also give an easy way to check the spread sheet. Given the same inputs I should get the same result as the hand calculation. Doing the calculations by hand first, is much less important in MathCAD because units are tracked automatically and it is easy to read the equations.
Download this Excel File (heatxfer.xls)
It is almost always worth your time to write an m-file when doing a calculation in MATLAB rather then doing it from the command line. Below is the m file for the above problem. Notice the amount of commenting. This is important for the grader to follow what you did AND for you to understand it when you look at the file again after not having not thought about it for several weeks or months. Much like an Excel spreadsheet, a lot of mistakes and agony can be saved if you solve the problem first by hand. The same hand calculations used in the Excel example were used here.
Download this MatLAB file (heatxfer.m)