EBK NUMERICAL METHODS FOR ENGINEERS
EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 8220100254147
Author: Chapra
Publisher: MCG
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 30, Problem 1P

Repeat Example 30.1, but use the midpoint method to generate your solution.

Expert Solution & Answer
Check Mark
To determine

To calculate: The solution of the one-dimensional heat conduction equation using midpoint method for a thing rod of length 10 cm, and the rod possess following values:

k=0.49 cal/(scm°C), Δx=2 cm

Answer to Problem 1P

Solution: The desired result is as shown below.

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 30, Problem 1P , additional homework tip  1

Explanation of Solution

Given Information:

The expression of the temperature distribution of long, thin rod is,

l=10 cm,k'=0.49 cal/(scm°C), x=2cm, and t=0.1s;

at t=0,T0=0,T(0)=100°C and T(10)=50°C,

C=0.2174cal/(g°C),ρ=2.7g/cm3,

Calculation:

Calculate k

and λ

k=0.49/(2.70.2174)=0.835 cm2/s andλ=0.835(0.1)(2)2=0.020875

The expression of temperature,

dTidt=kTi12Ti+Ti+1Δx2

Rewrite the above equation,

Til+1TilΔt=kTi12Ti+Ti+1Δx2

Rewrite the above equation,

Til+1=Til+λ(Ti12Ti+Ti+1)

Substitute the value at t = 0.1 s for the node at x = 2 cm,

T11=0+0.020875[ 02(0)+100 ]=2.0875

The results at the other interior points are,

x=4,6, and 8 cm,

Therefore,

T21=0+0.020875[ 02(0)+0 ]=0

Next,

T31=0+0.020875[ 02(0)+0 ]=0

And,

T41=0+0.020875[ 502(0)+0 ]=1.0438

The value at t = 0.2 s; the interior points are four are,

T21=2.0875+0.020875[ 02(2.0875)+100 ]=4.0878

Therefore,

T22=0+0.020875[ 02(0)+2.0875 ]=0.043577

Next,

T32=0+0.020875[ 1.04382(0)+0 ]=0.021788

And,

T42=1.0438+0.020875[ 502(1.0438)+0 ]=2.0439

The Midpoint method in this subpart is,

yi+12=yi+f(xi,yi)h2

And,

yi+1=yi+f(xi+12,yi+12)h

Use i=0,

predictor is calculating as follow:

y0+12=0+(1000+1004)0.12y12=0

Slop-midpoint,

f(x12,y12)=1000+1004=0

Calculate corrector,

y1=y0+f(x12,y12)h=0+0=0

Use Excel to create the table as follow,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 30, Problem 1P , additional homework tip  2

Use excel to solve this problem.

Step 1 Open the excel-spreadsheet and then press Alt+F11.

Step 2 Then there is a window opened in which write the coding to find optimal solution is as below,

Option Explicit

Sub Explicit()

'define the variables which are integers

Dim i As Integer, j As Integer, Q As Integer, W As Integer

'define the variables which takes double values

Dim R(20) As Double, U(20) As Double, O(20) As Double, S(20, 20) As Double

Dim k As Double, E As Double, L As Double, B As Double, A As Double

Dim C As Double, t As Double, F As Double, h As Double, P As Double

Dim x As Double

'Initialize the value to the variable P

P = 0.000001

'Initialize the value to the variable L

L = 10

'Initialize the value to the variable W

W = 5

E = L / W

'Initialize the value to the variable k

k = 0.835

'Initialize the value to the variable R(0) and R(5)

R(0) = 100

R(5) = 50

'Initialize the value to the variable B

B = 0.1

'Initialize the value to the variable A

A = 12

'Initialize the value to the variable C

C = 3

'Initialize the value to the variable Q

Q = 0

O(Q) = t

'construct a loop that executes from 0 to W

For i = 0 To W

'moves from next i, if the condition is satisfied

S(i, Q) = R(i)

Next i

'the condition are checked

Do

'Do loop is initialised

F = t + C

If F > A Then F = A

h = B

Do

If t + h > F Then h = F - t

'Call a five parameters function

Call Derivs(R, U, W, E, k)

'construct a for loop from 1 to W-1

For j = 1 To W - 1

R(j) = R(j) + U(j) * h

Next j

t = t + h

'check the condition

If t >= F Then Exit Do

Loop

Q = Q + 1

O(Q) = t

'construct a loop

For j = 0 To W

S(j, Q) = R(j)

Next j

'check the condition

If t + P >= A Then Exit Do

Loop

Sheets("sheet1").Select

Range("a4:bb5000").ClearContents

Range("a4").Select

ActiveCell.Value = "time"

x = 0

'construct a loop for j variable

For j = 0 To W

ActiveCell.Offset(0, 1).Select

ActiveCell.Value = "x = " & x

x = x + E

Next j

Range("a5").Select

'construct a loop for i variable

For i = 0 To Q

ActiveCell.Value = O(i)

'construct a loop for j variable

For j = 0 To W

ActiveCell.Offset(0, 1).Select

ActiveCell.Value = S(j, i)

Next j

ActiveCell.Offset(1, -W - 1).Select

Next i

Range("a5").Select

End Sub

'call a function Derives which has five parameter

Sub Derivs(R, U, W, E, k)

Dim j As Integer

'construct a loop for j variable

For j = 1 To W - 1

U(j) = k * (R(j - 1) - 2 * R(j) + R(j + 1)) / E ^ 2

Next j

End Sub

Step 3 Now press F5, a new popup window will appear as shown below.

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 30, Problem 1P , additional homework tip  3

Step 4 Press run after selecting the program name, the desired result will be,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 30, Problem 1P , additional homework tip  4

The flotation of the table is,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 30, Problem 1P , additional homework tip  5

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
3. Using the trial function uh(x) = a sin(x) and weighting function wh(x) = b sin(x) find an approximate solution to the following boundary value problems by determining the value of coefficient a. For each one, also find the exact solution using Matlab and plot the exact and approximate solutions. (One point each for: (i) finding a, (ii) finding the exact solution, and (iii) plotting the solution) a. (U₁xx - 2 = 0 u(0) = 0 u(1) = 0 b. Modify the trial function and find an approximation for the following boundary value problem. (Hint: you will need to add an extra term to the function to make it satisfy the boundary conditions.) (U₁xx - 2 = 0 u(0) = 1 u(1) = 0
Q-2) Find the solution for the LPP below by using the graphical method? Min Z=4x1+3x2 S.to: x1+2x2<6 2x1+x2<8 x127 x1,x2 ≥ 0 Is there an optimal solution and why if not can you extract it?
3. Using the trial function u¹(x) = a sin(x) and weighting function w¹(x) = b sin(x) find an approximate solution to the following boundary value problems by determining the value of coefficient a. For each one, also find the exact solution using Matlab and plot the exact and approximate solutions. (One point each for: (i) finding a, (ii) finding the exact solution, and (iii) plotting the solution) a. (U₁xx -2 = 0 u(0) = 0 u(1) = 0 b. Modify the trial function and find an approximation for the following boundary value problem. (Hint: you will need to add an extra term to the function to make it satisfy the boundary conditions.) (U₁xx-2 = 0 u(0) = 1 u(1) = 0
Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Use of ALGEBRA in REAL LIFE; Author: Fast and Easy Maths !;https://www.youtube.com/watch?v=9_PbWFpvkDc;License: Standard YouTube License, CC-BY
Compound Interest Formula Explained, Investment, Monthly & Continuously, Word Problems, Algebra; Author: The Organic Chemistry Tutor;https://www.youtube.com/watch?v=P182Abv3fOk;License: Standard YouTube License, CC-BY
Applications of Algebra (Digit, Age, Work, Clock, Mixture and Rate Problems); Author: EngineerProf PH;https://www.youtube.com/watch?v=Y8aJ_wYCS2g;License: Standard YouTube License, CC-BY