SlideShare a Scribd company logo
1 of 23
Download to read offline
Example of heat equation in
CFD
Author : Parham Sagharichi Ha
Agenda
▪ Modes of Heat transfer
▪ Heat conduction - Fourier’s law
▪ Unsteady heat conduction in one dimension
▪ Problem
▪ Solution
▪ Matlab code
Modes of Heat transfer
1) Conduction
2) Convection
3) Radiation
Heat conduction - Fourier’s law
▪ The heat flux is proportional to the temperature gradient:
q =
Q
A
= −kA
𝜕T
𝜕x
where k(x,y,z,T) is the thermal conductivity.
▪ In most practical situations conduction, convection, and radiation
appear in combination. Also for convection, the heat transfer
coefficient is important,because a flow can only carryheat away
from a wall when that wall is conducting.
Heat conduction - Fourier’s law
Unsteady heat conduction in one dimension
Problem
▪ Consider the subsurface temperature fluctuations of rock
as the result of daily or seasonal temperature variations.
As the surface is heated or cooled, the heat will diffuse
through the soil and rock. determine Plot the heat at depths of
0, 5 , 10, 15 and 20 m
Solution
▪ Mathematically, diffusion may be represented by the
equation
𝜕𝑇(𝑡, 𝑧)
𝜕𝑡
= 𝛼
𝜕2 𝑇(𝑡, 𝑧)
𝜕𝑧2
▪ Where T(t,z) is the temperature at time t and depth z
▪ A typical value for 𝛼 is 2 ∗ 10−6 𝑚2
𝑠
Solution
▪ Initial conditions
The top boundary is the simplest, we will simply specify a
temperature that varies seasonally,
𝑇 𝑡, 0 = 15 − 10 sin(
2𝜋𝑡
12
)
This will create an average annual temperature of 15, an annual low
of 5 and an annual high of 25 (time is measured in months, and we
are not starting on Jan 1).
Solution
▪ Boundary conditions
We will assume that no heat reaches the bottom from the top
𝜕𝑇(𝑡,𝑧)
𝜕𝑧
= 0
This specifies that there is 0 heat flow at the bottom. We do not yet
know what this bottom temperature will be.
The left and right boundary conditions are a bit more problematic.
Solution
▪ Finite difference approximations :
1) Forward derivative
2) Backward derivative
3) Central derivative
Solution
1) Forward derivative :
For the first derivative of temperature with respect to time we will
use the "forward derivative"
𝜕𝑇(𝑡 𝑖,𝑧)
𝜕𝑡
≈
𝑇 𝑡 𝑖+1,𝑧 −𝑇(𝑡 𝑖,𝑧)
∆𝑡
2) Central derivative :
For the first derivative of temperature with respect to depth, we will
use the "central derivative
𝜕𝑇(𝑡, 𝑧𝑖)
𝜕𝑧
≈
𝑇 𝑡, 𝑧𝑖+1 − 𝑇(𝑡, 𝑧𝑖−1)
2∆𝑧
Solution
▪ Note that , For the second derivative of temperature with respect to
depth, we will use :
𝜕2 𝑇(𝑡, 𝑧𝑖)
𝜕𝑧2
≈
𝑇 𝑡, 𝑧𝑖+1 − 𝑇(𝑡, 𝑧𝑖)
∆𝑧
−
𝑇 𝑡, 𝑧𝑖 − 𝑇(𝑡, 𝑧𝑖−1)
∆𝑧
∆𝑧
Solution
▪ In order to solve the system numerically, we must first
choose an appropriate "space" to solve the problem in.
▪ We will have two axes,the vertical axes representing
depth, from 0m to 100 m below the surface, and the
horizontal axis will represent one year's worth of time.
Matlab code
dz = .25; %each depth step is 1/4 meter
Nz = 400; % Choose the number of depth steps (should go to at least 100 m)
Nt = 5000; % Choose the number of time steps
dt = (365*24*60*60)/Nt; %Length of each time step in seconds (~ 6.3*10^3
seconds, or ~105 minutes)
K = 2*10^-6; % "canonical" K is 10e-6 m^2/s
T = 15*ones(Nz+1,Nt+1); %Create temperature matrix with Nz+1 rows, and
Nt+1 columns
% Initial guess is thatT is 15 everywhere.
time = [0:12/Nt:12];
T(1,:) = 15-10*sin(2*pi*time/12); %Set surface temperature
maxiter = 500
Matlab code
for iter = 1:maxiter
Tlast =T; %Save the last guess
T(:,1) =Tlast(:,end); %Initialize the temp at t=0 to the last temp
for i=2:Nt+1,
depth_2D = (T(1:end-2,i-1)-2*T(2:end-1,i-1)+T(3:end,i-1))/dz^2;
time_1D = K*depth_2D;
T(2:end-1,i) = time_1D*dt +T(2:end-1,i-1);
T(end,i) =T(end-1,i); % Enforce bottom BC
end
err(iter) = max(abs(T(:)-Tlast(:))); %Find difference between last two solutions
if err(iter)<1E-4
break; % Stop if solutions very similar, we have convergence
end
end
Matlab code
if iter==maxiter;
warning('Convergence not reached')
end
figure(1)
plot(log(err)), title('Convergence plot')
figure(2)
imagesc([0 12],[0 100],T); title('Temperature plot (imagesc)')
colorbar
Matlab code
figure(3)
depth = [0:dz:Nz*dz];
contourf(time,-depth,T); title('Temperature plot (contourf)')
colorbar
figure(4)
plot(time,T(1,:),time,T(21,:),time,T(41,:),time,T(61,:),time,T(81,:))
xlabel('Time (months)'); ylabel('Temperature (C)');
legend('0m','5m','10m','15m', '20m')
Matlab result
Matlab result
Matlab result
Matlab result
Do you have any questions ?
Parham Sagharichi Ha

More Related Content

What's hot

Unit 3 transient heat condution
Unit 3 transient heat condutionUnit 3 transient heat condution
Unit 3 transient heat condutionYashawantha K M
 
Solution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. JijiSolution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. Jijiphysicsbook
 
Derivation and solution of the heat equation in 1-D
Derivation and solution of the heat equation in 1-DDerivation and solution of the heat equation in 1-D
Derivation and solution of the heat equation in 1-DIJESM JOURNAL
 
Fins equation & lumped heat capacity system
Fins equation & lumped heat capacity systemFins equation & lumped heat capacity system
Fins equation & lumped heat capacity systemN/A
 
Heat conduction equation
Heat conduction equationHeat conduction equation
Heat conduction equationYashawantha K M
 
1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat GenerationMihir Patel
 
Numerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductionNumerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductiontmuliya
 
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
 
Etht grp 10 ,140080125005 006-007-008
Etht grp 10 ,140080125005 006-007-008Etht grp 10 ,140080125005 006-007-008
Etht grp 10 ,140080125005 006-007-008Yash Dobariya
 
General Heat Conduction Equation
General Heat Conduction EquationGeneral Heat Conduction Equation
General Heat Conduction Equationaramesh2003
 
One-dimensional conduction-with_no_heat_generation
One-dimensional conduction-with_no_heat_generationOne-dimensional conduction-with_no_heat_generation
One-dimensional conduction-with_no_heat_generationtmuliya
 
Heat Conduction Simulation with FDM
Heat Conduction Simulation with FDMHeat Conduction Simulation with FDM
Heat Conduction Simulation with FDMXueer Zhang
 

What's hot (20)

Unit 3 transient heat condution
Unit 3 transient heat condutionUnit 3 transient heat condution
Unit 3 transient heat condution
 
UNIT-1 CONDUCTION
UNIT-1 CONDUCTIONUNIT-1 CONDUCTION
UNIT-1 CONDUCTION
 
Solution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. JijiSolution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. Jiji
 
Derivation and solution of the heat equation in 1-D
Derivation and solution of the heat equation in 1-DDerivation and solution of the heat equation in 1-D
Derivation and solution of the heat equation in 1-D
 
Transient heat conduction
Transient heat conductionTransient heat conduction
Transient heat conduction
 
Fins equation & lumped heat capacity system
Fins equation & lumped heat capacity systemFins equation & lumped heat capacity system
Fins equation & lumped heat capacity system
 
Heat conduction equation
Heat conduction equationHeat conduction equation
Heat conduction equation
 
1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation
 
Numerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductionNumerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conduction
 
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTIONTWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
TWO DIMENSIONAL STEADY STATE HEAT CONDUCTION
 
Etht grp 10 ,140080125005 006-007-008
Etht grp 10 ,140080125005 006-007-008Etht grp 10 ,140080125005 006-007-008
Etht grp 10 ,140080125005 006-007-008
 
Fins
FinsFins
Fins
 
General Heat Conduction Equation
General Heat Conduction EquationGeneral Heat Conduction Equation
General Heat Conduction Equation
 
One-dimensional conduction-with_no_heat_generation
One-dimensional conduction-with_no_heat_generationOne-dimensional conduction-with_no_heat_generation
One-dimensional conduction-with_no_heat_generation
 
Heat transfer by conduction
Heat transfer by conductionHeat transfer by conduction
Heat transfer by conduction
 
1 d heat equation
1 d heat equation1 d heat equation
1 d heat equation
 
Heat Conduction Simulation with FDM
Heat Conduction Simulation with FDMHeat Conduction Simulation with FDM
Heat Conduction Simulation with FDM
 
Analysis of solids
Analysis of solidsAnalysis of solids
Analysis of solids
 
Heat conduction through a plane wall
Heat conduction through a plane wallHeat conduction through a plane wall
Heat conduction through a plane wall
 
No 6 g3 solved problems
No 6 g3  solved problemsNo 6 g3  solved problems
No 6 g3 solved problems
 

Viewers also liked

Develop a simple equation to calculate the heat loss due to flue gases in boiler
Develop a simple equation to calculate the heat loss due to flue gases in boilerDevelop a simple equation to calculate the heat loss due to flue gases in boiler
Develop a simple equation to calculate the heat loss due to flue gases in boilerSalah Salem
 
Gradient & area under a graph
Gradient & area under a graphGradient & area under a graph
Gradient & area under a graphmurtabak daging
 
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?Francois Letellier
 
Soy Viajero 360. Presentación corporativa
Soy Viajero 360. Presentación corporativaSoy Viajero 360. Presentación corporativa
Soy Viajero 360. Presentación corporativaSoy Viajero 360
 
Perron joshua portfolio
Perron joshua portfolioPerron joshua portfolio
Perron joshua portfolioJosh Perron
 
Streamline Solutions - Elements Vehicle CAE Suite
Streamline Solutions - Elements Vehicle CAE SuiteStreamline Solutions - Elements Vehicle CAE Suite
Streamline Solutions - Elements Vehicle CAE SuiteAngus Lock
 
Extend and Surround – how to integrate IBM Software at customers using Adobe ...
Extend and Surround – how to integrate IBM Software at customers using Adobe ...Extend and Surround – how to integrate IBM Software at customers using Adobe ...
Extend and Surround – how to integrate IBM Software at customers using Adobe ...LetsConnect
 
Numbers and Number Sense: Types of Numbers
Numbers and Number Sense: Types of NumbersNumbers and Number Sense: Types of Numbers
Numbers and Number Sense: Types of NumbersBridgette Mackey
 
Mathematics for Grade 6: Composite Numbers
Mathematics for Grade 6: Composite NumbersMathematics for Grade 6: Composite Numbers
Mathematics for Grade 6: Composite NumbersBridgette Mackey
 
Cfd analysis report of bike model
Cfd analysis report of  bike modelCfd analysis report of  bike model
Cfd analysis report of bike modelSoumya Dash
 
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )Lab (kan dokusu) (fazlası için www.tipfakultesi.org )
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )www.tipfakultesi. org
 
Math(F5) Gradient And Area Under A Graph
Math(F5)  Gradient And Area Under A GraphMath(F5)  Gradient And Area Under A Graph
Math(F5) Gradient And Area Under A Graphroszelan
 
Foreigner's guide to buying real estate in the philippines
Foreigner's guide to buying real estate in the philippinesForeigner's guide to buying real estate in the philippines
Foreigner's guide to buying real estate in the philippinesgeann123
 
Divergence,curl,gradient
Divergence,curl,gradientDivergence,curl,gradient
Divergence,curl,gradientKunj Patel
 
Application of Gauss,Green and Stokes Theorem
Application of Gauss,Green and Stokes TheoremApplication of Gauss,Green and Stokes Theorem
Application of Gauss,Green and Stokes TheoremSamiul Ehsan
 

Viewers also liked (20)

Vector operators
Vector operatorsVector operators
Vector operators
 
Develop a simple equation to calculate the heat loss due to flue gases in boiler
Develop a simple equation to calculate the heat loss due to flue gases in boilerDevelop a simple equation to calculate the heat loss due to flue gases in boiler
Develop a simple equation to calculate the heat loss due to flue gases in boiler
 
Gradient & area under a graph
Gradient & area under a graphGradient & area under a graph
Gradient & area under a graph
 
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?
open innovation : Comment l'ouverture peut-être un atout pour l'innovation ?
 
Soy Viajero 360. Presentación corporativa
Soy Viajero 360. Presentación corporativaSoy Viajero 360. Presentación corporativa
Soy Viajero 360. Presentación corporativa
 
ISL_Cert0021
ISL_Cert0021ISL_Cert0021
ISL_Cert0021
 
Perron joshua portfolio
Perron joshua portfolioPerron joshua portfolio
Perron joshua portfolio
 
Printshop
PrintshopPrintshop
Printshop
 
Streamline Solutions - Elements Vehicle CAE Suite
Streamline Solutions - Elements Vehicle CAE SuiteStreamline Solutions - Elements Vehicle CAE Suite
Streamline Solutions - Elements Vehicle CAE Suite
 
Extend and Surround – how to integrate IBM Software at customers using Adobe ...
Extend and Surround – how to integrate IBM Software at customers using Adobe ...Extend and Surround – how to integrate IBM Software at customers using Adobe ...
Extend and Surround – how to integrate IBM Software at customers using Adobe ...
 
Numbers and Number Sense: Types of Numbers
Numbers and Number Sense: Types of NumbersNumbers and Number Sense: Types of Numbers
Numbers and Number Sense: Types of Numbers
 
Mathematics for Grade 6: Composite Numbers
Mathematics for Grade 6: Composite NumbersMathematics for Grade 6: Composite Numbers
Mathematics for Grade 6: Composite Numbers
 
Cfd analysis report of bike model
Cfd analysis report of  bike modelCfd analysis report of  bike model
Cfd analysis report of bike model
 
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )Lab (kan dokusu) (fazlası için www.tipfakultesi.org )
Lab (kan dokusu) (fazlası için www.tipfakultesi.org )
 
CFD Project
CFD ProjectCFD Project
CFD Project
 
Math(F5) Gradient And Area Under A Graph
Math(F5)  Gradient And Area Under A GraphMath(F5)  Gradient And Area Under A Graph
Math(F5) Gradient And Area Under A Graph
 
Foreigner's guide to buying real estate in the philippines
Foreigner's guide to buying real estate in the philippinesForeigner's guide to buying real estate in the philippines
Foreigner's guide to buying real estate in the philippines
 
Autodesk CFD for better building design by ZHU ge
Autodesk CFD for better building design by ZHU geAutodesk CFD for better building design by ZHU ge
Autodesk CFD for better building design by ZHU ge
 
Divergence,curl,gradient
Divergence,curl,gradientDivergence,curl,gradient
Divergence,curl,gradient
 
Application of Gauss,Green and Stokes Theorem
Application of Gauss,Green and Stokes TheoremApplication of Gauss,Green and Stokes Theorem
Application of Gauss,Green and Stokes Theorem
 

Similar to Heatequationincfd

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
 
Application of Numerical Methods (Finite Difference) in Heat Transfer
Application of Numerical Methods (Finite Difference) in Heat TransferApplication of Numerical Methods (Finite Difference) in Heat Transfer
Application of Numerical Methods (Finite Difference) in Heat TransferShivshambhu Kumar
 
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
 
Mit2 092 f09_lec20
Mit2 092 f09_lec20Mit2 092 f09_lec20
Mit2 092 f09_lec20Rahman Hakim
 
Mit2 092 f09_lec11
Mit2 092 f09_lec11Mit2 092 f09_lec11
Mit2 092 f09_lec11Rahman Hakim
 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floorAmy Do
 
Heat Map Modeling Using Resistive Network
Heat Map Modeling Using Resistive NetworkHeat Map Modeling Using Resistive Network
Heat Map Modeling Using Resistive Networkssurgnier
 
heat diffusion equation.ppt
heat diffusion equation.pptheat diffusion equation.ppt
heat diffusion equation.ppt056JatinGavel
 
heat diffusion equation.ppt
heat diffusion equation.pptheat diffusion equation.ppt
heat diffusion equation.ppt056JatinGavel
 
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
 
Admission in india 2014
Admission in india 2014Admission in india 2014
Admission in india 2014Edhole.com
 
Thermal diffusivity
Thermal diffusivityThermal diffusivity
Thermal diffusivityKushaji
 
free Video lecture in india
free Video lecture in indiafree Video lecture in india
free Video lecture in indiaEdhole.com
 
Free video lecture in india
Free video lecture in indiaFree video lecture in india
Free video lecture in indiaCss Founder
 
Fundamentals of Transport Phenomena ChE 715
Fundamentals of Transport Phenomena ChE 715Fundamentals of Transport Phenomena ChE 715
Fundamentals of Transport Phenomena ChE 715HelpWithAssignment.com
 

Similar to Heatequationincfd (20)

numerical.ppt
numerical.pptnumerical.ppt
numerical.ppt
 
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
 
Application of Numerical Methods (Finite Difference) in Heat Transfer
Application of Numerical Methods (Finite Difference) in Heat TransferApplication of Numerical Methods (Finite Difference) in Heat Transfer
Application of Numerical Methods (Finite Difference) in Heat Transfer
 
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
 
Mit2 092 f09_lec20
Mit2 092 f09_lec20Mit2 092 f09_lec20
Mit2 092 f09_lec20
 
Statistics Homework Help
Statistics Homework HelpStatistics Homework Help
Statistics Homework Help
 
Multiple Linear Regression Homework Help
Multiple Linear Regression Homework HelpMultiple Linear Regression Homework Help
Multiple Linear Regression Homework Help
 
Mit2 092 f09_lec11
Mit2 092 f09_lec11Mit2 092 f09_lec11
Mit2 092 f09_lec11
 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floor
 
Heat Map Modeling Using Resistive Network
Heat Map Modeling Using Resistive NetworkHeat Map Modeling Using Resistive Network
Heat Map Modeling Using Resistive Network
 
heat diffusion equation.ppt
heat diffusion equation.pptheat diffusion equation.ppt
heat diffusion equation.ppt
 
heat diffusion equation.ppt
heat diffusion equation.pptheat diffusion equation.ppt
heat diffusion equation.ppt
 
Ch18
Ch18Ch18
Ch18
 
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...
 
M220w07
M220w07M220w07
M220w07
 
Admission in india 2014
Admission in india 2014Admission in india 2014
Admission in india 2014
 
Thermal diffusivity
Thermal diffusivityThermal diffusivity
Thermal diffusivity
 
free Video lecture in india
free Video lecture in indiafree Video lecture in india
free Video lecture in india
 
Free video lecture in india
Free video lecture in indiaFree video lecture in india
Free video lecture in india
 
Fundamentals of Transport Phenomena ChE 715
Fundamentals of Transport Phenomena ChE 715Fundamentals of Transport Phenomena ChE 715
Fundamentals of Transport Phenomena ChE 715
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Heatequationincfd

  • 1. Example of heat equation in CFD Author : Parham Sagharichi Ha
  • 2. Agenda ▪ Modes of Heat transfer ▪ Heat conduction - Fourier’s law ▪ Unsteady heat conduction in one dimension ▪ Problem ▪ Solution ▪ Matlab code
  • 3. Modes of Heat transfer 1) Conduction 2) Convection 3) Radiation
  • 4. Heat conduction - Fourier’s law ▪ The heat flux is proportional to the temperature gradient: q = Q A = −kA 𝜕T 𝜕x where k(x,y,z,T) is the thermal conductivity. ▪ In most practical situations conduction, convection, and radiation appear in combination. Also for convection, the heat transfer coefficient is important,because a flow can only carryheat away from a wall when that wall is conducting.
  • 5. Heat conduction - Fourier’s law
  • 6. Unsteady heat conduction in one dimension
  • 7. Problem ▪ Consider the subsurface temperature fluctuations of rock as the result of daily or seasonal temperature variations. As the surface is heated or cooled, the heat will diffuse through the soil and rock. determine Plot the heat at depths of 0, 5 , 10, 15 and 20 m
  • 8. Solution ▪ Mathematically, diffusion may be represented by the equation 𝜕𝑇(𝑡, 𝑧) 𝜕𝑡 = 𝛼 𝜕2 𝑇(𝑡, 𝑧) 𝜕𝑧2 ▪ Where T(t,z) is the temperature at time t and depth z ▪ A typical value for 𝛼 is 2 ∗ 10−6 𝑚2 𝑠
  • 9. Solution ▪ Initial conditions The top boundary is the simplest, we will simply specify a temperature that varies seasonally, 𝑇 𝑡, 0 = 15 − 10 sin( 2𝜋𝑡 12 ) This will create an average annual temperature of 15, an annual low of 5 and an annual high of 25 (time is measured in months, and we are not starting on Jan 1).
  • 10. Solution ▪ Boundary conditions We will assume that no heat reaches the bottom from the top 𝜕𝑇(𝑡,𝑧) 𝜕𝑧 = 0 This specifies that there is 0 heat flow at the bottom. We do not yet know what this bottom temperature will be. The left and right boundary conditions are a bit more problematic.
  • 11. Solution ▪ Finite difference approximations : 1) Forward derivative 2) Backward derivative 3) Central derivative
  • 12. Solution 1) Forward derivative : For the first derivative of temperature with respect to time we will use the "forward derivative" 𝜕𝑇(𝑡 𝑖,𝑧) 𝜕𝑡 ≈ 𝑇 𝑡 𝑖+1,𝑧 −𝑇(𝑡 𝑖,𝑧) ∆𝑡 2) Central derivative : For the first derivative of temperature with respect to depth, we will use the "central derivative 𝜕𝑇(𝑡, 𝑧𝑖) 𝜕𝑧 ≈ 𝑇 𝑡, 𝑧𝑖+1 − 𝑇(𝑡, 𝑧𝑖−1) 2∆𝑧
  • 13. Solution ▪ Note that , For the second derivative of temperature with respect to depth, we will use : 𝜕2 𝑇(𝑡, 𝑧𝑖) 𝜕𝑧2 ≈ 𝑇 𝑡, 𝑧𝑖+1 − 𝑇(𝑡, 𝑧𝑖) ∆𝑧 − 𝑇 𝑡, 𝑧𝑖 − 𝑇(𝑡, 𝑧𝑖−1) ∆𝑧 ∆𝑧
  • 14. Solution ▪ In order to solve the system numerically, we must first choose an appropriate "space" to solve the problem in. ▪ We will have two axes,the vertical axes representing depth, from 0m to 100 m below the surface, and the horizontal axis will represent one year's worth of time.
  • 15. Matlab code dz = .25; %each depth step is 1/4 meter Nz = 400; % Choose the number of depth steps (should go to at least 100 m) Nt = 5000; % Choose the number of time steps dt = (365*24*60*60)/Nt; %Length of each time step in seconds (~ 6.3*10^3 seconds, or ~105 minutes) K = 2*10^-6; % "canonical" K is 10e-6 m^2/s T = 15*ones(Nz+1,Nt+1); %Create temperature matrix with Nz+1 rows, and Nt+1 columns % Initial guess is thatT is 15 everywhere. time = [0:12/Nt:12]; T(1,:) = 15-10*sin(2*pi*time/12); %Set surface temperature maxiter = 500
  • 16. Matlab code for iter = 1:maxiter Tlast =T; %Save the last guess T(:,1) =Tlast(:,end); %Initialize the temp at t=0 to the last temp for i=2:Nt+1, depth_2D = (T(1:end-2,i-1)-2*T(2:end-1,i-1)+T(3:end,i-1))/dz^2; time_1D = K*depth_2D; T(2:end-1,i) = time_1D*dt +T(2:end-1,i-1); T(end,i) =T(end-1,i); % Enforce bottom BC end err(iter) = max(abs(T(:)-Tlast(:))); %Find difference between last two solutions if err(iter)<1E-4 break; % Stop if solutions very similar, we have convergence end end
  • 17. Matlab code if iter==maxiter; warning('Convergence not reached') end figure(1) plot(log(err)), title('Convergence plot') figure(2) imagesc([0 12],[0 100],T); title('Temperature plot (imagesc)') colorbar
  • 18. Matlab code figure(3) depth = [0:dz:Nz*dz]; contourf(time,-depth,T); title('Temperature plot (contourf)') colorbar figure(4) plot(time,T(1,:),time,T(21,:),time,T(41,:),time,T(61,:),time,T(81,:)) xlabel('Time (months)'); ylabel('Temperature (C)'); legend('0m','5m','10m','15m', '20m')
  • 23. Do you have any questions ? Parham Sagharichi Ha