Lecture 5 Mathematical Modeling and Engineering Problem Solving
Lecture 5 Mathematical Modeling and Engineering Problem Solving
Shuaiby Mohamed
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022
Course Outline
• Matlab Basic
• Mathematical modeling and Engineering Problem Solving
• Error Analysis
• Solution of Nonlinear Equations
• Solution of linear Equations
• Curve Fitting
– Least Squares
– Interpolation
• Numerical Integration
• Numerical Differentiation
• Solution of Ordinary Differential Equations
• Solution of Partial Differential Equations
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 2
Today’s Lecture
I. Applications to Mechanics
II. Applications to Electric Circuits
III.Applications to Chemistry
IV. Applications to Steady-State Heat Flow
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 3
Applications to Mechanics: Recap
• Newton’s second law of motion
The time rate of change in momentum of a body is proportional to the
net force acting on the body and has the same direction as the force.
𝒅 𝒅
(𝒎𝒗) ∝ 𝑭 𝒎𝒗 = 𝑲𝑭
𝒅𝒕 𝒅𝒕
𝒅𝒗
If 𝒎 constant, then 𝒎 = 𝑲𝑭 ⟹ 𝒎𝒂 = 𝑲𝑭
𝒅𝒕
The value of 𝒌 depend on units we use
−𝑨 ∆𝒉 = 𝑩∆𝒔
Dividing by ∆𝒕 and taking the limit as ∆𝒕 ⇒ 𝟎, we find
𝒅𝒉 𝒅𝒔
−𝑨 =𝑩
𝒅𝒕 𝒅𝒕
where 𝑣 = 𝒅𝒔/𝒅𝒕 is the instantaneous velocity of efflux through the orifice.
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 5
Physical Problems Involving Geometry: Recap
• A container having constant cross section A is filled with water to height H. The
water flows out through an orifice, of cross section B, at the base of the
container. Find the height of water at any time and find the time to empty the
tank.
Mathematical Formulation:
𝒅𝒉 𝒅𝒔
−𝑨 =𝑩 = 𝑩𝒗
𝒅𝒕 𝒅𝒕
where 𝑣 = 𝒅𝒔/𝒅𝒕 is the instantaneous velocity of efflux through the orifice.
𝒅𝒉
−𝑨 = 𝑩𝒗 = 𝑩 𝟐𝒈𝒉
𝒅𝒕
𝐼. 𝐶 𝑎𝑡 𝑡 = 0 ⇒ ℎ = 𝐻
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 6
Applications to Electric Circuits
Fundamental laws
• Voltage drop across resistor
𝑽𝑹 ∝ 𝑰 ⟹ 𝑽𝑹 = 𝑹𝑰
• Voltage drop across inductor
𝒅𝑰 𝒅𝑰
𝑽𝑳 ∝ ⟹ 𝑽𝑳 = 𝑳
𝒅𝒕 𝒅𝒕
• Voltage drop across capacitor
𝑸 𝟏
𝑽𝑪 ∝ 𝑸 ⟹ 𝑽𝑪 = = න 𝑰 𝒅𝒕
𝑪 𝑪
Kirchoff’s law
Generator
Capacitor
Capacitor 𝑓𝑎𝑟𝑎𝑑(𝑓) or battery
Inductor ℎ𝑒𝑛𝑟𝑦(ℎ)
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 8
Applications to Electric Circuits
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 9
Problem #1: Applications to Electric
Generator with emf 𝟏𝟎𝟎 𝑽 connected in series with 10 𝜴 resistor and inductor of
2 H. If the switch K closed at t = 0, set up differential equation and determine the
current at time t.
Solution:
Mathematical Formulation:
• Apply Kirchoff law
𝒅𝑰
𝟏𝟎𝟎 = 𝟏𝟎𝑰 + 𝟐
𝒅𝒕
𝒅𝑰
+ 𝟓𝑰 = 𝟓𝟎 with 𝑰 𝟎 = 𝟎
𝒅𝒕
• Linear 1st Order DE, then we use integrating factor 𝒆𝟓𝒕 and we get:
𝒅 𝟓𝒕
(𝒆 𝑰) = 𝟓𝟎𝒆𝟓𝒕 𝒆𝟓𝒕 𝑰 = 𝟏𝟎𝒆𝟓𝒕 + 𝒄 𝑰 = 𝟏𝟎 + 𝒄𝒆−𝟓𝒕
𝒅𝒕
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 10
Problem #1: Applications to Electric
Generator with emf 𝟏𝟎𝟎 𝑽 connected in series with 10 𝜴 resistor and inductor of
2 H. If the switch K closed at t = 0, set up differential equation and determine the
current at time t.
Solution:
𝑰 = 𝟏𝟎 + 𝒄𝒆−𝟓𝒕 with 𝑰 𝟎 =𝟎
𝑰 = 𝟏𝟎 𝟏 − 𝒆−𝟓𝒕
Interpretation:
I(t) =
10 - 10*exp(-5*t)
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 12
Problem #2: Applications to Electric
• Repeat problem 1 with 𝟏𝟎𝟎 𝑽 generator replaced by emf of 𝟐𝟎 𝒄𝒐𝒔 𝟓𝒕 𝑽.
Solution:
Mathematical Formulation:
𝒅𝑰
+ 𝟓𝑰 = 𝟏𝟎 𝐜𝐨𝐬 𝟓𝒕 with 𝑰 𝟎 = 𝟎
𝒅𝒕
• Using integrating factor 𝒆𝟓𝒕 we get: Recall
𝟓𝒕
𝒆𝟓𝒕 𝑰 = 𝟏𝟎 න 𝒆𝟓𝒕 𝐜𝐨𝐬 𝟓𝒕 𝒅𝒕 = 𝒆 𝐜𝐨𝐬 𝟓𝒕 + 𝐬𝐢𝐧 𝟓𝒕 + 𝒄
𝒅𝑸
𝟐𝟎 + 𝟏𝟎𝟎𝑸 = 𝟐𝟎𝟎𝒆−𝟓𝒕
𝒅𝒕
𝒅𝑸
+ 𝟓𝑸 = 𝟏𝟎𝒆−𝟓𝒕
𝒅𝒕
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 14
Problem #3: Applications to Electric
Solution: 𝒅𝑸
+ 𝟓𝑸 = 𝟏𝟎𝒆−𝟓𝒕
𝒅𝒕
• Linear 1st Order DE, we use integrating factor 𝒆𝟓𝒕 :
𝒅
(𝑸𝒆𝟓𝒕 ) = 𝟏𝟎 𝑸𝒆𝟓𝒕 = 𝟏𝟎𝒕 + 𝒄
𝒅𝒕
𝒅𝑸 𝒅𝑸 𝒅
Current at any time: 𝑰 = ⟹ = 𝟏𝟎𝒕𝒆−𝟓𝒕 = 𝟏𝟎𝒆−𝟓𝒕 − 𝟓𝟎𝒕𝒆−𝟓𝒕
𝒅𝒕 𝒅𝒕 𝒅𝒕
Maximum charge: To find when 𝑸 is a maximum, set 𝒅𝑸/𝒅𝒕 = 𝟎 𝒕 = 𝟎. 𝟐 𝐬𝐞𝐜
𝑸 𝟎. 𝟐 = 𝟎. 𝟕𝟒 𝐂
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 15
Today’s Lecture
I. Applications to Mechanics
II. Applications to Electric Circuits
III.Applications to Chemistry
IV. Applications to Steady-State Heat Flow
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 16
Problem #1 Applications to Chemistry and Chemical Mixtures
• Two chemicals, A and B, react to form chemical C.
• The rate at which C formed varies as the product of the instantaneous
amounts of chemicals A and B present.
• The formation requires 2 kg of A for each kg of B.
• Initially 10 kg of A and 20 kg of B are present
• If 6 kg of C formed in 20 min, find the amount of chemical C at any time.
Mathematical Formulation:
• Let 𝒙 kg be the amount of C formed in time 𝒕 hours. Then 𝒅𝒙/𝒅𝒕 is the
rate of its formation.
• To form 𝒙 kg of C, we need 𝟐𝒙/𝟑 kg of A and 𝒙/𝟑 kg of B.
• Then, when 𝒙 kg of C formed at time 𝒕, the amount of A present is 𝟏𝟎 − 𝟐𝒙/𝟑
and the amount of B at this time is 𝟐𝟎 − 𝒙/𝟑
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 17
Problem #1 Applications to Chemistry and Chemical Mixtures
Mathematical Formulation:
where 𝒌 is
another constant
𝟏
• From the problem, we have initial conditions 𝒙 𝟎 = 𝟎, 𝒙 =𝟔
𝟑
• Note although 1st order DE, we need conditions to compute 𝒌 and
constant of integration.
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 18
Problem #1 Applications to Chemistry and Chemical Mixtures
𝒙 𝟎 = 𝟎,
Mathematical Formulation:
𝟏
𝒙 =𝟔
𝟑
Solution:
• Separation of variables yields
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 19
Problem #1 Applications to Chemistry and Chemical Mixtures
𝒙 𝟎 = 𝟎,
Mathematical Formulation:
𝟏
𝒙 =𝟔
𝟑
Solution:
Interpretation:
• We note that as 𝒕 → ∞, 𝒙 → 𝟏𝟓 which is expected from the present amount
of A and B.
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 20
Today’s Lecture
I. Applications to Mechanics
II. Applications to Electric Circuits
III.Applications to Chemistry
IV. Applications to Steady-State Heat Flow
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 21
Applications to Steady-State Heat Flow
• Consider slab of material of indefinite length bounded by two parallel planes A
and B.
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 23
Applications to Steady-State Heat Flow
• Let H the amount of heat flow per unit area per unit time.
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 24
Applications to Steady-State Heat Flow
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 25
Problem #1 Applications to Steady-State Heat Flow
Long steel pipe, of thermal conductivity 𝑲 = 𝟎. 𝟏𝟓 units, has an inner radius of
𝟎. 𝟏 𝒎 and an outer radius of 𝟎. 𝟐 𝒎. The inner surface is kept at 𝟐𝟎𝟎°𝑪 and the
outer surface is kept at 𝟓𝟎°𝑪 .
• (a) Find the temperature as a function of distance 𝒓 from the common axis of
the concentric cylinders.
• (b) Find the temperature when 𝒓 = 𝟏𝟓 cm.
• (c) How much heat is lost per minute in a portion of the pipe which is 20 m
long?
Solution:
Mathematical Formulation:
• Isothermal surfaces are cylinders concentric with the given ones.
• The area of such a surface having radius 𝒓 and length 𝒍 is 𝟐𝝅𝒓𝒍.
𝒅𝑼
𝒒 = −𝑲(𝟐𝝅𝒓𝒍) ⟹ 𝑲 = 𝟎. 𝟏𝟓, 𝒍 = 𝟐𝟎 𝒎 = 𝟐𝟎𝟎𝟎 𝒄𝒎 ,
𝒅𝒓
𝒅𝑼
𝒒 = −𝟔𝟎𝟎𝝅𝒓
𝒅𝒓
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 27
Problem #1 Applications to Steady-State Heat Flow
𝒅𝑼
𝒒 = −𝟔𝟎𝟎𝝅𝒓
𝒅𝒓
𝒅𝒓
𝒒 = −𝟔𝟎𝟎𝝅 𝒅𝑼 −𝟔𝟎𝟎𝝅 𝑼 = 𝒒 ln 𝒓 + 𝒄
𝒓
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 28
Problem #1 Applications to Steady-State Heat Flow
−𝟔𝟎𝟎𝝅 (𝟐𝟎𝟎) = 𝒒 ln 𝟏𝟎 + 𝒄, −𝟔𝟎𝟎𝝅 (𝟓𝟎) = 𝒒 ln 𝟐𝟎 + 𝒄
𝒒 = 𝟒𝟎𝟖𝟎𝟎𝟎, 𝐜 = −𝟏𝟑𝟏𝟕𝟎𝟎𝟎
𝑼 = 𝟔𝟗𝟗 − 𝟐𝟏𝟔 ln 𝒓
𝒓 = 𝟏𝟓, ⟹ 𝑼 = 𝟏𝟏𝟒° 𝑪
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 29
Modeling of Mechanical Systems
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 30
Modeling of Mechanical Systems
Example
Consider the two carriage train system shown. obtain the transfer function X1(s)/F (s)
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 31
Modeling of Electromechanical Systems
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 32
Questions
Dr. Shuaiby Mohamed (Assiut University) ME 122: Engineering Analysis (1) Academic year 2021-2022 33