Chapter 1
Chapter 1
Chapter 1
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
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
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.
The numerical computations play an important role within the general framework of
modeling and problem solving.
Chapter 1 - Page 3
MEE3017 Computer Modeling Techniques in Engineering
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
By rearranging Eq. (1.2), we find that the numerical error is equal to the discrepancy
between the truth and the approximation, as in
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.
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
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.
Chapter 1 - Page 5
MEE3017 Computer Modeling Techniques in Engineering
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.
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.
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).
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.
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.
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
Case study:
• A problem description.
• Modeling the problem.
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.
Chapter 1 - Page 8