|
ME 290 - Computer
Programming Applications
Introduction
ME 290 is an undergraduate class whose purpose
is to introduce the concepts of programming to mechanical
engineers.
Mechanical Engineers have traditionally concerned
themselves with the design, analysis and manufacturing of
mechanical devices. Objects of such studies include everything
from automobiles and airplanes to photocopy machines and
coffee pots. In fact, any machine that requires energy (gas,
electric, heat) and has parts that either move (pistons),
or bend (wing of a plane) is a proper focus of the study
of mechanical engineering. The field of mechanical engineering
depends on several sub-disciplines.
- The discipline concerned with the motion of objects is
called kinematics:
this word comes from the Greek and literally means the
study of motion.
- The discipline concerned with the motion of objects and
the forces that produce them is called dynamics:
this word comes from the Greek and means the study of
power.
- Naturally, materials can move and deform, and they do
so with energy. Thus, the study of mechanical engineering
is also concerned with the study of energy. This is called: Thermodynamics:
how energy is converted into motion. In addition, some
aspects of mechanical engineering are concerned with fluids,
how they flow, and how fluids re-distributed heat and energy.
Together, these studies, and several others are the foundation
of the field of mechanical engineering.
All of the above fields of study can be formulated
in terms of mathematical equations that involve the calculus.
Often, these equations are quite complicated to solve. Sometimes
they are so complicated, their solution requires the use
of computers.
To solve complicated equations using computers,
the equations have to be very well organized (the process
of doing this is called: writing an algorithm). Next, one
has to translate the algorithm into a language the computer
understands. The language understood by all computers is
the binary language.
Consider the following: A computer understands
a language called binary. So if we write a computer program
in English, one needs to translate that into binary (because
humans do not speak Binary and computers do not speak English).
). In between the high level language that we, as humans,
speak (i.e., English or Spanish), and the language that computers
speak (binary), are a series of intermediate languages.
So if we, as scientists, choose to ask a computer for assistance
in solving the equations of mechanical engineers, we tend
to make the request in one of these intermediate languages.
Sometimes, engineers and scientists do not even bother to
write a computer program in English: they use a language
that is higher up on the scale (but even then, that language
must be translated and then translated again and again until
it appears in binary so the computer can understand it.
One can use software packages such as Mathematica and Matlab to
solve the equations. But if one does that, then that must
then be translated and then translated again. The ìcloserî the
original language is to Binary, the faster the computer can
solve it. So, if you write your algorithm in a computer language
that is just a few steps away from Binary (such as FORTRAN, C, PASCAL, ADA),
then, with just one translation, the instructions appear
in binary and the computer can understand it.
Practically speaking most mechanical engineers
today only need the higher level tools such as Matlab or
Mathematica. So why, then, do we study language such as C
or FORTRAN or Java? We study these languages for two reasons.
First, if we understand how the basic lanagues work, it will
be very easy to gain an intuitive understanding of how the
higher level tools work (for those higher level tools are,
themselves, written in C and FORTRAN). But there is a much
more important reason to learn these languages: agility.
Today, machines are different; they are not
just mechanical. Today's machines have processing units just
like computers. Today's machines can think. So if tomorrow's
engineers must design thinking machines, it is better for
tomorrow's engineers to understand how computers think. And
that is made much easier if one understands a language close
to the "heart and soul" of a computer.
|