Sei sulla pagina 1di 19

NUMERICAL METHODS AND COMPUTER

PROGRAMMING
CE227
INTRODUCTION
• GROUP MEMBERS ID

 MD.ADBULLA-AL-SABBY 2018-1-22-036
 MD.HASSAN-AL-MAMUN 2018-1-22-032
 MD.SAKIBUL ISALM 2018-1-22-031

Presented to
Dr.Mohammad Salah Uddin
Assistant Professor
Department of Computer Science & Engineering
East West University
Summer 2019

2
A BASCULAR BRIDGE
Solving an engineering problem using numerical method

YOUR COMPANY NAME 3


PROBLEM

After cooling
trunnion got stuck in
hub

YOUR COMPANY NAME 4


A BASCULAR BRIDGE

hub

trunnion

girder

5
TRUNNION –HUB-GIRDER ASSEMBLY PROCEDURE

Trunnion, Hub and Trunnion-Hub fitted into


Trunnion fitted into Hub Completed THG assembly
Girder Girder

Measuring the diameter Inserting the cooled Trunnion getting in Ice formation on the
of the cooled trunnion trunnion in heated hub contact with the hub trunnion-hub assembly

6
Steps to solve a problem

Problem statement: Trunnion got stuck in the hub


Modeling : developed a new model

𝑻
∆D = D ‫𝑻𝒅 𝑻 𝜶 𝒇 𝑻׬‬
𝒓

Solution : used any Numerical method we use bisection for this problem
Implementation: cool the trunnion in liquid nitrogen or alcohol etc

7
SOLUTION (CONSULTANT CALCULATIONS)
To calculate the contraction in the diameter of the trunnion, thermal expansion coefficient at room
temperature is used. In that case the reduction, ∆ D in the outer diameter of the trunnion is

∆D = D 𝜶∆ T
𝑻𝒇
∆D = D ‫𝑻𝒅 𝑻 𝜶 𝑻׬‬
𝒓

where,
D = outer diameter of the trunnion,
𝜶 = coefficient of thermal expansion coefficient at room temperature
∆ T = change in temperature.

Given
D = 12.363"

𝜶 = 6.817 *𝟏𝟎−𝟔 in/in/°F at 80°F

∆ T = 𝑻𝒇𝒍𝒖𝒊𝒅 -𝑻𝒓𝒐𝒐𝒎 =(-108)(-80) =(-188) °F 8


CONT.

where So the trunnion is predicted to reducetion in diameter by


0.01504“.but is this enough reduction in diameter ? As per
𝑻𝒇𝒍𝒖𝒊𝒅 = temperature of dry-ice/alcohol mixture, specifications.he needs the trunion to contract by
𝑻𝒓𝒐𝒐𝒎 = room temperature,

= trunnion outside diameter - hub inner diameter +


the reduction in the trunnion outer diameter is given by diametric clearance
∆ D = (12.363)(6.47 *𝟏𝟎−𝟔 )(188) = 12.363“-12.358“+0.01"
= - 0.01504" = 0.015"

9
CONT.

The equation that gives the temperature to which the trunnion has to be cooled to obtain the desired contraction
is given by
‫=) 𝒇𝑻(׬‬-0.50598*𝟏𝟎−𝟏𝟎 𝑻𝟑𝒇 + 𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗ 𝟏𝟎−𝟕 𝑻𝟐𝒇 +0.7463*𝟏𝟎−𝟒 𝑻𝒇 + 𝟎. 𝟖𝟖𝟑𝟏𝟖 ∗ 𝟏𝟎−𝟐 = 𝟎

Use the bisection method of finding roots of equations to find the temperature 𝑇𝑓 to which the trunnion has to be
cooled. Conduct three iterations to estimate the root of the above equation. Find the absolute relative
approximate error at the end of each iteration and the number of significant digits at least correct at the end of
each iteration.

10
SOULTION BY USING BISECTION

• From the designer’s records for the previous bridge, ‫𝒇𝑻(׬‬,𝒍 )=‫(׬‬−𝟏𝟓𝟎)
the temperature to which the trunnion was cooled = −𝟎. 𝟓𝟎𝟓𝟗𝟖 ∗ 𝟏𝟎−𝟏𝟎 −𝟏𝟓𝟎 𝟑 + −𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗ 𝟏𝟎−𝟕 ∗
was 100°F Hence assuming the temperature to be −𝟏𝟓𝟎 𝟐 +0.74369*𝟏𝟎−𝟒 * −𝟏𝟓𝟎 +0.88318*𝟏𝟎−𝟐
between and 150°F we have ,
= -1.2903*𝟏𝟎−𝟑
𝑻𝒇,𝒍 = −𝟏𝟓𝟎℉ 𝑻𝒇,𝒖 = −𝟏𝟎𝟎℉ ‫𝒇𝑻(׬‬,𝒖 )=‫(׬‬−𝟏𝟎𝟎)

Check if the function changes sign between 𝑇𝑓,𝑙 and 𝑇𝑓,𝑢 = −𝟎. 𝟓𝟎𝟓𝟗𝟖 ∗ 𝟏𝟎−𝟏𝟎 −𝟏𝟎𝟎 𝟑 + −𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗ 𝟏𝟎−𝟕 ∗
−𝟏𝟎𝟎 𝟐 +0.74369*𝟏𝟎−𝟒 * −𝟏𝟎𝟎 +0.88318*𝟏𝟎−𝟐
= -1.8290 *𝟏𝟎−𝟑

Hence ‫𝒇𝑻 ׬‬,𝒍 ∗ ‫𝒇𝑻 ׬‬,𝒖 = ‫(׬‬−𝟏𝟓𝟎) ‫(׬‬−𝟏𝟎𝟎) = −1.2903∗𝟏𝟎−𝟑 −1.8290 ∗𝟏𝟎−𝟑 < 𝟎
So there is at least one root between 𝑻𝒇,𝒍 𝒂𝒏𝒅 𝑇𝑓,𝑢 that is between -150 and -100

11
CONT.
 Iteration 1  Iteration 1
𝑻𝒇,𝒍 +𝑻𝒇,𝒖
The estimate of the root is 𝑻𝒇,𝒎 = 𝟐 𝑻𝒇,𝒍 +𝑻𝒇,𝒖
−150+(−100) The estimate of the root is 𝑻𝒇,𝒎 = 𝟐
= =-125 −150+(−125)
2
= =-137.5
න(𝑻𝒇,𝒎 ) = න(−𝟏𝟐𝟓) 2
න(𝑻𝒇,𝒎 ) = න(−𝟏𝟑𝟕. 𝟓)
=−𝟎. 𝟓𝟎𝟓𝟗𝟖 ∗ 𝟏𝟎−𝟏𝟎 −𝟏𝟐𝟓 𝟑
+ 𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗
𝟏𝟎−𝟕 (−𝟏𝟐𝟓)𝟐 =−𝟎. 𝟓𝟎𝟓𝟗𝟖 ∗ 𝟏𝟎−𝟏𝟎 −𝟏 𝟑𝟕. 𝟓 𝟑
+
𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗ 𝟏𝟎−𝟕 (−𝟏𝟑𝟕. 𝟓)𝟐

=2.3356* 10−4
=5.3762* 10−4
‫𝒇𝑻(׬‬,𝒎 ) ‫𝒇𝑻(׬‬,𝒍 ) = (𝟏. 𝟐𝟗𝟎𝟑 ∗ 𝟏𝟎−𝟑 )(2.3356*10−4 ) < 0 ‫𝒇𝑻(׬‬,𝒎 ) ‫𝒇𝑻(׬‬,𝒍 ) = (𝟓. 𝟑𝟕𝟔𝟐 ∗ 𝟏𝟎−𝟑 )(2.3356*10−4 ) < 0
So the new lower and upper limits of the new bracket are So the new lower and upper limits of the new bracket
𝑻𝒇,𝒍 = −𝟏𝟓𝟎 𝑻𝒇,𝒖 = −𝟏𝟐𝟓 are
𝑻𝒇,𝒍 = −𝟏𝟑𝟕. 𝟓 𝑻𝒇,𝒖 = −𝟏𝟐𝟓

12
CONT.

The absolute relative approximate error ∈𝑎 at the  Iteration 3


𝑻𝒇,𝒍 +𝑻𝒇,𝒖
end of Iteration 2 is The estimate of the root is 𝑻𝒇,𝒎 = 𝟐
𝑛𝑒𝑤 −𝑇 𝑜𝑙𝑑
𝑇𝑚 −137.5+(−125)
∈𝑎 = 𝑚
∗ 100 = 2
𝑛𝑒𝑤
𝑇𝑚
=-131.25
−137.5−(−125)
= ∗ 100 = 9.0909% න(𝑻𝒇,𝒎 ) = න(−𝟏𝟑𝟏. 𝟐𝟓)
−137.5
none of the significant digits are at least correct =−𝟎. 𝟓𝟎𝟓𝟗𝟖 ∗ 𝟏𝟎−𝟏𝟎−𝟕
−𝟏𝟑𝟏. 𝟐𝟓 𝟑 +𝟐
in the estimated root of 𝑇𝑓,𝑚 = −137.5 𝟎. 𝟑𝟖𝟐𝟗𝟐 ∗ 𝟏𝟎 (−𝟏𝟑𝟏. 𝟐𝟓)
=-
As the absolute relative approximate error is 1.54303* 10−4
greater that 5%
‫𝒇𝑻(׬‬,𝒎 ) ‫𝒇𝑻(׬‬,𝒍 ) = (−𝟏. 𝟓𝟒𝟑𝟎 ∗ 𝟏𝟎−𝟑)(2.3356*10−4 ) <
0
So the new lower and upper limits of the new bracket
are
𝑻𝒇,𝒍 = −𝟏𝟑𝟏. 𝟐𝟓 𝑻𝒇,𝒖 = −𝟏𝟐𝟓

13
CONT.
The absolute relative approximate error ∈𝑎 at the
end of Iteration 2 is
𝑛𝑒𝑤 −𝑇 𝑜𝑙𝑑
𝑇𝑚 𝑚
∈𝑎 = 𝑛𝑒𝑤 ∗ 100
𝑇𝑚
−131.25−(−137.5)
= ∗ 100 = 4.769%
−131.25
none of the significant digits at least correct 1
As the absolute relative approximate error is greater
that 1%

Seven more iteration were conducted and these


iterations are shown in table 1 next silde 14
TABLE 1 ROOT OF ‫ 𝟎 = 𝒙 ׬‬AS FUNCTION OF NUMBER OF ITERATION FOR
BISCTION METHOD

Iteration 𝑻𝒇,𝒖 𝑻𝒇,𝒎 ∈𝒂 % න(𝑻𝒇,𝒎 )

1 -150 -100 ------- 2.3356*10−4


2 -150 -125 9.0909 -5.3762*10−4
3 -137.5 -125 4.7619 -1.5430*10−4
4 -131.25 -125 2.4390 3.9065*10−5
5 -129.25 -128.13 1.2048 -5.7760*10−5
6 -128.69 128.13 0.60606 -9.3826*10−6
7 -128.91 128.13 0.30395 1.4838*10−5
8 −128.91 -125.52 0.15175 2.7228*10−6
9 -128.91 -128.71 0.075815 -3.3305*10−6
10 -128.91 -128.71 0.037922 -3.0396*10−7
15
Cont.

• So there only one root is acceptable ,that is,


𝑻𝒇 = −𝟏𝟐𝟖. 𝟖℉
The contractors plan to dip the trunnion in dry –ice/alchol mixture temperature of -108℉ is not going to work .

16
PROBLEM SOLUTION IN C PROGRAMMING
#include <stdio.h> if(f(xl) * f(xm) < 0)
#include<math.h> { xu = xm; }
double f(double x)
else if(f(xl) * f(xu) > 0)
{
return -0.50598*pow(10,-10)*(x*x*x)+0.38292*pow(10,-7)*x*x+0.74363*pow(10,-
{
4)*x+0.88318*pow(10,-2);
xl = xm;
}
}
int main()
{
else
double xl,xu,xm; {
int i = 0, iteration; xl = xm;
printf("Enter number of iteration: "); }
scanf("%d", &iteration);
} else
printf("\n\nEnter xL: & xU: \n\n");
{
scanf("%lf %lf", &xl,&xu);
while(i < iteration) printf("Boundary not valid. No root exits\n");
{ break;
if(f(xl)*f(xu)<0) }
{ i = i+1;
printf("Valid Boundary. So there exists one root atleast\n");
}
xm = (xl + xu) / 2.00;
return 0;
printf("\n\nroot is %lf\n",xm); 17
}
18

Potrebbero piacerti anche