Second Derivative | 1D Heat Conduction | Lecture 4 | Simulating Fluid Flows Using Python
HTML-код
- Опубликовано: 11 сен 2024
- In this lecture, we will extend our understanding of finite difference method (FDM) to evaluate second derivatives. Also, we will take up a numerical problem to understand the applicability of these methods.
Suggested readings:
An Introduction to Computational Fluid Dynamics: The Finite Volume Method: Highly recommended for this course.
amzn.to/3oRJov2
PS: Excellent discussion on turbulence!
Numerical Heat Transfer and Fluid Flow: Excellent book oriented towards a physical understanding of various concepts.
amzn.to/3jTMdYC
PS: The author invented SIMPLE method :)
Chapters:
00:01 - Lecture Outline
02:06 - Second Derivative Discretization
07:12 - One Dimensional Heat Conduction
no words to describe how well you explain CFD course was headache for me but you make it easy for me thank you so much wish you happy and healthy life a lots of love from pakistan and one more thing please start CFD on ansys 😘😘
There are some old videos on ansys. Thanks for the kind words.
Hello Tanmay, after watching your video I was able to code it. I am appending it below for your kind perusal. Please suggest some changes if any to make it more fast and accurate. Thank you:
from numpy import *
from pylab import *
L=1.0
n=12 # Grid points
dx=float64(L/(n-1)) # Grid spacing
# Mesh/Grid Creating
x=linspace(0,L,n)
# Initial Guess
T=zeros(n)
# Boundary condition
T[0]=0.0 # Left
T[-1]=1.0 # Right
# Copying old to new array for comparison and updation
T_new=T.copy()
# Iteration over mesh points
error=1
while error>0.000001:
for i in range(1,n-1):
T_new[i]=0.5*(T_new[i+1]+T_new[i-1])
error=sum(abs(T_new-T))
T=T_new.copy()
print(T)
plot(x,T,'r-o')
xlabel('x',fontsize=14)
ylabel('T',fontsize=14)
show()
thanks for these videos! Question about the example at the end. when plugging in a U value above 5, the resulting values grow exceedingly large. Is this due to the difference in gridded values becoming too large to handle using the simple numerical approach applied here? I'm assuming an analytical solution could handle any sized U value.
Great lecture
Thanks.
Awesome lecture!
excellent
Thank you! Cheers!
Hi Tanmay, as usual, you have been amazing! and I just love the way you deliver your lectures.
However, I noticed few a discrepancies while explaining (15:30) the convergence with the example of the 1d steady-state pure diffusion equation ( dT/dx^2=0).
1) You have been using the word time steps in your lecture when you are actually talking about a steady-state equation. This may lead to unnecessary confusion and there is a chance that the audience might confuse numerical iterative convergence with time convergence.
2) At 8:40 I see that you have written one initial condition T(t=0, x
Hi @Malhoth Rajkumar,
Thank you very much for your comment and pointing these out.
1) It is indeed correct that the two terminologies might create confusion. I'll make sure that I stick to the technically correct terminology. I'll point this out in the next lecture so that if anyone else might be having trouble understanding, they can sort it out.
2) You are right that there is no need to define an initial condition per se as this is a pure boundary value problem. But, this has been done more from a perspective of coding so that later on, this could be used to initialize the variables.
Please keep an eye on future lectures and mistakes. Would appreciate if you report them up as and when you see them. Correcting these help big time and as you said, it is easy to look over them :)
@@TanmayAgrawal7 Yes definitely I will try to provide feedback. Because your a great instructor and I want you to go very long in this journey :). Good luck! Eagerly Waiting for your next lecture.
Could you suggest some resources related to ML in CFD ?
Have you watched some of Steve Brunton's videos? They're really good for a general introduction.
I believe that you'll be able to find more resources through those couple of videos.
ruclips.net/video/8e3OT2K99Kw/видео.html
@@TanmayAgrawal7 thanks dude
awesome!
Thanks mate.
Sir kindly make a vedio on CFD using Ansys
There are some videos on my channel already. Have you seen them?