Incrível, mano! Recentemente fiz um trabalho sobre a equação de calor e seu vídeo me deu uma nova perspectiva do que eu havia feito. Parabéns!
@saamirjassim21088 ай бұрын
Stability of solution also accuracy comparing with another solutions .. Thanks alot .
@YounesLab7 ай бұрын
This might be the subject of the next video, Thank you for you suggestion!
@vikonja1218 ай бұрын
As straightforward as this solution is, I believe it needs to be mentioned: this approach is extremely inefficient. It has time complexity O(N^2), which renders the method practically useless when applied to models/systems with a large number of cells (which ultimately is what one will have when doing serious work). A much more efficient code can be made by adjusting to use scipy's sparse module and solvers for sparce matrices. A good video nonetheless, if you want to get a preview of how the finite-difference method works ;) just mentioning a relevant computational aspect
@jawadmansoor24567 ай бұрын
Using a pre built library/code will render a math video useless. I, like many others, have come here to learn math not a fancy python library. Good work younes!
@vikonja1217 ай бұрын
No need for the cheeky answer, I was just trying to mention the info for people who are more interested in the performance aspect and are maybe looking for such implementations. @@jawadmansoor2456
@ssrini20025 ай бұрын
Could you recommend a video that uses that library please?
@vikonja1214 ай бұрын
@@ssrini2002 I couldn't find any videos actually, there are a couple of websites with code examples, just google "python diffusion sparse matrix" and you'll find them quickly. Although, seeing as there's no videos about this, I might make one myself :)
@YounesLab4 ай бұрын
Thank you for your comment @vikinja121 and for the clarification
@v4dl459 ай бұрын
Awesome tutorial! I recommend you use libraries like manim for 3d visualizations as well!
@omaramdyaze9 ай бұрын
keep going bro , we need more solving physics problem using python , I hope if you have a vid about heat diffusion resolution for rectangular section fins and temperature profiles and thanks in advance bro
@YounesLab9 ай бұрын
I will be sure to make these in the future, thank you for your feedback!
@charlesaugustosantosdocarm4121Ай бұрын
Wonderful! Tank you!
@EdwardHe-jr9vg2 ай бұрын
Hi! It's very awesome video and very straight forward! A quick question, do you know if there's any chance to speed up the process with cuda?
@YounesLabАй бұрын
Thank you for your feedback ^^ Personally I am not that familiar with cuda (though this surely is motivating me to make a video about it 🤔) However there are several techniques you can use drastically improuve the speed (method I discoreved after making the video) * writing the main calculations as a function, then using numba's jit to optimize the computation (by chacing it, ...) * Important note: since the result of each iteration is more or less dependent on the one before, parallezing will most likely not work, however one trick you can use is to vectorize the code by, instead of writing it in form of a loop, you replace it by some sort of linear system of equations A*T = b, which will be way faster since it uses linear algebra to find the solution (using numpy)
@oskarmakala3 ай бұрын
Could anyone explain why is it necessary to use a copy of array u in the scheme equation? I know that it gives slightly different results if we just rewrite u array in each loop, thanks
@YounesLab3 ай бұрын
Hello! We use a separate copy of the array `u` because it represents the temperature distribution at a specific time, `t`. When we discretize our equation in time and space, we get: u[t+1, i] = (dt * a / dx^2) * (u[t, i-1] - 2 * u[t, i] + u[t, i+1]) + u[t, i] In this equation, `u[t, ...]` represents the temperature distribution at time `t`. By updating `u` using a while loop, we ensure that the computation of the distribution at all nodes is accurate for time `t`. If we don't use a copy of `u`, we end up computing the solution at `t+1` using a mixture of data from both `t` and `t+1`. For example, without a copy, `u` is updated dynamically, and when computing each node [i], the left node [i-1] is used from time `t+1` while the right node [i+1] is still from time `t`. This leads to: u[t+1, i] = (dt * a / dx^2) * (u[t+1, i-1] - 2 * u[t, i] + u[t, i+1]) + u[t, i] This does not conform to the established numerical scheme. I hope this clarifies why it's necessary to use a copy of the array `u` in the scheme equation. Let me know if you have any other questions! :)
@RameezRaja-qc9fi9 ай бұрын
Please make more videos of coding on heat transfer and fluid mechanics. Thank you very much!
@feweirАй бұрын
where do you take all formulas, for example that for get dd_ux and dd_uy ^
@YounesLabАй бұрын
The formulas represent an approximation of derivative via a method called "the finite difference method" often called FDM, this method represent a simple but powerfull technique for solving differential equation related problems (especially flow/heat problems) If you want to learn more about it I suggest you to watch another video I made (part 1) kzfaq.info/get/bejne/kNuodL2pzNvaXWQ.html
@madly1nl0v311 ай бұрын
Thank you for this tutorial. Please show me how to plot 3D graph of Riemann Zeta function where we can see the pole at s = 1 + j0, and trivial as well as nontrivial zeroes; the vertical axis shows the magnitude of the output and the color codes the phase angle. Thank you very much beforehand.
@YounesLab11 ай бұрын
Thank you for your Comment. Very Interesting function and Idea, I will look forward into making it.
@nick45be6 ай бұрын
in line 52 (5:49) it says "IndentationError: unexpected indent" after having copied and pasted the code from your github
@YounesLab6 ай бұрын
If you are getting an "IndentationError: unexpected indent" this means there is a problem with the indentation (tabbing) of the line, make sure to delete the tabs and manually re do it.
@hakankosebas20852 ай бұрын
could you do code of "Tutorial: How to simulate the wave equation" video by Nils Berglung
@YounesLabАй бұрын
Great suggestion thank you ^^' ! I will plan on doing this video about the wave equation it will be an interessting subject (in a couple of weeks)
@hakankosebas2085Ай бұрын
@@YounesLab thanks
@johnkevinpadro78197 ай бұрын
What software do you use @Younes
@YounesLab7 ай бұрын
If you mean for making the simulation i only used Visual Studio Code (for python IDLE)