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

Комментарии • 20

  • @mohammadzohaib4756
    @mohammadzohaib4756 6 месяцев назад +2

    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 😘😘

    • @TanmayAgrawal7
      @TanmayAgrawal7  6 месяцев назад

      There are some old videos on ansys. Thanks for the kind words.

  • @pankajdumka7090
    @pankajdumka7090 3 года назад +1

    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()

  • @MichaelJamesActually
    @MichaelJamesActually 2 месяца назад

    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.

  • @nansonspunk
    @nansonspunk 7 месяцев назад

    Great lecture

  • @carlosterre1991
    @carlosterre1991 3 года назад

    Awesome lecture!

  • @h.e.a311
    @h.e.a311 8 месяцев назад

    excellent

  • @malothrajkumar541
    @malothrajkumar541 3 года назад

    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

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 года назад +1

      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 :)

    • @malothrajkumar541
      @malothrajkumar541 3 года назад

      @@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.

  • @Aditya-yn8jf
    @Aditya-yn8jf 3 года назад +1

    Could you suggest some resources related to ML in CFD ?

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 года назад +1

      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.

    • @TanmayAgrawal7
      @TanmayAgrawal7  3 года назад

      ruclips.net/video/8e3OT2K99Kw/видео.html

    • @Aditya-yn8jf
      @Aditya-yn8jf 3 года назад

      @@TanmayAgrawal7 thanks dude

  • @user-xm4gt4fl7f
    @user-xm4gt4fl7f 3 года назад

    awesome!

  • @kamalkosta8570
    @kamalkosta8570 7 месяцев назад

    Sir kindly make a vedio on CFD using Ansys

    • @TanmayAgrawal7
      @TanmayAgrawal7  7 месяцев назад

      There are some videos on my channel already. Have you seen them?