Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

lecture 1 in comp eng, Lecture notes of Computer Science

lecture number 1 in computational engineering

Typology: Lecture notes

2020/2021

Uploaded on 09/27/2023

riawq-deguz
riawq-deguz 🇨🇦

1 document

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AppliedNumericalMethods
withMATLAB®
forEngineersandScientists
4thEdition
AppliedNumericalMethods
withMATLAB®
forEngineersandScientists
4thEdition
Steven C. Chapra
PowerPoints organized by Dr. Michael R. Gustafson II, Duke University and
Prof. Steve Chapra, Tufts University
©McGraw‐HillEducation.Allri
g
htsreserved.Authorizedonl
y
forinstructoruseintheclassroom. Nore
p
roductionorfurtherdistribution
p
ermittedwithoutthe
p
riorwrittenconsentofMcGraw‐HillEducation.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download lecture 1 in comp eng and more Lecture notes Computer Science in PDF only on Docsity!

Applied Numerical Methods

with MATLAB®

for Engineers and Scientists

4th Edition

Applied Numerical Methods

with MATLAB®

for Engineers and Scientists

4th Edition

Steven C. Chapra PowerPoints organized by Dr. Michael R. Gustafson II, Duke University andProf. Steve Chapra, Tufts University ©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.

©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.

Part 1

Chapter 1

Mathematical Modeling,Numerical Methods, and

Problem Solving

©McGraw‐Hill Education.

A Simple Mathematical Model A mathematical model can be broadly definedas a formulation or equation that expressesthe essential features of a physical system orprocess in mathematical terms.Models can be represented by a functionalrelationship between dependent variables,independent variables, parameters, andforcing functions.

©McGraw‐Hill Education.

Model Function

Dependent

variable

𝑓^

independent

variables

,^

parameters,

forcingfunctions

Dependent variable

  • a characteristic that usually reflects

the behavior or state of the system Independent variables

  • dimensions, such as time and

space, along which the system’s behavior is beingdetermined Parameters

  • constants reflective of the system’s properties

or composition Forcing functions

  • external influences acting upon the

system

©McGraw‐Hill Education.

Model Results

Using a computer (or a calculator), the model can be used togenerate a graphical representation of the system. Forexample, the graph below represents the velocity of a 68.1kilogram jumper, assuming a drag coefficient of 0.25kilograms per mile

©McGraw‐Hill Education.

Numerical Modeling

Some system models will be given as implicit functionsor as differential equations - these can be solved eitherusing analytical methods or numerical methods.Example - the bungee jumper velocity equation frombefore is the analytical solution to the differentialequation

𝑑^

2

where the change in velocity is determined by thegravitational forces acting on the jumper versus thedrag force.

©McGraw‐Hill Education.

Euler’s Method

Substituting the finite difference into thedifferential equation gives

𝑑^

2

i ൅

𝑖

i ൅

𝑖

𝑑^

2

Solve for

i ൅

𝑖

𝑑

𝑖^

2

i ൅

𝑖

©McGraw‐Hill Education.

Numerical Results

Applying Euler’s method in 2 s intervals yields: How do we improve the solution?•

Smaller steps

©McGraw‐Hill Education.

Summary of Numerical Methods

©McGraw‐Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw‐Hill Education.

Part 1

Chapter 2

MATLAB Fundamentals

©McGraw‐Hill Education.

Calculator Mode

The MATLAB command widow can be usedas a calculator where you can type incommands line by line. Whenever acalculation is performed, MATLAB will assignthe result to the built-in variable

ans

Example:

ans

MATLAB Syntax

  • Syntax is the rules that must be followed

when developing MATLAB programs orsimply using the Command Window as acalculator.

MATLAB Syntax-Variables

  • The range of floating point numbers is

between -1.7x

308

to 1.7x

308

(Version

R2014a).

  • The command

‘>>whos’

used in the

Command Window will list the definedvariables along with their characteristics.

  • The command

‘>>clear’

removes all

variables from the Command Window.

Special Variables

  • Inf
  • when a variable exceeds the largest

or smallest number available.

  • NaN
  • Not a number, usually the result of

an undefined mathematical operation, e.g.,0/0.

  • pi

to 15 significant figures.