HOME Computing Tools - some suggestions

Introduction

Any engineering student or professional needs a set of computing tools and a modeling framework. A nuclear engineer especially needs to model a reactor design prior to construction, commissioning and operation. This invariably involves programming to some degree. The student should be spending his or her time on learning engineering concepts, not on programming or learning yet another computer application. So what programming language and what applications should the student focus on?

What are the needs?

To answer this, we should first ask what the computer tools are needed for? Well, primarily, the student (or professional for that matter) will need to compute the answer to some model formulation, perhaps a steady state flux distribution, a fuel burnup calculation, a temperature distribution, a reactor kinetics calculation, and so on. In school, the problems are not usually large so there are many tools (such as spreadsheets, MATLAB, MATHCAD, and so on), that can be used. But, engineering school should prepare one for professional life, which, in this instance, means accurate solutions to real problems. You will find that the above tools do not have the speed and are confining when used for large problems. No one tool is appropriate for all problems. Sooner or later, you will have to learn a programming language.

Programming languages and other tools

I personally favour C. It is simple, fast and powerful. It is a good stepping stone to C++. What you learn in C will never go astray, even if you later switch to another language since the concepts and constructs are universally sound. Unfortunately, it does not natively support plotting graphs, so we need to augment C with a plotting tool. One simple solution is to dump your answer to a text file and to import it into a spreadsheet for plotting and other post-processing.

Speaking of spreadsheets, just about every student these days has a computer with a word processor and a spreadsheet on it. Microsoft Word and Excel are common. So are WordPerfect and Quattro. Wouldn't it be nice if you could extend your spreadsheet to do programming. Guess what, you can! Excel, for instance, now includes VBA (Visual Basic for Applications). It is really easy to write a Basic program within the spreadsheet to do modeling calculations. You can also call executables that you wrote in C, FORTRAN, Pascal or whatever. So it is a good starting point.
Excel VBA calculation example
(xlsm 22kb) - Consider using Excel VBA as a computing tool.

What about FORTRAN? A dead language? Well, it is getting harder to find FORTRAN compilers but there is a huge amount of legacy code out there in the engineering world that was written in FORTRAN. I wouldn't count it out just yet. And it just might be the ticket to a nice job. But if you know C, you can pick up FORTRAN easily enough. Most math libraries are available in C or FORTRAN. Speeds are comparable.

Visual Basic? I like it. Simple, powerful. But not as speedy as a compiled language like C or FORTRAN. I do like the Microsoft VB development interface that suggests how to complete function calls, etc. Very user friendly. Since the bulk of VB is included in Microsoft Excel (and other Microsoft applications) it is a no cost extension path for students. Well worth a look. It is good for building GUI front ends to codes and for light to moderate calculations. Good place to start as a staging area for the leap into C or C++.

Pascal? Hmmm... nice but it seems to becoming less and less popular. I'd give it a miss.

MATLAB? Really nice up to a point. Powerful, full featured, cheap for students. But, it will only take you so far. Sooner or later, you will need to program. I worry that students become reliant upon its canned routines for solving matrices. I personally prefer to be in full control of my calculations. Still, if used properly, it is one heck of a product. You can also call executables that you wrote in C, FORTRAN, Pascal or whatever. So it is a good starting point.

MATHCAD? Really nice engineering spreadsheet. My comments are the same as for MATLAB except that it is expensive for students.

My recommendation: If it is not already obvious, I recommend that the student learn how to use the macro / VBA facilities in spreadsheets and that the student pick up a free or cheap C compiler. Start using it on a regular basis for assignments and labs. Do not wait until you have to use it because it does take time to learn programming. Use it or lose it,as the saying goes.

See the downloads page for compilers and such.

Above all, I hope that you enjoy modeling and programming. Take it step by step. It is exhilarating once you get into it.