Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

MEE3017 Computer Modeling Techniques in Engineering

Chapter 1 INTRODUCTION

Computer Modeling
Numerical Computation in Modeling
What You Will Gain from This Subject
High Performance Computing
Visualization in Scientific Computing
Design and Optimization

1.1 Computer Modeling

What computers are used for

Computational activity can be categorized into three different empires:


• Data-base management.
• Numerical computations.
• Artificial intelligence.

Data-base management

• Data-base management includes methods for managing large information files for
banking, airline reservations, and other bookkeeping and practical financial and
inventory tasks.
• These activities are of prime economic importance, but they do not have much
mathematical content and, at present, seem less relevant to missions of engineers and
scientists.
• A prototype data-base management task is the keeping of records of expenditures and
receipts in a business.

Numerical computation

• Numbers are a central concern in database management and are often fundamental to
artificial intelligence. A feature that distinguishes numerical computations from these
other areas is that on a mathematical level, calculus, linear algebra, and mathematical
analysis (differential equations, complex variables, etc.) are the foundations.
• Almost all classical quantitative analysis rely on calculus-based models. At research
level, especially in computer science, procedures based on abstract algebra and logic
are gaining prominence, but still, numerical computations are the standard tools of the
trade in engineering, applied mathematics, physics, and management information
systems.
• Computational science and engineering (CSE)
CSE = Applied disciplines + Mathematics + Computer science = ∆

Chapter 1 - Page 1
MEE3017 Computer Modeling Techniques in Engineering

Computational
Science and
Engineering

Applied
Disciplines

Computer Mathematics
Science

Fig.1 CSE.

Artificial Intelligence

• Artificial intelligence is concerned with using computers to solve decision problems


involving models that are not calculus based.
• A standard computation in this realm involves a time sequence of choices
(presumably machine-made, according to some algorithm).
• At each decision time in the sequence there are only finitely many selections that can
be made.
• Typically, one can get by with integer or symbolic variables; differentiation does not
enter the picture.
• Computer chess programming is a fundamental artificial intelligence activity.

1.2 Numerical computations

Numerical computations in problem solving

For our purposes, a model is a mathematical expression relating (physical, engineering,


economic, etc.) measurable. To mention a famous example, Newton's law of motion,

d2
m x(t ) = F (t ) (1.1)
dt 2

relating linear position x(t) to applied force F(t), is a model. Numerical computations
come into the picture when one wishes to use the model for prediction, experimentation,
or to obtain information from observations. For example, it is possible to use this relation
to determine what forces impinged on a body on the basis of the record of positions x(t).
If the model has a known closed-form solution, one may want to use the computer to
evaluate it at times of interest. Equation (1) dose have a closed-form solution of position,
in response to force F(t), if the second integral of F(t) is known. In the absence of neat
solutions, x(t) can be accurately approximated computationally by integration techniques.

Chapter 1 - Page 2
MEE3017 Computer Modeling Techniques in Engineering

Now, through the powers of numerical computation, much more lavish modeling efforts
than Newton's are undertaken.
A model for the flow of fluids can be the basis of scientific design of hulls for boats,
fuselages of airplanes, and profiles of submarines, to optimize performance in terms of
speed, energy consumption, or noise emission. The subject of fluid dynamics has been
revitalized by computing power and practice. Wind tunnels are being replaced by
computers as design tools for the tasks just mentioned.

Numerical Computation in Modeling

Numerical computations play an indispensable role in modeling itself. We have


mentioned that Kepler spent years making painstaking computations with Tycho Brahe's
data. Most of this effort was not to solve problems involving his model but just to infer
and verify that was indeed the right model. Such chores could have been done clearly and
quickly had Kepler done his work on a computer (in 1600!).

What you will Gain from this subject

The numerical computations play an important role within the general framework of
modeling and problem solving.

The principle components of the field of numerical computations are


• Computer representation of numbers, and the origin and propagation of
computational error
• Function approximation and curve fitting of data.
• Numerical differentiation and integration.
• Solution of linear, nonlinear, and differential equations.
• Visualization in scientific computing.
• High performance computing.
• Design and Optimization.
All these subjects will be studied in detail. The ideas will be reinforced by a multitude of
hand- and machine-computation example and a number of applications to models from
engineering and physics. The benefits of this subject are the following:
• The computational viewpoint and experimentation will help you to understand
principles of applied mathematics and the implications of various physical and
engineering models. The mere task of transcribing formulas and model relations into
computer programs often brings to life the theory you have studied elsewhere.
• Application of computational techniques to case studies in this subject and to your
assignment will enhance your skill in problem solving. You will gain a better
understanding of what is easy and what is challenging.
• Through study of material in this subject, you will come to think of technical
questions in terms of programming and computational demands. Through such
development of your intuition, you will increase your ability to find the most suitable
methodology for practical problems you confront in your career.

Chapter 1 - Page 3
MEE3017 Computer Modeling Techniques in Engineering

• The universality of computers has engendered an industry of software aids. The


industry has provided software packages that seem to automate the application of
numerical methods. In applying such software, the user is typically presented with a
menu from which the general problem area is to be selected. Then another menu
appears which invitees the user to supply needed parameters and particulars about the
problem to be solved. This subject aims at preparing you to be an informed and
intelligent user of modern software technology.
• Most practical engineering problems cannot be properly solved immediately simply
by application of a commercial program. The knowledge of numerical methodology
that you obtain from this subject and the programming skill you acquire through
assignment or self-study will guide you in developing your own programs for tasks
that you confront. In addition, you will build a background for understanding the
rationale behind commercial programs and be able to employ them wisely, in
modular fashion if necessary, for the purpose at hand.

1.3 Approximations and Errors

1.3.1 Error Definitions

Numerical errors arise from the use of approximations to represent exact mathematical
operations and quantities. These include truncation errors, which result when
approximations are used to represent exact mathematical procedures, and round-off
errors, which result when numbers having limited significant figures are used to represent
exact numbers. For both types, the relationship between the exact, or true, result and the
approximation can be formulated as

True value = approximation + error (1.2)

By rearranging Eq. (1.2), we find that the numerical error is equal to the discrepancy
between the truth and the approximation, as in

Et = true value – approximation (1.3)

where Et is used to designate the exact value of the error. The subscript t is included to
designate that this is the “true” error. This is in contrast to other cases, as described
shortly, where an “approximate” estimate of the error must be employed.

A shortcoming of this definition is that it takes no account of the order of magnitude of


the value under examination. For example, an error of a centimeter is much more
significant if we are measuring a river rather than a bridge. One way to account for the
magnitudes of the quantities being evaluated is to normalize the error to the true value, as
in

true error
True fractional relative error = (1.4)
true value

Chapter 1 - Page 4
MEE3017 Computer Modeling Techniques in Engineering

where, as specified by Eq. (1.3), error = true value – approximation. The relative error
can be multiplied by 100 percent to express it as

true error
εt = × 100% (1.5)
true value

where εt designates the true percent relative error.

Truncation Error

The term truncation error refers to those errors caused by the method itself (the term
originates from the fact that numerical methods can usually be compared to a truncated
Taylor series). For instance, we may approximate ex by the cubic
x x2 x3
p3 ( x) = 1 + + +
1! 2! 3!
However, we know that to compute ex really requires an infinitely long series:
∞ xn
e x = p3 ( x) + ∑
n = 4 n!
We see that approximating ex with the cubic gives an inexact answer. The error is due to
truncating the series and has nothing to do with the computer or calculator. For iterative
methods, this error can usually be reduced by repeated iterations, but since life is finite
and computer time is costly, we must be satisfied with an approximation to the exact
analytical answer.

Round-Off Error

All computing devices represent numbers, except for integers, with some imprecision.
(DERIVE and similar programs work with integers and rational fractions to achieve
results of higher precision.) Digital computers will nearly always use floating-point
numbers of fixed word length; the true values are not expressed exactly by such
representations. We call the error due to this computer imperfection the round-off error.
When numbers are rounded when stored as floating-point numbers, the round-off error is
less than if the trailing digits were simply chopped off. We discuss this in more detail
later in the chapter.

Error in Original Data

Real-world problems, in which an existing or proposed physical situation is modeled by a


mathematical equation, will nearly always have coefficients that are imperfectly known.
The reason is that the problems often depend on measurements of doubtful accuracy.
Further, the model itself may not reflect the behavior of the situation perfectly. We can
do nothing to overcome such errors by any choice of method, but we need to be aware of
such uncertainties; in particular, we may need to perform tests to see how sensitive the
results are to changes in the input information. Since the reason for performing the
computation is to reach some decision with validity in the real world, sensitivity analysis

Chapter 1 - Page 5
MEE3017 Computer Modeling Techniques in Engineering

is of extreme importance. As Hamming says, “the purpose of computing is insight, not


numbers.”

1.3.2 Propagated Error

Propagated Errors more subtle than the other errors. By propagated error we mean an
error in the succeeding steps of a process due to an occurrence of an earlier error  such
error is in addition to the local errors. It is somewhat analogous to errors in the initial
conditions. Some root-finding methods find additional zeros by changing the function to
remove the first root; this technique is called reducing or deflating the equation. Here the
reduced equations reflect the errors in the previous stages. The solution, of course, is to
confirm the later results with the original equation.

In examples of numerical methods, propagated error is of critical importance. If errors are


magnified continuously as the method continues, eventually they will overshadow the
true value, destroying its validity; we call such a method unstable. For a stable
method the errors made at early points die out as the method continues.

Each of these types of error, while interacting to a degree, may occur even in the absence
of the other kinds. For example, round-off error can occur even if truncation inaccuracies
even if we can attain perfect precision in the calculation. The usual error analysis of a
numerical method treats the truncation error as though such perfect precision did exist.

1.4 High Performance Computing

Vector computers

• These computers can be used for the majority of continuum-model problems, as well
as for many particle-model problems.
• Continuum model; a model of physical systems in which continuous quantities are
modeled at discrete points and physical interactions are modeled as interactions
among neighboring mesh points.
• Particle model; a computational process in which physical behavior is modeled
through the simulation of discrete particles acted upon by physical forces produced
remotely.
• The vector computer has emerged as the most important high-performance
architecture for numerical problems. It has the two key qualities of efficiency and
wide applicability.

Parallel computers

• There are many ways in which parallel computers can be constructed. These
computers differ along various dimensions such as control mechanism, address-space
organization, interconnection network, and granularity of processors.

Chapter 1 - Page 6
MEE3017 Computer Modeling Techniques in Engineering

• Control mechanism; processing units in parallel computers either operate under the
centralized control of single control unit or work independently.
• Address-space organization; Solving a problem on an ensemble of processors
requires interaction among processors. The message-passing and shred-address-space
architectures provide two different means of processor interaction.

Classification of Computers
A single-instruction, multiple-data- stream machine(SIMD).
A multiple-instruction, multiple-data-stream machines(MIMDs).

1.5 Visualization in Scientific Computing

Scientific visualization is a new and emerging area that is having an impact on how
computers are used in research and engineering practicing. Scientific visualization is
concerned with techniques that allow scientists and engineers to extract knowledge from
the results of simulations and computations.

Advances in scientific computation are allowing mathematical models and simulations to


become increasingly complex and detailed. This results in a closer approximation to
reality thus enhancing the possibility of acquiring new knowledge and understanding.
Tremendously large collections of numerical values, which contain a great deal of
information, are being produced and collected. The problem is to convey all of this
information to the scientist so that effective use can be made of the human creative and
analytic capabilities. This requires a method of communication with a high bandwidth
and an effective interface.

Computer generated images and human visions mediated by the principles of perceptual
psychology are the means used in scientific visualization to achieve this communication.
The foundation material for the techniques of scientific visualization are derived from
many areas including computer graphics, interactive computer graphics, image
processing, computer vision, perceptual psychology, applied mathematics, computer
aided design, signal processing, numerical analysis, and so forth.

MATLAB’s user’s interface and visualization functions can be used to present the
electromagnetic properties. After the appropriate representations of the data have been
constructed, information can be superimposed onto the surface, to provide further insight
into the complex character of electromagnetic phenomena.

1.6 Design and Optimization

Design is one of the principal activities of the practicing engineer. It refers to the
development of an entity (an object, a system, a procedure, etc.) to perform a specified
function.

Among the goals of design is optimization of the entity. To achieve that goal, we must
have some way of deciding what makes one solution better than another. Such a measure

Chapter 1 - Page 7
MEE3017 Computer Modeling Techniques in Engineering

or standard of comparison is known as a criterion. The process is further complicated by


the existence of requirements that must be met if the design is to be acceptable. These
requirements are the constraints of the problem.

1.6.1 Design Process

1. Define the problem.


2. Decide what output data are required to specify a solution to the problem.
3. Decide what input data are required to formulate the problem.
4. Develop models that can be used to obtain the required output from the input data.
5. Use the models to obtain a solution for a given set of input data.
6. Evaluate the solution in terms of the constraints and criteria.
7. Repeat as many parts of the process as necessary to obtain a satisfactory solution.

Case study:

• A problem description.
• Modeling the problem.

1.6.2 Optimization Methods

Optimization of a design often involves steps 5, 6 and 7 of the design process. It typically
requires us to determine a solution for a given set of input data, and to iterate to an
optimum based on evaluations of previous solutions.

We remark here that there are a variety of methods for the unconstrained global
optimization problem. Some of them involve searches that require evaluation of only the
criterion function. The more classical approach requires a solution of the system of
equation that is obtained by setting the partial derivatives of the criterion function to zero.
The root-solving methods would be useful with this approach.

The presence of constraints rules out the direct zero-derivative approach because the
optimum solution of the constrained problem does not generally coincide with a
stationary point of the criterion function. Instead, we often find an optimum value with
nonzero derivatives at a point on one or more of the constraint boundaries.

Various Optimization Methods:


• Exhaustive searching.
• Searching on constraint boundaries.
• Lagrange multipliers.
• Genetic algorithms.

Chapter 1 - Page 8

You might also like