SlideShare a Scribd company logo
1 of 7
Download to read offline
www.engineeringwithsandeep.com| Student Assignment
Assignment No. 04
1-D diffusion problem (FVM)
25.05.2021
Shivam Choubey
Student No: CFDB30321004
www.engineeringwithsandeep.com| Student Assignment
Objective
• Write a program to solve 1-D diffusion problem.
www.engineeringwithsandeep.com| Student Assignment
Problem Statement
Problem: From
An Introduction to Computational Fluid Dynamics: The Finite Volume Method
Book by H. K. Versteeg and W. Malalasekera
(4.1 (page 119) )
• Consider the problem of source-free heat conduction in an insulated rod
whose ends are maintained at constant temperatures of 100°C and 500°C
respectively.
Calculate the steady state temperature distribution in the rod. Thermal
conductivity k equals 1000 W/m.K, cross-sectional area A is 10 × 10-3 m2.
www.engineeringwithsandeep.com| Student Assignment
FVM Matlab code
%author shivam choubey
%date 25.05.2021
%version I
%all units in meter
%code is valid for no source and 1
D conduction problem only
%if change value , the result is
nearly same as actual value
clear all;
close all;
n=50;%Number of part
L=0.5;
k=1000;
area=0.01;
dx=L/n;
dx_cor=dx/2;
A=zeros(n);
B=ones(n,1);
TA=100;%temp of first node
TB=500;%temp of end node
Su=(2*k*area)/dx; % Sb term coff.
%value for centre node first in
our case 2 3 4 points
for i=2:n-1
A(i,i-1)=-(k*area)/dx;
A(i,i+1)=-(k*area)/dx;
A(i,i)=2*(k*area)/dx;
B(i,1)=0;
End
% now for 1 term and nth term
A(1,1)=3*(k*area)/dx;
A(1,2)=-(k*area)/dx;
A(n,n-1)=-(k*area)/dx;
A(n,n)=3*(k*area)/dx;
%Right hand term
B(1)=Su*TA;
B(n)=Su*TB;
%find value of nodes
T=inv(A)*B;
disp("Temp at every node is : ")
T
%plot
for i=1:n
m(i,1)=i*dx;
end
plot(m,T,"*r")
hold on
Part1
Part2
www.engineeringwithsandeep.com| Student Assignment
%exact soluation is
T_real=zeros(n,1);
r=dx;
for i=1:n
T_real(i,1)=800*r+100
r=r+dx
end
plot(m,T_real,"-b")
legend("Numerical sol." ,"Real sol.")
xlabel("Distance")
ylabel("Temp is °c")
Part3
Output
only for node 5
n =
5
Temp at every node is :
T =
140.0000
220.0000
300.0000
380.0000
460.0000
www.engineeringwithsandeep.com| Student Assignment
Plots
www.engineeringwithsandeep.com| Student Assignment
from the above plots, it clearly shows an increasing
number of node make result near to exact solution.

More Related Content

What's hot

Gas dynamics ppt.pptx
Gas dynamics ppt.pptxGas dynamics ppt.pptx
Gas dynamics ppt.pptxhemal_2911
 
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTIONTWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTIONDebre Markos University
 
Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Khusro Kamaluddin
 
Modeling of turbulent flow
Modeling of turbulent flowModeling of turbulent flow
Modeling of turbulent flowTuong Do
 
Boundary Layer Displacement Thickness & Momentum Thickness
Boundary Layer Displacement Thickness & Momentum ThicknessBoundary Layer Displacement Thickness & Momentum Thickness
Boundary Layer Displacement Thickness & Momentum ThicknessHaroon Rashid
 
Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Taani Saxena
 
Finite difference method
Finite difference methodFinite difference method
Finite difference methodDivyansh Verma
 
Introduction to Computational Fluid Dynamics (CFD)
Introduction to Computational Fluid Dynamics (CFD)Introduction to Computational Fluid Dynamics (CFD)
Introduction to Computational Fluid Dynamics (CFD)Hashim Hasnain Hadi
 
Numerical methods- Steady-state-1D-and-2D-Part- I
Numerical methods- Steady-state-1D-and-2D-Part- INumerical methods- Steady-state-1D-and-2D-Part- I
Numerical methods- Steady-state-1D-and-2D-Part- Itmuliya
 
Cfd simulation of flow heat and mass transfer
Cfd simulation of flow  heat and mass transferCfd simulation of flow  heat and mass transfer
Cfd simulation of flow heat and mass transferDr.Qasim Kadhim
 
Mathematical behaviour of pde's
Mathematical behaviour of pde'sMathematical behaviour of pde's
Mathematical behaviour of pde'sparabajinkya0070
 
Intro to fea software
Intro to fea softwareIntro to fea software
Intro to fea softwarekubigs
 
Introduction to Finite Element Method
Introduction to Finite Element Method Introduction to Finite Element Method
Introduction to Finite Element Method SyedAbdullaZain
 
Heat transfer in thermal engineering
Heat transfer in thermal engineeringHeat transfer in thermal engineering
Heat transfer in thermal engineeringAshish Khudaiwala
 

What's hot (20)

Transient heat conduction
Transient heat conductionTransient heat conduction
Transient heat conduction
 
Introduction to cfd
Introduction to cfdIntroduction to cfd
Introduction to cfd
 
Gas dynamics ppt.pptx
Gas dynamics ppt.pptxGas dynamics ppt.pptx
Gas dynamics ppt.pptx
 
Boundary layer
Boundary layerBoundary layer
Boundary layer
 
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTIONTWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
 
Computational Fluid Dynamics
Computational Fluid DynamicsComputational Fluid Dynamics
Computational Fluid Dynamics
 
Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)
 
Modeling of turbulent flow
Modeling of turbulent flowModeling of turbulent flow
Modeling of turbulent flow
 
Boundary Layer Displacement Thickness & Momentum Thickness
Boundary Layer Displacement Thickness & Momentum ThicknessBoundary Layer Displacement Thickness & Momentum Thickness
Boundary Layer Displacement Thickness & Momentum Thickness
 
Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)
 
Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Introduction to Computational Fluid Dynamics (CFD)
Introduction to Computational Fluid Dynamics (CFD)Introduction to Computational Fluid Dynamics (CFD)
Introduction to Computational Fluid Dynamics (CFD)
 
Numerical methods- Steady-state-1D-and-2D-Part- I
Numerical methods- Steady-state-1D-and-2D-Part- INumerical methods- Steady-state-1D-and-2D-Part- I
Numerical methods- Steady-state-1D-and-2D-Part- I
 
Cfd simulation of flow heat and mass transfer
Cfd simulation of flow  heat and mass transferCfd simulation of flow  heat and mass transfer
Cfd simulation of flow heat and mass transfer
 
Mathematical behaviour of pde's
Mathematical behaviour of pde'sMathematical behaviour of pde's
Mathematical behaviour of pde's
 
Boundary layer
Boundary layerBoundary layer
Boundary layer
 
Intro to fea software
Intro to fea softwareIntro to fea software
Intro to fea software
 
Introduction to Finite Element Method
Introduction to Finite Element Method Introduction to Finite Element Method
Introduction to Finite Element Method
 
Heat transfer in thermal engineering
Heat transfer in thermal engineeringHeat transfer in thermal engineering
Heat transfer in thermal engineering
 
Boundary layer theory
Boundary layer theoryBoundary layer theory
Boundary layer theory
 

Similar to 1D diffusion FVM Matlab code for rod temperature distribution

steady state CFD simulation on basic shapes and calculate Cd value
steady state CFD simulation on basic shapes and calculate Cd valuesteady state CFD simulation on basic shapes and calculate Cd value
steady state CFD simulation on basic shapes and calculate Cd valueshivam choubey
 
202003261537530756sanjeev_eco_Linear_Programming.pdf
202003261537530756sanjeev_eco_Linear_Programming.pdf202003261537530756sanjeev_eco_Linear_Programming.pdf
202003261537530756sanjeev_eco_Linear_Programming.pdfAnshitTanwar
 
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...d00a7ece
 
Project 4-Final Presentation RBDO
Project 4-Final Presentation RBDOProject 4-Final Presentation RBDO
Project 4-Final Presentation RBDOssuser07321c
 
Chapter 6-INTEGER PROGRAMMING note.pdf
Chapter 6-INTEGER PROGRAMMING  note.pdfChapter 6-INTEGER PROGRAMMING  note.pdf
Chapter 6-INTEGER PROGRAMMING note.pdfTsegay Berhe
 
Reinforced concrete assignments 2017
Reinforced concrete assignments 2017Reinforced concrete assignments 2017
Reinforced concrete assignments 2017JanneHanka
 
fea in thermal engineering previous querstion papers
 fea in thermal engineering previous querstion papers fea in thermal engineering previous querstion papers
fea in thermal engineering previous querstion papersbalajirao mahendrakar
 
Linear programming
Linear programming Linear programming
Linear programming sadha sivam
 
© 2021 UniCourse Ltd. All Rights Reserved Page 1 of 9
© 2021 UniCourse Ltd. All Rights Reserved   Page 1 of 9 © 2021 UniCourse Ltd. All Rights Reserved   Page 1 of 9
© 2021 UniCourse Ltd. All Rights Reserved Page 1 of 9 LesleyWhitesidefv
 
Linear programming 1
Linear programming 1Linear programming 1
Linear programming 1Van Dolino
 
Mathcad Functions for Forced convection heat transfer calculations
Mathcad Functions for Forced convection heat transfer calculationsMathcad Functions for Forced convection heat transfer calculations
Mathcad Functions for Forced convection heat transfer calculationstmuliya
 
slides-linear-programming-introduction.pdf
slides-linear-programming-introduction.pdfslides-linear-programming-introduction.pdf
slides-linear-programming-introduction.pdfSantiagoGarridoBulln
 
Thesis_presentation1
Thesis_presentation1Thesis_presentation1
Thesis_presentation1Bhushan Velis
 
Lecture on Introduction to finite element methods & its contents
Lecture on Introduction  to  finite element methods  & its  contentsLecture on Introduction  to  finite element methods  & its  contents
Lecture on Introduction to finite element methods & its contentsMesayAlemuTolcha1
 

Similar to 1D diffusion FVM Matlab code for rod temperature distribution (19)

steady state CFD simulation on basic shapes and calculate Cd value
steady state CFD simulation on basic shapes and calculate Cd valuesteady state CFD simulation on basic shapes and calculate Cd value
steady state CFD simulation on basic shapes and calculate Cd value
 
202003261537530756sanjeev_eco_Linear_Programming.pdf
202003261537530756sanjeev_eco_Linear_Programming.pdf202003261537530756sanjeev_eco_Linear_Programming.pdf
202003261537530756sanjeev_eco_Linear_Programming.pdf
 
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...
[Numerical Heat Transfer Part B Fundamentals 2001-sep vol. 40 iss. 3] C. Wan,...
 
Project 4-Final Presentation RBDO
Project 4-Final Presentation RBDOProject 4-Final Presentation RBDO
Project 4-Final Presentation RBDO
 
Linear Programming-1.ppt
Linear Programming-1.pptLinear Programming-1.ppt
Linear Programming-1.ppt
 
Chapter 6-INTEGER PROGRAMMING note.pdf
Chapter 6-INTEGER PROGRAMMING  note.pdfChapter 6-INTEGER PROGRAMMING  note.pdf
Chapter 6-INTEGER PROGRAMMING note.pdf
 
Thesis defense
Thesis defenseThesis defense
Thesis defense
 
Reinforced concrete assignments 2017
Reinforced concrete assignments 2017Reinforced concrete assignments 2017
Reinforced concrete assignments 2017
 
fea in thermal engineering previous querstion papers
 fea in thermal engineering previous querstion papers fea in thermal engineering previous querstion papers
fea in thermal engineering previous querstion papers
 
Linear programming
Linear programming Linear programming
Linear programming
 
© 2021 UniCourse Ltd. All Rights Reserved Page 1 of 9
© 2021 UniCourse Ltd. All Rights Reserved   Page 1 of 9 © 2021 UniCourse Ltd. All Rights Reserved   Page 1 of 9
© 2021 UniCourse Ltd. All Rights Reserved Page 1 of 9
 
Trtstt09
Trtstt09Trtstt09
Trtstt09
 
Trtssssssssssssssssssssss
TrtssssssssssssssssssssssTrtssssssssssssssssssssss
Trtssssssssssssssssssssss
 
Linear programming 1
Linear programming 1Linear programming 1
Linear programming 1
 
Mathcad Functions for Forced convection heat transfer calculations
Mathcad Functions for Forced convection heat transfer calculationsMathcad Functions for Forced convection heat transfer calculations
Mathcad Functions for Forced convection heat transfer calculations
 
Introduction lp
Introduction lpIntroduction lp
Introduction lp
 
slides-linear-programming-introduction.pdf
slides-linear-programming-introduction.pdfslides-linear-programming-introduction.pdf
slides-linear-programming-introduction.pdf
 
Thesis_presentation1
Thesis_presentation1Thesis_presentation1
Thesis_presentation1
 
Lecture on Introduction to finite element methods & its contents
Lecture on Introduction  to  finite element methods  & its  contentsLecture on Introduction  to  finite element methods  & its  contents
Lecture on Introduction to finite element methods & its contents
 

More from shivam choubey

Simulation Investigation of Separated Nozzle Flows
Simulation Investigation of Separated Nozzle FlowsSimulation Investigation of Separated Nozzle Flows
Simulation Investigation of Separated Nozzle Flowsshivam choubey
 
External Aerodynamics (Ahmed body)
External Aerodynamics (Ahmed body)External Aerodynamics (Ahmed body)
External Aerodynamics (Ahmed body)shivam choubey
 
Airfoil Analysis(NACA 0012 ) Ansys Fluent
Airfoil Analysis(NACA 0012 ) Ansys FluentAirfoil Analysis(NACA 0012 ) Ansys Fluent
Airfoil Analysis(NACA 0012 ) Ansys Fluentshivam choubey
 
Couette flow Ansys simulation
Couette flow Ansys simulationCouette flow Ansys simulation
Couette flow Ansys simulationshivam choubey
 
Mixing elbow simulation Ansys
Mixing elbow simulation AnsysMixing elbow simulation Ansys
Mixing elbow simulation Ansysshivam choubey
 
Solve the set of linear equations
Solve the set of linear equationsSolve the set of linear equations
Solve the set of linear equationsshivam choubey
 
sin cos & tan (Plot using MATLAB)
sin cos  & tan (Plot using MATLAB)sin cos  & tan (Plot using MATLAB)
sin cos & tan (Plot using MATLAB)shivam choubey
 
The Singular Value Decomposition theroy + example
 The Singular Value Decomposition theroy + example  The Singular Value Decomposition theroy + example
The Singular Value Decomposition theroy + example shivam choubey
 
1-D Steady Heat conduction FDM
1-D Steady Heat conduction FDM1-D Steady Heat conduction FDM
1-D Steady Heat conduction FDMshivam choubey
 

More from shivam choubey (9)

Simulation Investigation of Separated Nozzle Flows
Simulation Investigation of Separated Nozzle FlowsSimulation Investigation of Separated Nozzle Flows
Simulation Investigation of Separated Nozzle Flows
 
External Aerodynamics (Ahmed body)
External Aerodynamics (Ahmed body)External Aerodynamics (Ahmed body)
External Aerodynamics (Ahmed body)
 
Airfoil Analysis(NACA 0012 ) Ansys Fluent
Airfoil Analysis(NACA 0012 ) Ansys FluentAirfoil Analysis(NACA 0012 ) Ansys Fluent
Airfoil Analysis(NACA 0012 ) Ansys Fluent
 
Couette flow Ansys simulation
Couette flow Ansys simulationCouette flow Ansys simulation
Couette flow Ansys simulation
 
Mixing elbow simulation Ansys
Mixing elbow simulation AnsysMixing elbow simulation Ansys
Mixing elbow simulation Ansys
 
Solve the set of linear equations
Solve the set of linear equationsSolve the set of linear equations
Solve the set of linear equations
 
sin cos & tan (Plot using MATLAB)
sin cos  & tan (Plot using MATLAB)sin cos  & tan (Plot using MATLAB)
sin cos & tan (Plot using MATLAB)
 
The Singular Value Decomposition theroy + example
 The Singular Value Decomposition theroy + example  The Singular Value Decomposition theroy + example
The Singular Value Decomposition theroy + example
 
1-D Steady Heat conduction FDM
1-D Steady Heat conduction FDM1-D Steady Heat conduction FDM
1-D Steady Heat conduction FDM
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 

1D diffusion FVM Matlab code for rod temperature distribution

  • 1. www.engineeringwithsandeep.com| Student Assignment Assignment No. 04 1-D diffusion problem (FVM) 25.05.2021 Shivam Choubey Student No: CFDB30321004
  • 2. www.engineeringwithsandeep.com| Student Assignment Objective • Write a program to solve 1-D diffusion problem.
  • 3. www.engineeringwithsandeep.com| Student Assignment Problem Statement Problem: From An Introduction to Computational Fluid Dynamics: The Finite Volume Method Book by H. K. Versteeg and W. Malalasekera (4.1 (page 119) ) • Consider the problem of source-free heat conduction in an insulated rod whose ends are maintained at constant temperatures of 100°C and 500°C respectively. Calculate the steady state temperature distribution in the rod. Thermal conductivity k equals 1000 W/m.K, cross-sectional area A is 10 × 10-3 m2.
  • 4. www.engineeringwithsandeep.com| Student Assignment FVM Matlab code %author shivam choubey %date 25.05.2021 %version I %all units in meter %code is valid for no source and 1 D conduction problem only %if change value , the result is nearly same as actual value clear all; close all; n=50;%Number of part L=0.5; k=1000; area=0.01; dx=L/n; dx_cor=dx/2; A=zeros(n); B=ones(n,1); TA=100;%temp of first node TB=500;%temp of end node Su=(2*k*area)/dx; % Sb term coff. %value for centre node first in our case 2 3 4 points for i=2:n-1 A(i,i-1)=-(k*area)/dx; A(i,i+1)=-(k*area)/dx; A(i,i)=2*(k*area)/dx; B(i,1)=0; End % now for 1 term and nth term A(1,1)=3*(k*area)/dx; A(1,2)=-(k*area)/dx; A(n,n-1)=-(k*area)/dx; A(n,n)=3*(k*area)/dx; %Right hand term B(1)=Su*TA; B(n)=Su*TB; %find value of nodes T=inv(A)*B; disp("Temp at every node is : ") T %plot for i=1:n m(i,1)=i*dx; end plot(m,T,"*r") hold on Part1 Part2
  • 5. www.engineeringwithsandeep.com| Student Assignment %exact soluation is T_real=zeros(n,1); r=dx; for i=1:n T_real(i,1)=800*r+100 r=r+dx end plot(m,T_real,"-b") legend("Numerical sol." ,"Real sol.") xlabel("Distance") ylabel("Temp is °c") Part3 Output only for node 5 n = 5 Temp at every node is : T = 140.0000 220.0000 300.0000 380.0000 460.0000
  • 7. www.engineeringwithsandeep.com| Student Assignment from the above plots, it clearly shows an increasing number of node make result near to exact solution.