Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
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.

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,

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.

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,

Numerical Methods for Engineers, Chapter 30, Problem 1P , additional homework tip  4

The flotation of the table is,

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!
Knowledge Booster
Background pattern image
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
College Algebra
Algebra
ISBN:9781337282291
Author:Ron Larson
Publisher:Cengage Learning
Text book image
Elementary Geometry For College Students, 7e
Geometry
ISBN:9781337614085
Author:Alexander, Daniel C.; Koeberlein, Geralyn M.
Publisher:Cengage,
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Algebra: Structure And Method, Book 1
Algebra
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:McDougal Littell
Text book image
Glencoe Algebra 1, Student Edition, 9780079039897...
Algebra
ISBN:9780079039897
Author:Carter
Publisher:McGraw Hill
Text book image
College Algebra
Algebra
ISBN:9781305115545
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning
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