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.
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
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.
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
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?
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?
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 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.
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.
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.
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
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. :)
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!
Great tutoring!! You saved me in graduate project
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.
Thank you very much. It was so , so useful !!!
quite educative, thanks. please further with 2D HEAT DIFFUSION.
Wonderful tutorial. Very nicely presented.
should we consider boudnary condition T1s, T2s before loop ?
thankyou so much sir..love from india
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
@jeppe larsen if oyu still have a doubt I can help you out
what kind of sorcery is that?
Thanks a lot for this, a colleague forwarded it to me and it is really great :)
How does the analytical solution looks like when having a flux in the east boundary condition?
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.
great tutorial... very helpful... thankyou
super
So cool!
thx a lot. it was perfect. i have a question. when we have three insulations layers, how we should write the code?
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.
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
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?
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?
Hey, Im trying to do the same process but with two different materials any advise?
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.
caramba, to tentando fazer a mesma coisa!
@@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.
great video!!! thank you. i wrote figure instead of figure(1) and ended with Matlab making 5001 plots though lmao
Thank you
can we plot t vs T here? if possible then please tell me how. thank you
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.
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.
In line 7, dx should be l/(n-1), no?
thanks so much! nice tutorial
Hey, Yemane! I just watched this video too!
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.
Good day sir, I will like to show my appreciation for your efforts. My question please how can I plot Temperature against time thanks
@BA ACADEMY Do you still have a doubt
No longer, thanks for the reply
@@e-skills2120 i need
@@baacademy1166 can you help?
@@alip6001 okay kindly mail me you can find my email id on my channel about section.
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
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. :)
can you tell me how to plot the iteration vs error in a figure? thank you .
What unit is alpha in?
Hi do u have 1D elliptic matlab code?
How we can check the convergence?
implicit solutıon do you have?
Hassan Saleem hard
I would be quite interested to see this please
hello,Kody. Can i have the coding?
so easy, you can just pause the video and write it down, I just did and it runs well.
Hi Kody, is possible to have a code, for example in ".m" form? Thanks
so easy, you can just pause the video and write it down, I just did and it runs well.
Creo que es exacto lo que necesito pero en español 😭
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!