SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Numerical Methods Lab Work 2
By
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh
Submitted to
KOZHANOVA Ksenia
ABSTRACT
FORTRAN is used as a numerical and scientific computing language. The main objective
of the lab work is to understand FORTRAN language using which we solve simple
numerical problems and compare different methodologies. Through this project we make
use of various functions of FORTRAN and solve a FDM simple heat equation problem
applying different conditions viz. Dirichlet and Von Neumann. The given problems are
solved analytically then built and compiled using a free integrated development
environment called CODE::BLOCKS [1] which is an open source platform for FORTRAN
and C.
CONTENTS:
List of figures.
1. A simple heat flow experiment using 1D Heat Equation. 1
2. Finite Difference Explicit Method. 2
3. Finite Difference Implicit Method. 9
CONCLUSION 11
REFERENCE 12
LIST OF FIGURES.
๏‚ท Fig 1: Rod considered for the problem.
Dirichlet Boundary,
๏‚ท Fig 2: Temperature variation at each node of c value 0.25
๏‚ท Fig 3: Temperature variation at each node of C value 0.49
๏‚ท Fig 4: Temperature variation at each node of C value 0.51
๏‚ท Fig 5: Temperature variation at each node of C value 0.75
Von Neumann Boundary,
๏‚ท Fig 6: Temperature variation at each node of C value 0.25
๏‚ท Fig 7: Temperature variation at each node of C value 0.49
๏‚ท Fig 8: Temperature variation at each node of C value 0.55
๏‚ท Fig 9: Temperature variation at each node of C value 0.75
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 1 | P a g e
1. A simple heat flow experiment using 1D Heat Equation.
A Copper rod of length L = 1m and diameter is 1 cm with lateral sides insulated is subjected to
external temperature T0, until the temperature of the rod reaches T0. At time t=0, the ends of the rod
are subjected to T1 and T2 temperature with the given boundary conditions solve the heat equation
and write in non-dimensional form.
Fig 1: Rod considered for the problem.
Initial and boundary conditions,
T (0, x) = T0 = 400 Initial
T(t,0) = T1 = 300 Dirichlet condition
T (t, L) = T2 = 500 Dirichlet condition
๐œŒ๐ถ ๐‘
๐œ•๐‘‡
๐œ•๐‘ก
+
๐œ•
๐œ•๐‘ฅ
(โˆ’๐œ†
๐œ•๐‘‡
๐œ•๐‘ฅ
) = 0 โ€ฆโ€ฆโ€ฆโ€ฆ.(1)
Where,
๐† is Density (kg/m3
)
Cp is the Heat capacity
๐€ is the conductivity.
Assuming ๐œ† as constant equation 1 can be written as,
๐œ•๐‘‡
๐œ•๐‘ก
= ๐›ผ
๐œ•2 ๐‘‡
๐œ•๐‘ฅ2 โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..(2)
Where,
๐›ผ =
๐œ†
๐œŒ๐ถ ๐‘
Non Dimensionalization of the equation,
๐‘‡ฬƒ = T
๐‘ฅฬƒ = x
๐‘กฬƒ = t
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 2 | P a g e
๐œ•๐‘‡ฬƒ
๐œ•๐‘กฬƒ
=
๐œ•2
๐‘‡ฬƒ
๐œ•๐‘ฅฬƒ2
2. Finite Difference Explicit Method:
Using second order centered difference for space derivative and simple first order forward
difference for time derivative. The scheme results in,
๐œ• = T (t + ๐›ฅ๐‘ก) - T (t)
๐œ•๐‘ก ๐›ฅ๐‘ก
Using the above scheme,
โˆ‚T
โˆ‚t
=
Tj
k+1
โˆ’Tj
k
โˆ†t
.โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ... (3)
Substituting the equation no. 3,
๐œ•2 ๐‘‡
๐œ•๐‘ฅ2 =
๐‘‡๐‘—+1
๐‘˜
โˆ’2๐‘‡๐‘—
๐‘˜
+๐‘‡๐‘—โˆ’1
๐‘˜
(โˆ†๐‘ฅ)2 โ€ฆโ€ฆโ€ฆโ€ฆ. (4)
Using the equation no. 3 and 4,
๐‘‡๐‘—
๐‘˜+1
โˆ’ ๐‘‡๐‘—
๐‘˜
=
โˆ†๐‘ก
โˆ†๐‘ฅ2 (๐‘‡๐‘—+1
๐‘˜
โˆ’ 2๐‘‡๐‘—
๐‘˜
+ ๐‘‡๐‘—โˆ’1
๐‘˜
) โ€ฆโ€ฆโ€ฆ. (5)
Considering,
๐‘ =
โˆ†๐‘ก
โˆ†๐‘ฅ2
This equation helps in finding the temperature evolution at different stages,
๐‘ป๐’‹
๐’Œ+๐Ÿ
= ๐’„. ๐‘ป๐’‹โˆ’๐Ÿ
๐’Œ
+ (๐Ÿ โˆ’ ๐Ÿ๐’„)๐‘ป๐’‹
๐’Œ
+ ๐’„. ๐‘ป๐’‹+๐Ÿ
๐’Œ
Discretizing Boundary conditions:
Boundary conditions and initial conditions for the problem is given for two cases. Imposed
temperature in the two ends of the rod,
T(1,t)=300 indicating ๐‘ป ๐Ÿ
๐’Œ
= ๐Ÿ‘๐ŸŽ๐ŸŽ
T(L,t)=500 indicating ๐‘ป ๐‘ต
๐’Œ
= ๐Ÿ“๐ŸŽ๐ŸŽ
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 3 | P a g e
The initial condition is T(x, 1) = 400 indicating ๐‘‡๐‘—
1
= 400
Applying the boundary conditions in the obtained equation 5 with j varying from 2 to N-1
๐‘‡๐‘—
๐‘˜+1
= ๐‘๐‘‡๐‘—โˆ’1
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡๐‘—
๐‘˜
+ ๐‘๐‘‡๐‘—+1
๐‘˜
The equation for the second node can be written as,
๐‘‡2
๐‘˜+1
= ๐‘๐‘‡1
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡2
๐‘˜
+ ๐‘๐‘‡3
๐‘˜
๐‘‡2
๐‘˜+1
= 300๐‘ + (1 โˆ’ 2๐‘)๐‘‡2
๐‘˜
+ ๐‘๐‘‡3
๐‘˜
The equation for the last but one node can be written as,
๐‘‡ ๐‘โˆ’1
๐‘˜+1
= ๐‘๐‘‡ ๐‘โˆ’2
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡ ๐‘โˆ’1
๐‘˜
+ ๐‘๐‘‡ ๐‘
๐‘˜
๐‘‡ ๐‘โˆ’1
๐‘˜+1
= ๐‘๐‘‡ ๐‘โˆ’2
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡ ๐‘โˆ’1
๐‘˜
+ 500๐‘
Writing the system of equations in the matrix form:
๐‘ป ๐’Œ+๐Ÿ
= ๐‘จ๐‘ป ๐’Œ
+ ๐‘ฉ
(
๐‘‡1
๐‘˜+1
โ‹ฎ
๐‘‡ ๐‘
๐‘˜+1
) = [
1 โˆ’ 2๐‘ ๐‘ 0
๐‘ โ‹ฑ โ‹ฑ
0 โ‹ฑ 1 โˆ’ 2๐‘
] (
๐‘‡1
๐‘˜
โ‹ฎ
๐‘‡ ๐‘
๐‘˜
) + [
300
โ‹ฎ
500
]
Here (1-2c) occupies the main diagonal and c the lower and upper diagonal. B is the boundary
condition matrix with only two entries at the extreme nodes and the other values are 0.
By applying the derived equation into program graphs for temperature values as function of time for
different length divisions can be obtained.
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 4 | P a g e
Fig 2: Temperature variation at each node of c value 0.25
Fig 3: Temperature variation at each node of C value 0.49
As shown in the graphs 1 and 2 the temperature at each node after some amount of time converges
showing that it gains equilibrium. This is considered true only when c value is less than 0.5 which is
evident from the graph 3 and 4. As c increased to 0.5, the system became marginally stable. The
reason of referring the system has been deduced from unstable solutions where c takes a value above
0.5.
290
340
390
440
490
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temparature(K)
LENGTH (L)
C = 0.25
270
320
370
420
470
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temperature(K)
LENGTH (L)
C = 0.49
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 5 | P a g e
Fig 4: Temperature variation at each node of C value 0.51
Fig 5: Temperature variation at each node of C value 0.75
For values of c > 0.5, the system becomes unstable. The resulting graphs are varying and dissimilar
when compared to graphs of stable system. Oscillations in temperature curves can be seen as time
progress occurs, which indicates instability in the system. In c = 0.75, instabilities begin to start
earlier which say that as c is increased further, oscillations occur rapidly.
Von Neumann Boundary condition:
Imposed temperature on one end of the rod and a flux on another end of the rod,
T (1, t) = 300 indicating,
-2E+30
-1.5E+30
-1E+30
-5E+29
0
5E+29
1E+30
1.5E+30
2E+30
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temperature(K)
LENGTH (L)
C = 0.51
-4E+38
-3E+38
-2E+38
-1E+38
0
1E+38
2E+38
3E+38
4E+38
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temperature(K)
LENGTH (L)
C = 0.75
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 6 | P a g e
๐‘‡1
๐‘˜
= 300 ๐‘Ž๐‘›๐‘‘
๐œ•๐‘‡( ๐‘ก, ๐ฟ)
๐œ•๐‘ฅ
= 50
This temperature is maintained at all time in this problem. The initial condition is same as the
previous case given by T(x, 1) = 400 indicating ๐‘‡๐‘—
1
= 400
Applying the boundary conditions in the obtained with j varying from 2 to N-1:
๐‘‡๐‘—
๐‘˜+1
= ๐‘๐‘‡๐‘—โˆ’1
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡๐‘—
๐‘˜
+ ๐‘๐‘‡๐‘—+1
๐‘˜
The equation for the second node is same as the previous case:
๐‘‡2
๐‘˜+1
= 300๐‘ + (1 โˆ’ 2๐‘)๐‘‡2
๐‘˜
+ ๐‘๐‘‡3
๐‘˜
The equation for the second last node using the Von Neumann boundary condition:
๐œ•๐‘‡(๐‘ก, ๐ฟ)
๐œ•๐‘ฅ
= 50
Is expressed using backward scheme as follows:
๐‘‡ ๐‘
๐‘˜
= 50๐›ฅ๐‘ฅ + ๐‘‡ ๐‘โˆ’1
๐‘˜
We get the final equation asโˆถ
๐‘‡ ๐‘โˆ’1
๐‘˜+1
= ๐‘๐‘‡ ๐‘โˆ’2
๐‘˜
+ (1 โˆ’ 2๐‘)๐‘‡2
๐‘˜
+ 50๐›ฅ๐‘ฅ + ๐‘‡ ๐‘โˆ’1
๐‘˜
Applying center difference scheme to the boundary conditions we get,
๐œ•๐‘‡
๐œ•๐‘ฅ
=
๐‘‡๐‘›+1
๐‘˜
โˆ’ ๐‘‡๐‘›โˆ’1
๐‘˜
2โˆ†๐‘ฅ
= 50
Where ๐‘‡๐‘›+1
๐‘˜
= 100 ร— โˆ†๐‘ฅ + ๐‘‡๐‘›โˆ’1
๐‘˜
is a ghost node that updates the values of Tn in the
equation.
By applying the derived equation into program graphs for temperature values as function of time for
different length divisions can be obtained.
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 7 | P a g e
Fig 6: Temperature variation at each node of C value 0.25
Fig 7: Temperature variation at each node of C value 0.49
290
310
330
350
370
390
410
430
0 0.2 0.4 0.6 0.8 1
Temperature(K)
LENGTH (L)
C = 0.25
290
310
330
350
370
390
410
430
0 0.2 0.4 0.6 0.8 1
Temperature(K)
LENGTH (L)
C = 0.49
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 8 | P a g e
Fig 8: Temperature variation at each node of C value 0.55
Fig 9: Temperature variation at each node of C value 0.75
From the obtained graphs, it can be seen that the effect of the Von Neumann boundary condition on
right end of the bar is observed from the plots. The temperature value at this end is drastically
decreased comparing with that of Dirichlet boundary condition. It can be observed that the solution
of temperature variation for von Neumann condition takes more time to intersect compared to
Dirichlet. From the stability point of view, for values of c > 0.5, oscillations occur with increasing
time resulting in instability.
-2.5E+38
-2E+38
-1.5E+38
-1E+38
-5E+37
0
5E+37
1E+38
1.5E+38
2E+38
2.5E+38
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temperature(K)
LENGTH (L)
C = 0.55
-3E+15
-2E+15
-1E+15
0
1E+15
2E+15
3E+15
-0.15 0.05 0.25 0.45 0.65 0.85 1.05
Temperature(K)
LENGTH (L)
C = 0.75
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 9 | P a g e
3. Finite difference implicit method:
In this method, the forward difference scheme is applied for time derivative and center second
difference scheme is applied for space derivative for the next time step as follows.
๐œ•๐‘‡
๐œ•๐‘ก
=
๐‘‡๐‘—
๐‘˜+1
โˆ’ ๐‘‡๐‘—
๐‘˜
โˆ†๐‘ก
๐œ•2
๐‘‡
๐œ•๐‘ฅ2
=
๐‘‡๐‘—+1
๐‘˜+1
โˆ’ 2๐‘‡๐‘—
๐‘˜+1
+ ๐‘‡๐‘—โˆ’1
๐‘˜+1
(โˆ†๐‘ฅ)2
Substituting the above equations in the equation no. 1, and considering,
๐‘ =
โˆ†๐‘ก
(โˆ†๐‘ฅ)2,
The following equation is obtained,
๐‘ป(๐’Œ) = โˆ’๐’„. ๐‘ป๐’‹โˆ’๐Ÿ
๐’Œ+๐Ÿ
+ (๐Ÿ + ๐Ÿ๐’„)๐‘ป๐’‹
๐’Œ+๐Ÿ
โˆ’ ๐’„. ๐‘ป๐’‹+๐Ÿ
๐’Œ+๐Ÿ
โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ(6)
The following boundary conditions are applied to the above stated equation. Boundary conditions
and initial conditions for the problem is given for two cases. Imposed temperature in the two ends
of the beam,
T(1,t)=300 indicating ๐‘ป ๐Ÿ
๐’Œ
= ๐Ÿ‘๐ŸŽ๐ŸŽ
T(L,t)=500 indicating ๐‘ป ๐‘ต
๐’Œ
= ๐Ÿ“๐ŸŽ๐ŸŽ
This temperature is maintained at all times for this problem. The initial condition is T(x, 1) =400
indicating ๐‘ป๐’‹
๐Ÿ
= ๐Ÿ’๐ŸŽ๐ŸŽ
Applying the boundary conditions in the obtained equation 6 with j varying from 2 to N-1
๐‘‡๐‘—
๐‘˜
= โˆ’๐‘๐‘‡๐‘—โˆ’1
๐‘˜+1
+ (1 + 2๐‘)๐‘‡๐‘—
๐‘˜+1
โˆ’ ๐‘๐‘‡๐‘—+1
๐‘˜+1
The equation for the second node can be written as,
๐‘‡2
๐‘˜
= โˆ’๐‘๐‘‡1
๐‘˜+1
+ (1 + 2๐‘)๐‘‡2
๐‘˜+1
+ ๐‘๐‘‡3
๐‘˜+1
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 10 | P a g e
The equation for the last but one nod can be written as,
๐‘‡ ๐‘โˆ’1
๐‘˜
= โˆ’๐‘๐‘‡ ๐‘โˆ’1
๐‘˜+1
+ (1 + 2๐‘)๐‘‡ ๐‘
๐‘˜+1
โˆ’ ๐‘๐‘‡ ๐‘+1
๐‘˜+1
This temperature is maintained at all times for this problem. The initial condition is same as the
previous one given by T(x, 1) = 400 indicating,
๐‘‡๐‘—
1
= 400
Applying the boundary conditions in the obtained equation with j varying from 2 to N-1
๐‘‡๐‘—
๐‘˜
= โˆ’๐‘๐‘‡๐‘—โˆ’1
๐‘˜+1
+ (1 + 2๐‘)๐‘‡๐‘—
๐‘˜+1
โˆ’ ๐‘๐‘‡๐‘—+1
๐‘˜+1
Writing the system of equation in the matrix form
๐ด. ๐‘‡ ๐‘˜+1
= ๐‘‡ ๐‘˜
+ ๐ต
[
1 + 2๐‘ โˆ’๐‘ 0
โˆ’๐‘ โ‹ฑ โ‹ฑ
0 โ‹ฑ 1 + 2๐‘
] (
๐‘‡1
๐‘˜+1
โ‹ฎ
๐‘‡ ๐‘
๐‘˜+1
) = (
๐‘‡1
๐‘˜
โ‹ฎ
๐‘‡ ๐‘
๐‘˜
) + [
300
โ‹ฎ
500
]
Where A is tridiagonal matrix with 1+2c as the main diagonal and -c as the lower and upper diagonal.
B is the boundary condition matrix with only two entries at the extreme nodes and the other values
being 0.
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 11 | P a g e
CONCLUSION
Altogether in this lab work we used finite difference method to solve a heat equation and apply the
same to a rod which is heated from one end. Here application of two different boundary conditions
is done viz. Dirichlet and Von Neumann through which we solve the given problem. This task helped
in understanding application of FDM on heat equation analysis and also made us familiarize with
different boundary conditions. The implicit mode of solving is done analytically by which we obtain
the matrix form of the given problem as written in the report. In order to execute the program for
implicit it is required to make use of DGESV function which is not submitted in this lab work. We
tried programming the code where we got few errors which we were unable to rectify.
Numerical Methods Lab work 2
PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 12 | P a g e
REFERENCES
1. Team CODE::BLOCKS, http://www.codeblocks.org/downloads/26
Version 17.12, Dated 30 Dec 2017.
2. Tutorials Point โ€“ Fortran Tutorials, https://www.tutorialspoint.com/fortran/index.htm
3. Stanford education - Learn Fortran, https://web.stanford.edu/class/me200c/tutorial_90/
4. Moodle ENSMA โ€“ Numerical Methods Links, https://moodle.ensma.fr/course/
5. https://en.wikipedia.org/wiki/Talk%3ANeumann_boundary_condition for Vonn Neumann
condition.
6. https://en.wikipedia.org/wiki/Nondimensionalization for non dimensionalization.

Weitere รคhnliche Inhalte

Was ist angesagt?

N. Biliฤ‡: AdS Braneworld with Back-reaction
N. Biliฤ‡: AdS Braneworld with Back-reactionN. Biliฤ‡: AdS Braneworld with Back-reaction
N. Biliฤ‡: AdS Braneworld with Back-reactionSEENET-MTP
ย 
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-II
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-IINUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-II
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-IItmuliya
ย 
Summerp62016update3 slideshare sqrdver2
Summerp62016update3 slideshare   sqrdver2Summerp62016update3 slideshare   sqrdver2
Summerp62016update3 slideshare sqrdver2foxtrot jp R
ย 
Numerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference MethodNumerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference Methodiosrjce
ย 
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...Abrar Hussain
ย 
Multi degree of freedom systems
Multi degree of freedom systemsMulti degree of freedom systems
Multi degree of freedom systemsYeltsinHUAMANAQUINO1
ย 
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...TELKOMNIKA JOURNAL
ย 
L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeSam Alalimi
ย 
The klein gordon field in two-dimensional rindler space-time - smcprt
The klein gordon field in two-dimensional rindler space-time - smcprtThe klein gordon field in two-dimensional rindler space-time - smcprt
The klein gordon field in two-dimensional rindler space-time - smcprtfoxtrot jp R
ย 
Parallel tansport sssqrd
Parallel tansport sssqrdParallel tansport sssqrd
Parallel tansport sssqrdfoxtrot jp R
ย 
Advance heat transfer 2
Advance heat transfer 2Advance heat transfer 2
Advance heat transfer 2JudeOliverMaquiran1
ย 
Summerp62016update2 slideshare sqd
Summerp62016update2 slideshare  sqdSummerp62016update2 slideshare  sqd
Summerp62016update2 slideshare sqdfoxtrot jp R
ย 
A0440109
A0440109A0440109
A0440109inventy
ย 
Fieldtheoryhighlights2015
Fieldtheoryhighlights2015Fieldtheoryhighlights2015
Fieldtheoryhighlights2015foxtrot jp R
ย 
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...IJERD Editor
ย 
Numerical Methods in Mechanical Engineering - Final Project
Numerical Methods in Mechanical Engineering - Final ProjectNumerical Methods in Mechanical Engineering - Final Project
Numerical Methods in Mechanical Engineering - Final ProjectStasik Nemirovsky
ย 
Frequency analyis i
Frequency analyis iFrequency analyis i
Frequency analyis ifoxtrot jp R
ย 
E-book-phy1
E-book-phy1E-book-phy1
E-book-phy1Ranjith Kumar
ย 
1+3 gr reduced_as_1+1_gravity_set_1_fordisplay
1+3 gr reduced_as_1+1_gravity_set_1_fordisplay1+3 gr reduced_as_1+1_gravity_set_1_fordisplay
1+3 gr reduced_as_1+1_gravity_set_1_fordisplayfoxtrot jp R
ย 

Was ist angesagt? (20)

N. Biliฤ‡: AdS Braneworld with Back-reaction
N. Biliฤ‡: AdS Braneworld with Back-reactionN. Biliฤ‡: AdS Braneworld with Back-reaction
N. Biliฤ‡: AdS Braneworld with Back-reaction
ย 
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-II
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-IINUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-II
NUMERICAL METHODS IN STEADY STATE, 1D and 2D HEAT CONDUCTION- Part-II
ย 
Summerp62016update3 slideshare sqrdver2
Summerp62016update3 slideshare   sqrdver2Summerp62016update3 slideshare   sqrdver2
Summerp62016update3 slideshare sqrdver2
ย 
Numerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference MethodNumerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference Method
ย 
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
185817220 7e chapter5sm-final-newfrank-white-fluid-mechanics-7th-ed-ch-5-solu...
ย 
Multi degree of freedom systems
Multi degree of freedom systemsMulti degree of freedom systems
Multi degree of freedom systems
ย 
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...
A Novel Space-time Discontinuous Galerkin Method for Solving of One-dimension...
ย 
A0280106
A0280106A0280106
A0280106
ย 
L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shape
ย 
The klein gordon field in two-dimensional rindler space-time - smcprt
The klein gordon field in two-dimensional rindler space-time - smcprtThe klein gordon field in two-dimensional rindler space-time - smcprt
The klein gordon field in two-dimensional rindler space-time - smcprt
ย 
Parallel tansport sssqrd
Parallel tansport sssqrdParallel tansport sssqrd
Parallel tansport sssqrd
ย 
Advance heat transfer 2
Advance heat transfer 2Advance heat transfer 2
Advance heat transfer 2
ย 
Summerp62016update2 slideshare sqd
Summerp62016update2 slideshare  sqdSummerp62016update2 slideshare  sqd
Summerp62016update2 slideshare sqd
ย 
A0440109
A0440109A0440109
A0440109
ย 
Fieldtheoryhighlights2015
Fieldtheoryhighlights2015Fieldtheoryhighlights2015
Fieldtheoryhighlights2015
ย 
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...
Some Mixed Quadrature Rules for Approximate Evaluation of Real Cauchy Princip...
ย 
Numerical Methods in Mechanical Engineering - Final Project
Numerical Methods in Mechanical Engineering - Final ProjectNumerical Methods in Mechanical Engineering - Final Project
Numerical Methods in Mechanical Engineering - Final Project
ย 
Frequency analyis i
Frequency analyis iFrequency analyis i
Frequency analyis i
ย 
E-book-phy1
E-book-phy1E-book-phy1
E-book-phy1
ย 
1+3 gr reduced_as_1+1_gravity_set_1_fordisplay
1+3 gr reduced_as_1+1_gravity_set_1_fordisplay1+3 gr reduced_as_1+1_gravity_set_1_fordisplay
1+3 gr reduced_as_1+1_gravity_set_1_fordisplay
ย 

ร„hnlich wie Numerical Methods Lab Work

project presentation
project presentationproject presentation
project presentationVishesh Gupta
ย 
Tp problรจmes-ร -valeurs-initiales
Tp problรจmes-ร -valeurs-initialesTp problรจmes-ร -valeurs-initiales
Tp problรจmes-ร -valeurs-initialespapillontuba
ย 
Finite Volume Method Advanced Numerical Analysis by Md.Al-Amin
Finite Volume Method Advanced Numerical Analysis by Md.Al-AminFinite Volume Method Advanced Numerical Analysis by Md.Al-Amin
Finite Volume Method Advanced Numerical Analysis by Md.Al-AminMd. Al-Amin
ย 
numerical.ppt
numerical.pptnumerical.ppt
numerical.pptSuyashPatil72
ย 
390 Guided Projects Guided Project 31 Cooling cof.docx
390        Guided Projects Guided Project 31  Cooling cof.docx390        Guided Projects Guided Project 31  Cooling cof.docx
390 Guided Projects Guided Project 31 Cooling cof.docxrhetttrevannion
ย 
390 Guided Projects Guided Project 31 Cooling cof.docx
390        Guided Projects Guided Project 31  Cooling cof.docx390        Guided Projects Guided Project 31  Cooling cof.docx
390 Guided Projects Guided Project 31 Cooling cof.docxgilbertkpeters11344
ย 
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...Abimbola Ashaju
ย 
Numerical report gauss
Numerical report gaussNumerical report gauss
Numerical report gaussEmi TheGeng
ย 
HMT Week 8.pdf convection convection radiation
HMT Week 8.pdf convection convection radiationHMT Week 8.pdf convection convection radiation
HMT Week 8.pdf convection convection radiation2020me70
ย 
DATA ANALYSIS IN PHYSICS.pdf
DATA  ANALYSIS IN PHYSICS.pdfDATA  ANALYSIS IN PHYSICS.pdf
DATA ANALYSIS IN PHYSICS.pdfAbofongPrecious
ย 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floorAmy Do
ย 
Graphical methods for 2 d heat transfer
Graphical methods for 2 d heat transfer Graphical methods for 2 d heat transfer
Graphical methods for 2 d heat transfer Arun Sarasan
ย 
Heatequationincfd
HeatequationincfdHeatequationincfd
HeatequationincfdParhamsagharchi
ย 
Numerical methods for 2 d heat transfer
Numerical methods for 2 d heat transferNumerical methods for 2 d heat transfer
Numerical methods for 2 d heat transferArun Sarasan
ย 
Temperature Distribution in a ground section of a double-pipe system in a dis...
Temperature Distribution in a ground section of a double-pipe system in a dis...Temperature Distribution in a ground section of a double-pipe system in a dis...
Temperature Distribution in a ground section of a double-pipe system in a dis...Paolo Fornaseri
ย 
Radial heat conduction
Radial heat conductionRadial heat conduction
Radial heat conductionAree Salah
ย 
Numerical modeling-of-gas-turbine-engines
Numerical modeling-of-gas-turbine-enginesNumerical modeling-of-gas-turbine-engines
Numerical modeling-of-gas-turbine-enginesCemal Ardil
ย 
Formal expansion method for solving an electrical circuit model
Formal expansion method for solving an electrical circuit modelFormal expansion method for solving an electrical circuit model
Formal expansion method for solving an electrical circuit modelTELKOMNIKA JOURNAL
ย 

ร„hnlich wie Numerical Methods Lab Work (20)

project presentation
project presentationproject presentation
project presentation
ย 
Tp problรจmes-ร -valeurs-initiales
Tp problรจmes-ร -valeurs-initialesTp problรจmes-ร -valeurs-initiales
Tp problรจmes-ร -valeurs-initiales
ย 
Finite Volume Method Advanced Numerical Analysis by Md.Al-Amin
Finite Volume Method Advanced Numerical Analysis by Md.Al-AminFinite Volume Method Advanced Numerical Analysis by Md.Al-Amin
Finite Volume Method Advanced Numerical Analysis by Md.Al-Amin
ย 
numerical.ppt
numerical.pptnumerical.ppt
numerical.ppt
ย 
390 Guided Projects Guided Project 31 Cooling cof.docx
390        Guided Projects Guided Project 31  Cooling cof.docx390        Guided Projects Guided Project 31  Cooling cof.docx
390 Guided Projects Guided Project 31 Cooling cof.docx
ย 
390 Guided Projects Guided Project 31 Cooling cof.docx
390        Guided Projects Guided Project 31  Cooling cof.docx390        Guided Projects Guided Project 31  Cooling cof.docx
390 Guided Projects Guided Project 31 Cooling cof.docx
ย 
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...
Alternating direction-implicit-finite-difference-method-for-transient-2 d-hea...
ย 
Numerical report gauss
Numerical report gaussNumerical report gauss
Numerical report gauss
ย 
HMT Week 8.pdf convection convection radiation
HMT Week 8.pdf convection convection radiationHMT Week 8.pdf convection convection radiation
HMT Week 8.pdf convection convection radiation
ย 
Solving heat conduction equation (parabolic pde)
Solving heat conduction equation (parabolic pde)Solving heat conduction equation (parabolic pde)
Solving heat conduction equation (parabolic pde)
ย 
ANSYS Project
ANSYS ProjectANSYS Project
ANSYS Project
ย 
DATA ANALYSIS IN PHYSICS.pdf
DATA  ANALYSIS IN PHYSICS.pdfDATA  ANALYSIS IN PHYSICS.pdf
DATA ANALYSIS IN PHYSICS.pdf
ย 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floor
ย 
Graphical methods for 2 d heat transfer
Graphical methods for 2 d heat transfer Graphical methods for 2 d heat transfer
Graphical methods for 2 d heat transfer
ย 
Heatequationincfd
HeatequationincfdHeatequationincfd
Heatequationincfd
ย 
Numerical methods for 2 d heat transfer
Numerical methods for 2 d heat transferNumerical methods for 2 d heat transfer
Numerical methods for 2 d heat transfer
ย 
Temperature Distribution in a ground section of a double-pipe system in a dis...
Temperature Distribution in a ground section of a double-pipe system in a dis...Temperature Distribution in a ground section of a double-pipe system in a dis...
Temperature Distribution in a ground section of a double-pipe system in a dis...
ย 
Radial heat conduction
Radial heat conductionRadial heat conduction
Radial heat conduction
ย 
Numerical modeling-of-gas-turbine-engines
Numerical modeling-of-gas-turbine-enginesNumerical modeling-of-gas-turbine-engines
Numerical modeling-of-gas-turbine-engines
ย 
Formal expansion method for solving an electrical circuit model
Formal expansion method for solving an electrical circuit modelFormal expansion method for solving an electrical circuit model
Formal expansion method for solving an electrical circuit model
ย 

Kรผrzlich hochgeladen

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
ย 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
ย 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
ย 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
ย 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
ย 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
ย 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
ย 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
ย 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
ย 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
ย 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
ย 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoรฃo Esperancinha
ย 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
ย 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
ย 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
ย 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
ย 

Kรผrzlich hochgeladen (20)

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
ย 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
ย 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
ย 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
ย 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
ย 
young call girls in Rajiv Chowk๐Ÿ” 9953056974 ๐Ÿ” Delhi escort Service
young call girls in Rajiv Chowk๐Ÿ” 9953056974 ๐Ÿ” Delhi escort Serviceyoung call girls in Rajiv Chowk๐Ÿ” 9953056974 ๐Ÿ” Delhi escort Service
young call girls in Rajiv Chowk๐Ÿ” 9953056974 ๐Ÿ” Delhi escort Service
ย 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
ย 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
ย 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
ย 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
ย 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
ย 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
ย 
young call girls in Green Park๐Ÿ” 9953056974 ๐Ÿ” escort Service
young call girls in Green Park๐Ÿ” 9953056974 ๐Ÿ” escort Serviceyoung call girls in Green Park๐Ÿ” 9953056974 ๐Ÿ” escort Service
young call girls in Green Park๐Ÿ” 9953056974 ๐Ÿ” escort Service
ย 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
ย 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
ย 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
ย 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
ย 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
ย 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
ย 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
ย 

Numerical Methods Lab Work

  • 1. Numerical Methods Lab Work 2 By PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh Submitted to KOZHANOVA Ksenia
  • 2. ABSTRACT FORTRAN is used as a numerical and scientific computing language. The main objective of the lab work is to understand FORTRAN language using which we solve simple numerical problems and compare different methodologies. Through this project we make use of various functions of FORTRAN and solve a FDM simple heat equation problem applying different conditions viz. Dirichlet and Von Neumann. The given problems are solved analytically then built and compiled using a free integrated development environment called CODE::BLOCKS [1] which is an open source platform for FORTRAN and C.
  • 3. CONTENTS: List of figures. 1. A simple heat flow experiment using 1D Heat Equation. 1 2. Finite Difference Explicit Method. 2 3. Finite Difference Implicit Method. 9 CONCLUSION 11 REFERENCE 12
  • 4. LIST OF FIGURES. ๏‚ท Fig 1: Rod considered for the problem. Dirichlet Boundary, ๏‚ท Fig 2: Temperature variation at each node of c value 0.25 ๏‚ท Fig 3: Temperature variation at each node of C value 0.49 ๏‚ท Fig 4: Temperature variation at each node of C value 0.51 ๏‚ท Fig 5: Temperature variation at each node of C value 0.75 Von Neumann Boundary, ๏‚ท Fig 6: Temperature variation at each node of C value 0.25 ๏‚ท Fig 7: Temperature variation at each node of C value 0.49 ๏‚ท Fig 8: Temperature variation at each node of C value 0.55 ๏‚ท Fig 9: Temperature variation at each node of C value 0.75
  • 5. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 1 | P a g e 1. A simple heat flow experiment using 1D Heat Equation. A Copper rod of length L = 1m and diameter is 1 cm with lateral sides insulated is subjected to external temperature T0, until the temperature of the rod reaches T0. At time t=0, the ends of the rod are subjected to T1 and T2 temperature with the given boundary conditions solve the heat equation and write in non-dimensional form. Fig 1: Rod considered for the problem. Initial and boundary conditions, T (0, x) = T0 = 400 Initial T(t,0) = T1 = 300 Dirichlet condition T (t, L) = T2 = 500 Dirichlet condition ๐œŒ๐ถ ๐‘ ๐œ•๐‘‡ ๐œ•๐‘ก + ๐œ• ๐œ•๐‘ฅ (โˆ’๐œ† ๐œ•๐‘‡ ๐œ•๐‘ฅ ) = 0 โ€ฆโ€ฆโ€ฆโ€ฆ.(1) Where, ๐† is Density (kg/m3 ) Cp is the Heat capacity ๐€ is the conductivity. Assuming ๐œ† as constant equation 1 can be written as, ๐œ•๐‘‡ ๐œ•๐‘ก = ๐›ผ ๐œ•2 ๐‘‡ ๐œ•๐‘ฅ2 โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..(2) Where, ๐›ผ = ๐œ† ๐œŒ๐ถ ๐‘ Non Dimensionalization of the equation, ๐‘‡ฬƒ = T ๐‘ฅฬƒ = x ๐‘กฬƒ = t
  • 6. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 2 | P a g e ๐œ•๐‘‡ฬƒ ๐œ•๐‘กฬƒ = ๐œ•2 ๐‘‡ฬƒ ๐œ•๐‘ฅฬƒ2 2. Finite Difference Explicit Method: Using second order centered difference for space derivative and simple first order forward difference for time derivative. The scheme results in, ๐œ• = T (t + ๐›ฅ๐‘ก) - T (t) ๐œ•๐‘ก ๐›ฅ๐‘ก Using the above scheme, โˆ‚T โˆ‚t = Tj k+1 โˆ’Tj k โˆ†t .โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ... (3) Substituting the equation no. 3, ๐œ•2 ๐‘‡ ๐œ•๐‘ฅ2 = ๐‘‡๐‘—+1 ๐‘˜ โˆ’2๐‘‡๐‘— ๐‘˜ +๐‘‡๐‘—โˆ’1 ๐‘˜ (โˆ†๐‘ฅ)2 โ€ฆโ€ฆโ€ฆโ€ฆ. (4) Using the equation no. 3 and 4, ๐‘‡๐‘— ๐‘˜+1 โˆ’ ๐‘‡๐‘— ๐‘˜ = โˆ†๐‘ก โˆ†๐‘ฅ2 (๐‘‡๐‘—+1 ๐‘˜ โˆ’ 2๐‘‡๐‘— ๐‘˜ + ๐‘‡๐‘—โˆ’1 ๐‘˜ ) โ€ฆโ€ฆโ€ฆ. (5) Considering, ๐‘ = โˆ†๐‘ก โˆ†๐‘ฅ2 This equation helps in finding the temperature evolution at different stages, ๐‘ป๐’‹ ๐’Œ+๐Ÿ = ๐’„. ๐‘ป๐’‹โˆ’๐Ÿ ๐’Œ + (๐Ÿ โˆ’ ๐Ÿ๐’„)๐‘ป๐’‹ ๐’Œ + ๐’„. ๐‘ป๐’‹+๐Ÿ ๐’Œ Discretizing Boundary conditions: Boundary conditions and initial conditions for the problem is given for two cases. Imposed temperature in the two ends of the rod, T(1,t)=300 indicating ๐‘ป ๐Ÿ ๐’Œ = ๐Ÿ‘๐ŸŽ๐ŸŽ T(L,t)=500 indicating ๐‘ป ๐‘ต ๐’Œ = ๐Ÿ“๐ŸŽ๐ŸŽ
  • 7. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 3 | P a g e The initial condition is T(x, 1) = 400 indicating ๐‘‡๐‘— 1 = 400 Applying the boundary conditions in the obtained equation 5 with j varying from 2 to N-1 ๐‘‡๐‘— ๐‘˜+1 = ๐‘๐‘‡๐‘—โˆ’1 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡๐‘— ๐‘˜ + ๐‘๐‘‡๐‘—+1 ๐‘˜ The equation for the second node can be written as, ๐‘‡2 ๐‘˜+1 = ๐‘๐‘‡1 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡2 ๐‘˜ + ๐‘๐‘‡3 ๐‘˜ ๐‘‡2 ๐‘˜+1 = 300๐‘ + (1 โˆ’ 2๐‘)๐‘‡2 ๐‘˜ + ๐‘๐‘‡3 ๐‘˜ The equation for the last but one node can be written as, ๐‘‡ ๐‘โˆ’1 ๐‘˜+1 = ๐‘๐‘‡ ๐‘โˆ’2 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡ ๐‘โˆ’1 ๐‘˜ + ๐‘๐‘‡ ๐‘ ๐‘˜ ๐‘‡ ๐‘โˆ’1 ๐‘˜+1 = ๐‘๐‘‡ ๐‘โˆ’2 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡ ๐‘โˆ’1 ๐‘˜ + 500๐‘ Writing the system of equations in the matrix form: ๐‘ป ๐’Œ+๐Ÿ = ๐‘จ๐‘ป ๐’Œ + ๐‘ฉ ( ๐‘‡1 ๐‘˜+1 โ‹ฎ ๐‘‡ ๐‘ ๐‘˜+1 ) = [ 1 โˆ’ 2๐‘ ๐‘ 0 ๐‘ โ‹ฑ โ‹ฑ 0 โ‹ฑ 1 โˆ’ 2๐‘ ] ( ๐‘‡1 ๐‘˜ โ‹ฎ ๐‘‡ ๐‘ ๐‘˜ ) + [ 300 โ‹ฎ 500 ] Here (1-2c) occupies the main diagonal and c the lower and upper diagonal. B is the boundary condition matrix with only two entries at the extreme nodes and the other values are 0. By applying the derived equation into program graphs for temperature values as function of time for different length divisions can be obtained.
  • 8. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 4 | P a g e Fig 2: Temperature variation at each node of c value 0.25 Fig 3: Temperature variation at each node of C value 0.49 As shown in the graphs 1 and 2 the temperature at each node after some amount of time converges showing that it gains equilibrium. This is considered true only when c value is less than 0.5 which is evident from the graph 3 and 4. As c increased to 0.5, the system became marginally stable. The reason of referring the system has been deduced from unstable solutions where c takes a value above 0.5. 290 340 390 440 490 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temparature(K) LENGTH (L) C = 0.25 270 320 370 420 470 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temperature(K) LENGTH (L) C = 0.49
  • 9. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 5 | P a g e Fig 4: Temperature variation at each node of C value 0.51 Fig 5: Temperature variation at each node of C value 0.75 For values of c > 0.5, the system becomes unstable. The resulting graphs are varying and dissimilar when compared to graphs of stable system. Oscillations in temperature curves can be seen as time progress occurs, which indicates instability in the system. In c = 0.75, instabilities begin to start earlier which say that as c is increased further, oscillations occur rapidly. Von Neumann Boundary condition: Imposed temperature on one end of the rod and a flux on another end of the rod, T (1, t) = 300 indicating, -2E+30 -1.5E+30 -1E+30 -5E+29 0 5E+29 1E+30 1.5E+30 2E+30 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temperature(K) LENGTH (L) C = 0.51 -4E+38 -3E+38 -2E+38 -1E+38 0 1E+38 2E+38 3E+38 4E+38 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temperature(K) LENGTH (L) C = 0.75
  • 10. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 6 | P a g e ๐‘‡1 ๐‘˜ = 300 ๐‘Ž๐‘›๐‘‘ ๐œ•๐‘‡( ๐‘ก, ๐ฟ) ๐œ•๐‘ฅ = 50 This temperature is maintained at all time in this problem. The initial condition is same as the previous case given by T(x, 1) = 400 indicating ๐‘‡๐‘— 1 = 400 Applying the boundary conditions in the obtained with j varying from 2 to N-1: ๐‘‡๐‘— ๐‘˜+1 = ๐‘๐‘‡๐‘—โˆ’1 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡๐‘— ๐‘˜ + ๐‘๐‘‡๐‘—+1 ๐‘˜ The equation for the second node is same as the previous case: ๐‘‡2 ๐‘˜+1 = 300๐‘ + (1 โˆ’ 2๐‘)๐‘‡2 ๐‘˜ + ๐‘๐‘‡3 ๐‘˜ The equation for the second last node using the Von Neumann boundary condition: ๐œ•๐‘‡(๐‘ก, ๐ฟ) ๐œ•๐‘ฅ = 50 Is expressed using backward scheme as follows: ๐‘‡ ๐‘ ๐‘˜ = 50๐›ฅ๐‘ฅ + ๐‘‡ ๐‘โˆ’1 ๐‘˜ We get the final equation asโˆถ ๐‘‡ ๐‘โˆ’1 ๐‘˜+1 = ๐‘๐‘‡ ๐‘โˆ’2 ๐‘˜ + (1 โˆ’ 2๐‘)๐‘‡2 ๐‘˜ + 50๐›ฅ๐‘ฅ + ๐‘‡ ๐‘โˆ’1 ๐‘˜ Applying center difference scheme to the boundary conditions we get, ๐œ•๐‘‡ ๐œ•๐‘ฅ = ๐‘‡๐‘›+1 ๐‘˜ โˆ’ ๐‘‡๐‘›โˆ’1 ๐‘˜ 2โˆ†๐‘ฅ = 50 Where ๐‘‡๐‘›+1 ๐‘˜ = 100 ร— โˆ†๐‘ฅ + ๐‘‡๐‘›โˆ’1 ๐‘˜ is a ghost node that updates the values of Tn in the equation. By applying the derived equation into program graphs for temperature values as function of time for different length divisions can be obtained.
  • 11. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 7 | P a g e Fig 6: Temperature variation at each node of C value 0.25 Fig 7: Temperature variation at each node of C value 0.49 290 310 330 350 370 390 410 430 0 0.2 0.4 0.6 0.8 1 Temperature(K) LENGTH (L) C = 0.25 290 310 330 350 370 390 410 430 0 0.2 0.4 0.6 0.8 1 Temperature(K) LENGTH (L) C = 0.49
  • 12. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 8 | P a g e Fig 8: Temperature variation at each node of C value 0.55 Fig 9: Temperature variation at each node of C value 0.75 From the obtained graphs, it can be seen that the effect of the Von Neumann boundary condition on right end of the bar is observed from the plots. The temperature value at this end is drastically decreased comparing with that of Dirichlet boundary condition. It can be observed that the solution of temperature variation for von Neumann condition takes more time to intersect compared to Dirichlet. From the stability point of view, for values of c > 0.5, oscillations occur with increasing time resulting in instability. -2.5E+38 -2E+38 -1.5E+38 -1E+38 -5E+37 0 5E+37 1E+38 1.5E+38 2E+38 2.5E+38 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temperature(K) LENGTH (L) C = 0.55 -3E+15 -2E+15 -1E+15 0 1E+15 2E+15 3E+15 -0.15 0.05 0.25 0.45 0.65 0.85 1.05 Temperature(K) LENGTH (L) C = 0.75
  • 13. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 9 | P a g e 3. Finite difference implicit method: In this method, the forward difference scheme is applied for time derivative and center second difference scheme is applied for space derivative for the next time step as follows. ๐œ•๐‘‡ ๐œ•๐‘ก = ๐‘‡๐‘— ๐‘˜+1 โˆ’ ๐‘‡๐‘— ๐‘˜ โˆ†๐‘ก ๐œ•2 ๐‘‡ ๐œ•๐‘ฅ2 = ๐‘‡๐‘—+1 ๐‘˜+1 โˆ’ 2๐‘‡๐‘— ๐‘˜+1 + ๐‘‡๐‘—โˆ’1 ๐‘˜+1 (โˆ†๐‘ฅ)2 Substituting the above equations in the equation no. 1, and considering, ๐‘ = โˆ†๐‘ก (โˆ†๐‘ฅ)2, The following equation is obtained, ๐‘ป(๐’Œ) = โˆ’๐’„. ๐‘ป๐’‹โˆ’๐Ÿ ๐’Œ+๐Ÿ + (๐Ÿ + ๐Ÿ๐’„)๐‘ป๐’‹ ๐’Œ+๐Ÿ โˆ’ ๐’„. ๐‘ป๐’‹+๐Ÿ ๐’Œ+๐Ÿ โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ(6) The following boundary conditions are applied to the above stated equation. Boundary conditions and initial conditions for the problem is given for two cases. Imposed temperature in the two ends of the beam, T(1,t)=300 indicating ๐‘ป ๐Ÿ ๐’Œ = ๐Ÿ‘๐ŸŽ๐ŸŽ T(L,t)=500 indicating ๐‘ป ๐‘ต ๐’Œ = ๐Ÿ“๐ŸŽ๐ŸŽ This temperature is maintained at all times for this problem. The initial condition is T(x, 1) =400 indicating ๐‘ป๐’‹ ๐Ÿ = ๐Ÿ’๐ŸŽ๐ŸŽ Applying the boundary conditions in the obtained equation 6 with j varying from 2 to N-1 ๐‘‡๐‘— ๐‘˜ = โˆ’๐‘๐‘‡๐‘—โˆ’1 ๐‘˜+1 + (1 + 2๐‘)๐‘‡๐‘— ๐‘˜+1 โˆ’ ๐‘๐‘‡๐‘—+1 ๐‘˜+1 The equation for the second node can be written as, ๐‘‡2 ๐‘˜ = โˆ’๐‘๐‘‡1 ๐‘˜+1 + (1 + 2๐‘)๐‘‡2 ๐‘˜+1 + ๐‘๐‘‡3 ๐‘˜+1
  • 14. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 10 | P a g e The equation for the last but one nod can be written as, ๐‘‡ ๐‘โˆ’1 ๐‘˜ = โˆ’๐‘๐‘‡ ๐‘โˆ’1 ๐‘˜+1 + (1 + 2๐‘)๐‘‡ ๐‘ ๐‘˜+1 โˆ’ ๐‘๐‘‡ ๐‘+1 ๐‘˜+1 This temperature is maintained at all times for this problem. The initial condition is same as the previous one given by T(x, 1) = 400 indicating, ๐‘‡๐‘— 1 = 400 Applying the boundary conditions in the obtained equation with j varying from 2 to N-1 ๐‘‡๐‘— ๐‘˜ = โˆ’๐‘๐‘‡๐‘—โˆ’1 ๐‘˜+1 + (1 + 2๐‘)๐‘‡๐‘— ๐‘˜+1 โˆ’ ๐‘๐‘‡๐‘—+1 ๐‘˜+1 Writing the system of equation in the matrix form ๐ด. ๐‘‡ ๐‘˜+1 = ๐‘‡ ๐‘˜ + ๐ต [ 1 + 2๐‘ โˆ’๐‘ 0 โˆ’๐‘ โ‹ฑ โ‹ฑ 0 โ‹ฑ 1 + 2๐‘ ] ( ๐‘‡1 ๐‘˜+1 โ‹ฎ ๐‘‡ ๐‘ ๐‘˜+1 ) = ( ๐‘‡1 ๐‘˜ โ‹ฎ ๐‘‡ ๐‘ ๐‘˜ ) + [ 300 โ‹ฎ 500 ] Where A is tridiagonal matrix with 1+2c as the main diagonal and -c as the lower and upper diagonal. B is the boundary condition matrix with only two entries at the extreme nodes and the other values being 0.
  • 15. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 11 | P a g e CONCLUSION Altogether in this lab work we used finite difference method to solve a heat equation and apply the same to a rod which is heated from one end. Here application of two different boundary conditions is done viz. Dirichlet and Von Neumann through which we solve the given problem. This task helped in understanding application of FDM on heat equation analysis and also made us familiarize with different boundary conditions. The implicit mode of solving is done analytically by which we obtain the matrix form of the given problem as written in the report. In order to execute the program for implicit it is required to make use of DGESV function which is not submitted in this lab work. We tried programming the code where we got few errors which we were unable to rectify.
  • 16. Numerical Methods Lab work 2 PENKULINTI Sai Sreenivas & NARASIMHA PRASAD Nagesh 12 | P a g e REFERENCES 1. Team CODE::BLOCKS, http://www.codeblocks.org/downloads/26 Version 17.12, Dated 30 Dec 2017. 2. Tutorials Point โ€“ Fortran Tutorials, https://www.tutorialspoint.com/fortran/index.htm 3. Stanford education - Learn Fortran, https://web.stanford.edu/class/me200c/tutorial_90/ 4. Moodle ENSMA โ€“ Numerical Methods Links, https://moodle.ensma.fr/course/ 5. https://en.wikipedia.org/wiki/Talk%3ANeumann_boundary_condition for Vonn Neumann condition. 6. https://en.wikipedia.org/wiki/Nondimensionalization for non dimensionalization.