Solving the Heat Diffusion Equation (1D PDE) in Matlab

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 57

  • @anjalibhattarai2812
    @anjalibhattarai2812 7 ปีที่แล้ว +7

    Great tutoring!! You saved me in graduate project

  • @kedarshete3131
    @kedarshete3131 2 ปีที่แล้ว +2

    Thank you Kody for this video. Very clearly shows how a finite difference method works, and is different from other techniques like finite volume. Conservation is not imposed in finite difference, as the video shows, Temperature at previous timestep is used to predict fluxes.

  • @johangoethe2472
    @johangoethe2472 6 หลายเดือนก่อน

    Thank you very much. It was so , so useful !!!

  • @baacademy1166
    @baacademy1166 5 ปีที่แล้ว +2

    quite educative, thanks. please further with 2D HEAT DIFFUSION.

  • @tapasbhattacharya9590
    @tapasbhattacharya9590 6 ปีที่แล้ว +1

    Wonderful tutorial. Very nicely presented.

  • @스제임-x9r
    @스제임-x9r หลายเดือนก่อน

    should we consider boudnary condition T1s, T2s before loop ?

  • @Twolf-gaming
    @Twolf-gaming 4 ปีที่แล้ว

    thankyou so much sir..love from india

  • @jeppelarsen7862
    @jeppelarsen7862 4 ปีที่แล้ว

    Hey this is a fantastic Video!! You just simply helped me solving a PDE without ever having to touch Fourier series!!! Thank you!!!
    But what if your starting condition at x=0 is a heat input of q_convek = 400W, and you know the temperatur far away from the surface T(x=-0.5*L, t=0) = 2000K, but you don't know T(0, 0).
    Basicly I want to simulate wall temperture in a combustion engine cylinder, and I know T(L,0)=0, T(-0.5*L, 0)~2000, qdot(0, t=0:t_final) = 400W

    • @e-skills2120
      @e-skills2120 4 ปีที่แล้ว

      @jeppe larsen if oyu still have a doubt I can help you out

  • @chapkovichdima
    @chapkovichdima 6 ปีที่แล้ว +6

    what kind of sorcery is that?

  • @sarahgayot4393
    @sarahgayot4393 5 ปีที่แล้ว

    Thanks a lot for this, a colleague forwarded it to me and it is really great :)

  • @mariadelafuenteruiz4628
    @mariadelafuenteruiz4628 3 ปีที่แล้ว +1

    How does the analytical solution looks like when having a flux in the east boundary condition?

  • @chucknorris9511
    @chucknorris9511 4 ปีที่แล้ว +1

    Kody, excellent video. How would the equations change if we were to look at a triangular section? It has been years since I took this course.

  • @sohaibkhan779
    @sohaibkhan779 5 ปีที่แล้ว

    great tutorial... very helpful... thankyou

  • @farukkilic6010
    @farukkilic6010 5 ปีที่แล้ว +2

    super

  • @stefanbailie3126
    @stefanbailie3126 5 ปีที่แล้ว +1

    So cool!

  • @saeedR86
    @saeedR86 3 ปีที่แล้ว

    thx a lot. it was perfect. i have a question. when we have three insulations layers, how we should write the code?

  • @abdel-gq9po
    @abdel-gq9po 4 ปีที่แล้ว +2

    in lines 26 and 27, I think the first derivative near the walls should be divided by dx*(dx/2) and not dx^2. the distance between each wall and its adjacent node is dx/2.

    • @PollonPollow
      @PollonPollow 3 ปีที่แล้ว

      no it's correct because delta x it's the space over we make the derivative. Each node is at delta x/2 from the boundary of each control area, but we make the derivative over the entire delta x

  • @nodddyyyy
    @nodddyyyy 6 ปีที่แล้ว +1

    Is it possible to have T2s not be set as constant with these equations? Also can this be modified to use a non constant specific heat value ie varying with temperature?

  • @hellsing48
    @hellsing48 3 ปีที่แล้ว

    How would you include heat exchange with environment? Have a bar at constant temperature (e.g. 400C) and and instead of surface temperature give outside temperature (20C). How would you calculate heat exchange with environment in this case?

  • @pedrovinicius3621
    @pedrovinicius3621 3 ปีที่แล้ว +1

    Hey, Im trying to do the same process but with two different materials any advise?

    • @onionking1523
      @onionking1523 3 ปีที่แล้ว

      Im not an expert, but you could try solving the first material, with the aim of finding T2_material1. Then solve for the second material using T1_material2 = T2_material1 and repeat the process.

    • @felipeanime1999
      @felipeanime1999 3 ปีที่แล้ว

      caramba, to tentando fazer a mesma coisa!

    • @onionking1523
      @onionking1523 3 ปีที่แล้ว +1

      @@felipeanime1999 I've been giving it some thought. You could try making the alpha term into a matrix equal in size to your grid, then assign the material specific value to that matrix, then iterate through your alpha matrix within your loop.

  • @luciagerman6389
    @luciagerman6389 4 ปีที่แล้ว

    great video!!! thank you. i wrote figure instead of figure(1) and ended with Matlab making 5001 plots though lmao

  • @AJ-et3vf
    @AJ-et3vf 3 ปีที่แล้ว

    Thank you

  • @krishnendupaul9592
    @krishnendupaul9592 6 ปีที่แล้ว +1

    can we plot t vs T here? if possible then please tell me how. thank you

  • @DailyLifeGermany
    @DailyLifeGermany 3 ปีที่แล้ว

    Thanks for the video. I want to use this code for concentration diffusion in a film is that possible? Because when i put my values for concentrations instead of Temparatures is starts to explode and its not working as nice as here.

  • @manishkala6292
    @manishkala6292 3 ปีที่แล้ว

    Thank you sir. In this code wanted to plot surface plot of x,t and T. But it is showing error. Can anyone give suggestion.

  • @naziabinte5091
    @naziabinte5091 3 ปีที่แล้ว

    In line 7, dx should be l/(n-1), no?

  • @yem.t.3930
    @yem.t.3930 6 ปีที่แล้ว

    thanks so much! nice tutorial

    • @sarkiskazandjian8886
      @sarkiskazandjian8886 6 ปีที่แล้ว +1

      Hey, Yemane! I just watched this video too!

    • @ruturajshinde9175
      @ruturajshinde9175 6 ปีที่แล้ว

      hey @Yemanebirhan Tadesse, can you help me to solve the problem in which i have to find heat distribution in a tapered cylinder.cylinder is trapezoidal; with small diameter 4 cm and large diameter 8 cm; length of cylinder is 20 cm. temperature at the right hand side is 200 degrees and temp at LHS is 100 degree. Temp of the bar itself is 25 degrees. and i want to find out heat distribution after 10 seconds. I want to do it on matlab. If you could guide me that will be great.

  • @baacademy1166
    @baacademy1166 5 ปีที่แล้ว +1

    Good day sir, I will like to show my appreciation for your efforts. My question please how can I plot Temperature against time thanks

    • @e-skills2120
      @e-skills2120 4 ปีที่แล้ว

      @BA ACADEMY Do you still have a doubt

    • @baacademy1166
      @baacademy1166 4 ปีที่แล้ว

      No longer, thanks for the reply

    • @alip6001
      @alip6001 4 ปีที่แล้ว

      @@e-skills2120 i need

    • @alip6001
      @alip6001 4 ปีที่แล้ว

      @@baacademy1166 can you help?

    • @e-skills2120
      @e-skills2120 4 ปีที่แล้ว

      @@alip6001 okay kindly mail me you can find my email id on my channel about section.

  • @AXEGAMINGHDH
    @AXEGAMINGHDH 6 ปีที่แล้ว +2

    you have not used the j loop at the end for the final temp why ????
    at the last u just multiplied with dt which is 0.1 could u please explain that to me
    thanks

    • @chucknorris9511
      @chucknorris9511 4 ปีที่แล้ว

      I was about to ask him the same question. The reason he is multiplying by the dt is to cancel the times so it's adding temperature over each loop. Looks like you commented two years ago so I am sure you figured it out. :)

  • @dashti.behrouz
    @dashti.behrouz 5 ปีที่แล้ว

    can you tell me how to plot the iteration vs error in a figure? thank you .

  • @nicholassimeon2279
    @nicholassimeon2279 4 ปีที่แล้ว

    What unit is alpha in?

  • @gohteikwei1289
    @gohteikwei1289 4 ปีที่แล้ว

    Hi do u have 1D elliptic matlab code?

  • @Fariskov
    @Fariskov 6 ปีที่แล้ว

    How we can check the convergence?

  • @utaritokn
    @utaritokn 7 ปีที่แล้ว

    implicit solutıon do you have?

  • @jiunyeek2606
    @jiunyeek2606 7 ปีที่แล้ว

    hello,Kody. Can i have the coding?

    • @yem.t.3930
      @yem.t.3930 6 ปีที่แล้ว

      so easy, you can just pause the video and write it down, I just did and it runs well.

  • @Roberto70ism
    @Roberto70ism 6 ปีที่แล้ว

    Hi Kody, is possible to have a code, for example in ".m" form? Thanks

    • @yem.t.3930
      @yem.t.3930 6 ปีที่แล้ว

      so easy, you can just pause the video and write it down, I just did and it runs well.

  • @natasharodriguez2279
    @natasharodriguez2279 2 ปีที่แล้ว

    Creo que es exacto lo que necesito pero en español 😭

  • @JamesVestal-dz5qm
    @JamesVestal-dz5qm 7 หลายเดือนก่อน

    I have more coding experience in Matlab than python. Fouriers law says q=-kAdT/dx. Donald trump set a boundary condition on the southern border! Zero flux boundary condition! Sophisticated code like paul smiths laboratory!