Wednesday, 15 July 2015

The Heat Equation: a Python implementation

By making some assumptions, I am going to simulate the flow of heat through an ideal rod.
Suppose you have a cylindrical rod whose ends are maintained at a fixed temperature and is heated at a certain x for a certain interval of time. Suppose that the temperature in each section with infinitesimal width dx is uniform so that we can describe the temperature in the rod using a function of only x and t.
im

Mathematically speaking, problem we are now facing is the following:

clip_image002

where k is a constant called thermal diffusivity and is different according to the different materials. By using the method of separation of variables, we can find the solution we need and by applying the initial conditions we find a particular solution for f(x) = sin(x) and L = pi
Our solution looks something like this:
clip_image002[5]
Now we only need to evaluate our function at each x and t. Remember that if u(x,y) is differentiable, then:

clip_image002[7]

holds. We can throw out the last term and approximate our function using the above relation since partial derivatives of u must exists and we can easily get them. Thinking about it, the second term is useless too, since we are not moving along the x axis, therefore we are left with the following:

clip_image002[9]

By using matplotlib and the animation function I generated this short clip:


Here is the python implementation of the solution and the code used to graph the solution evolving with time.


Hope this was useful!

155 comments:

  1. Hello, maybe I'm wrong but it seems to me that the function u(x0, t0) it is already exponentially damped since t0 is increasing in the for cycle and it is argument of u(x0, t0). Why you add the gradient? This should be added to a fixed initial value...please let me know what do you think...

    ReplyDelete
    Replies
    1. my opinion is that you do not need the gradient at all since you already know the time dependent solution...

      Delete
    2. The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download Now

      >>>>> Download Full

      The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download LINK

      >>>>> Download Now

      The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download Full

      >>>>> Download LINK Bg

      Delete
  2. what needs to be change, if my boundary condition is not fixed at x=0 ?

    ReplyDelete
  3. I was recommended this web site by means of my cousin. I am now not certain whether this post is written through him as nobody else recognise such precise about my difficulty. You're amazing! Thank you!
    python training in velachery | python training institute in chennai

    ReplyDelete
  4. I really appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thx again!
    Java training in Chennai | Java training in Bangalore

    Java online training | Java training in Pune

    ReplyDelete
  5. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    Data Science course in Chennai | Data science course in bangalore

    Data science course in pune | Data science online course

    Data Science Interview questions and answers

    ReplyDelete
  6. I feel happy about and learning more about this topic. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. the information which you have provided is better then other blog.
    Best IELTS training centre in Dwarka

    ReplyDelete
  7. Naturally, analytics isn't difficult to adapt yet the more unique and complex ideas do request additional time and exertion from understudies, than other math themes. step-by-step solution

    ReplyDelete




  8. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
    software Testing Training |Best Software Training Institute in Chennai



    ReplyDelete
  9. Appreciate the work you have done to learn on pl sql training

    ReplyDelete
  10. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
    cloud computing training in chennai | Cloud computing training class in chennai

    ReplyDelete
  11. Clinical sas training in chennai | SAS Training course chennai
    I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.

    ReplyDelete
  12. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    Best PHP Training Institute in Chennai|PHP Course in chennai
    Best .Net Training Institute in Chennai
    Dotnet Training in Chennai
    Dotnet Training in Chennai

    ReplyDelete
  13. Great efforts put to publish these kinds of articles that are very useful to know. I’m thoroughly enjoying your blog. And Good comments create great relations. You’re doing an excellent job. Keep it up.

    Magento Development Training Course in Chennai Zuan Education

    Selenium Training Course in Chennai Zuan Education

    ReplyDelete
  14. Cool stuff you have and you keep overhaul every one of us

    pmp course


    ReplyDelete
  15. I feel happy about & learning more about this blog. Keep sharing your information regularly for my future reference. This content creates a new hope and inspiration within me. Thanks for sharing a blog like this. The information which you have provided is better than another blog. Mobile app development company UK.

    ReplyDelete
  16. Study Business Analytics Course with ExcelR where you get a great experience and better knowledge.
     Business Analytics Course

    ReplyDelete
  17. Digital marketing is the processes through which you can make your company stand out from the crowd. As we are the Best Digital Marketing Company in Noida. We give SEO service to rank over hundred competitive websites. We focus on a few strategies to grow your business discussed as below:

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. You actually make it look so easy with your performance but I find this matter to be actually something which I think I would never comprehend. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I’ll try to get the hang of it!

    Data Science Course

    ReplyDelete

  21. Thanks of sharing this post…Python is the fastest growing language that helps to get your dream job in a developing area. It says every fundamental in a programming, so if you want to become an expertise in python get some training





    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery





    ReplyDelete
  22. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.
    data science course
    data science course in hyderabad

    ReplyDelete
  23. Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.

    Data Science Training

    ReplyDelete
  24. Thank you very much for sharing such a useful article. Will definitely saved and revisit your site
    Best Data Science Courses in Bangalore

    ReplyDelete
  25. I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You.
    Data Science Course in Bangalore

    ReplyDelete
  26. I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,..
    Data Science Training in Bangalore

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete
  28. Nice blog for Python programmer. python is now in demand programming language.
    Data Science Course in Hyderabad

    ReplyDelete
  29. Great information on programming for beginners thank you for sharing.
    Data Analytics Training 360DigiTMG

    ReplyDelete
  30. Mindblowing blog appreciating your endless efforts in developing a truly transparent content. Which probably the best one to come across disclosing the content which people might not aware of it. Thanks for bringing out the amazing content and keep sharing more further.

    360DigiTMG PMP Certification Course

    ReplyDelete
  31. Impressive blog to be honest definitely this post will inspire many more upcoming aspirants. Eventually, this makes the participants to experience and innovate themselves through knowledge wise by visiting this kind of a blog. Once again excellent job keep inspiring with your cool stuff.

    Artificial Intelligence training in bhilai

    ReplyDelete
  32. Honestly speaking this blog is absolutely amazing in learning the subject that is building up the knowledge of every individual and enlarging to develop the skills which can be applied in to practical one. Finally, thanking the blogger to launch more further too.

    Data Science Certification in Bhilai

    ReplyDelete
  33. I found a great article here.I are certain to become straight back. I only added your website on my own bookmark websites. thanks. Quality articles could be your vital to encourage the traffic to see the internet page, so which is exactly what this internet site is currently providing.Learn Tableau Course in Bangalore 360DigiTMG

    ReplyDelete
  34. I don't have time to read your entire site right now, but I have bookmarked it and added your RSS feeds as well. I'll be back in a day or two. Thank you for this excellent site.

    Data Analytics Course in Bangalore

    ReplyDelete
  35. Great article with valuable information found very resourceful and enjoyed reading it waiting for next blog update thanks for sharing.
    Ethical Hacking Course in Bangalore

    ReplyDelete
  36. This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea.
    data science courses

    ReplyDelete
  37. Thank you for your information. I have got some important suggestions from it. Keep on sharing. Very informative blog. Helps to gain knowledge about new concepts and techniques.
    DevOps Training in Chennai

    DevOps Course in Chennai

    ReplyDelete

  38. If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries

    Best Institutes For Digital Marketing in Hyderabad

    ReplyDelete
  39. We have appreciated your valuable information. Visit OGEN Infosystem for professional Website Designing and PPC Services at an affordable price.
    Website Designing Company in Delhi

    ReplyDelete
  40. I am a new user of this site so here i saw multiple articles and posts posted by this site,I curious more interest in some of them hope you will give more information on this topics in your next articles.

    Data Science Course in Mangalore

    ReplyDelete
  41. cool stuff you have and you keep overhaul every one of us

    Data Science Course in Mysuru

    ReplyDelete
  42. I see some amazingly important and kept up to length of your strength searching for in your on the site
    Best Data Science Courses in Hyderabad

    ReplyDelete
  43. What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.

    Data Science Course in Trichy

    ReplyDelete
  44. Tecocraft consist of diverse team of developers with their own specialised professional skills for your web application development.

    ReplyDelete
  45. this blog was really great, never seen a great blog like this before. i think im gonna share this to my friends..

    Data Analytics Courses in Bangalore

    ReplyDelete
  46. Very interesting blog. A lot of the blogs I see these days don't provide anything that interests me, but I'm really interested in this one. I just thought I would post and let you know.
    Data Science In Bangalore

    ReplyDelete
  47. I recently found a lot of useful information on your website, especially on this blog page. Among the many comments on your articles. Thanks for sharing.
    Data Science Course in Pune

    ReplyDelete
  48. I feel appreciative that I browse this. it's helpful and intensely academic and that i actually took in an exceedingly ton from it.
    data scientist certification

    ReplyDelete
  49. You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.
    Data Science Institute in Bangalore

    ReplyDelete
  50. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
    <a href="https://360digitmg.com/india/artificial-intelligence-ai-and-deep-learning-in-pune
    >artificial intelligence course in pune</a>

    ReplyDelete
  51. Iam so thrilled because of finding your alluring website here.Actually i was searching for Manage Web Hosting & C-Panel.Your blog is so astounding and informative too..Iam very happy to find such a creative blog. Iam also find another one by mistake while am searching the same topicMobile Marketing.Thank you soo much.

    ReplyDelete
  52. Hi, I looked at most of your posts. This article is probably where I got the most useful information for my research. Thanks for posting, we can find out more about this. Do you know of any other websites on this topic?

    https://360digitmg.com/india/data-science-using-python-and-r-programming-pune

    ReplyDelete
  53. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support in this area. same as your blog i found another one Mobile Marketing .Actually I was looking for the same information on internet for Mobile Marketing and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.

    ReplyDelete
  54. Many businesses which are hoping to increase their online presence are hiring an SEO company or using SEO services well to gain every single benefit while achieving their goals. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
    Our Motive is not just to create links but to get them indexed as will
    Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
    High Quality Backlink Building Service
    1000 Backlink at cheapest
    50 Free Backlink
    Although attempting to learn SEO yourself is a good idea as well as a tempting one, there are high chances you might implement SEO techniques wrongly because they need months and years of experience.

    ReplyDelete

  55. Very awesome!!! When I searched for this I found this website at the top of all blogs in search engines.

    business analytics course


    ReplyDelete
  56. You actually make it seem like it's really easy with your acting, but I think it's something I think I would never understand. I find that too complicated and extremely broad. I look forward to your next message. I'll try to figure it out!

    Best Data Science Courses in Bangalore

    ReplyDelete

  57. I think I have never seen such blogs before that have completed things with all the details which I want. So kindly update this ever for us.

    business analytics course

    ReplyDelete
  58. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well..
    data scientist training and placement in hyderabad

    ReplyDelete

  59. Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us.

    Best Data Science courses in Hyderabad

    ReplyDelete
  60. This is a really very nice post you shared, I like the post, thanks for sharing...

    business analytics course

    ReplyDelete
  61. I want to post a remark that "The substance of your post is amazing" Great work.
    data scientist course in hyderabad

    ReplyDelete
  62. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.


    best data science institute in hyderabad

    ReplyDelete
  63. This is an excellent post . thanks for sharing it. It is really what I wanted to see. I hope in the future you will continue to share such an excellent post.
    business analytics course

    ReplyDelete
  64. It's really nice and meaningful. it's a really cool blog.you have really helped lots of people who visit blogs and provide them useful information
    digital marketing courses in hyderabad with placement

    ReplyDelete
  65. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    Best Data Science courses in Hyderabad

    ReplyDelete
  66. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.
    data scientist training in hyderabad

    ReplyDelete
  67. I am very happy to have seen your website and hope you have so many entertaining times reading here. Thanks again for all the details.

    Best Data Science Courses in Bangalore

    ReplyDelete
  68. I am genuinely thankful to the holder of this web page who has shared this wonderful paragraph at at this place
    best data science institute in hyderabad

    ReplyDelete
  69. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    business analytics course

    ReplyDelete
  70. Excellent information Providing by your Article, thank you for taking the time to share with us such a nice article. Amazing insight you have on this, it's nice to find a website that details so much information about different artists...

    DevOps Training in Hyderabad

    ReplyDelete
  71. Actually your blog is very interesting; it contains extraordinary and remarkable data. I appreciated visiting your blog…

    Data Science Training in Hyderabad

    ReplyDelete
  72. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
    data science training

    ReplyDelete
  73. What a really awesome post this is. Truly, one of the best posts I've ever witnessed in my whole life. Wow, just keep it up.
    data science course

    ReplyDelete
  74. Your website is really cool and this is a great inspiring article.
    data science course in malaysia

    ReplyDelete
  75. Phenomenal post! The methodology you have posted on this innovation assisted me with getting into a higher level and had part of Information…

    AI Training in Hyderabad

    ReplyDelete
  76. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.
    Best Data Science Courses in Bangalore

    ReplyDelete
  77. It is extremely nice to see the greatest details presented in an easy and understanding manner.
    data scientist course

    ReplyDelete
  78. Join the Python Course in Hyderabad and participate in free workshops with AI Patasala. Candidates can pursue their dreams and reach the highest level in the field.
    Online Python Course in Hyderabad

    ReplyDelete
  79. I want to say thanks to you. I have bookmark your site for future updates.
    data scientist course

    ReplyDelete
  80. Actually I read it yesterday but I had some ideas about it and today I wanted to read it again because it is so well written.
    Data Analytics Course in Jaipur

    ReplyDelete
  81. Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.

    Cyber Security Training in Bangalore

    ReplyDelete
  82. I am delighted to discover this page. I must thank you for the time you devoted to this particularly fantastic reading !! I really liked each part very much and also bookmarked you to see new information on your site.

    Artificial Intelligence Course in Bangalore

    ReplyDelete
  83. Actually, I was browsing the internet for information and found your blog. I am impressed with the information you have on this blog.
    Data Science Course Fees

    ReplyDelete
  84. Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts
    data science course

    ReplyDelete

  85. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!data science in nagpur


    ReplyDelete
  86. Now is the perfect time to plan for the future and now is the time to be happy. I have read this article and if I can I would like to suggest some cool tips or advice. Perhaps you could write future articles that reference this article. I want to know more!data science institute in nagpur

    ReplyDelete
  87. Very good message. I came across your blog and wanted to tell you that I really enjoyed reading your articles.

    Data Analytics Course in Kolkata

    ReplyDelete
  88. Amazingly by and large very interesting post. I was looking for such an information and thoroughly enjoyed examining this one. Keep posting. An obligation of appreciation is all together for sharing.data science training in kolhapur

    ReplyDelete
  89. Impressive. Your story always bring hope and new energy. Keep up the good work. Business Analytics Course in Chennai

    ReplyDelete
  90. This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,
    data analytics training in hyderabad

    ReplyDelete
  91. Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks
    full stack developer course

    ReplyDelete
  92. Very informative Blog! There is so much information here that can help thank you for sharing.
    Data Science Training in Chandigarh

    ReplyDelete
  93. I'm always looking online for articles that can help me. I think you also made some good comments on the functions. Keep up the good work!

    Data Scientist Course in Bangalore

    ReplyDelete
  94. This post is so interactive and informative.keep update more information...
    Tally Course in Tambaram
    Tally course in Chennai

    ReplyDelete
  95. Very informative message! There is so much information here that can help any business start a successful social media campaign!

    Data Science Training in Kolkata

    ReplyDelete
  96. I am a new user of this site so here i saw multiple articles and posts posted by this site,I curious more interest in some of them hope you will give more information on this topics in your next articles.

    ReplyDelete
  97. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one.
    data scientist training in malaysia

    ReplyDelete
  98. Hi, I am John Smith I am Web Developer, It is an amazing blog thanks for the sharing the blog. Frantic infotech provide the react native android app development such as an information about software development for costumer service. Frantic infotech also provide the ionic app development company. The development of advanced web applications is Orient Software’s specialty and we will successfully fulfill all your web application development requirements, from small-sized to wider-ranged projects.

    ReplyDelete
  99. The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download Now

    >>>>> Download Full

    The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download LINK

    >>>>> Download Now

    The Beginner Programmer: The Heat Equation: A Python Implementation >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  100. I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.
    data science course in hyderabad

    ReplyDelete
  101. This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,v
    data scientist course in malaysia

    ReplyDelete
  102. Its content is brilliant in many ways. I think it is an attractive and revealing material. Thank you very much for caring about your content and your readers.

    Business Analytics Course in Ernakulam

    ReplyDelete
  103. I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts.data science course in Nagpur

    ReplyDelete
  104. Our Data Science certification training with a unique curriculum and methodology helps you to get placed in top-notch companies. Avail all the benefits and become a champion.
    data analytics course in nashik

    ReplyDelete
  105. The experts then take this data to transform it into a form that can predict some solution or prove helpful in making sound decisions.

    ReplyDelete
  106. Developers nowadays have to build a proper understanding of data analysis tools to get a job in an organization.
    data science training in bhubaneswar

    ReplyDelete
  107. 360DigiTMG is the best Data Science training institute with placement assistance. To know about the course fee details, click the link below:data science course in roorkee

    ReplyDelete
  108. Data science is transforming the world day by day. The organizations are hiring people who have the skills required to become data scientists.

    ReplyDelete
  109. The data scientists work on the raw data to take the right insights from it for making better decisions to make the business more prosperous.

    data science training in patna

    ReplyDelete
  110. This comment has been removed by the author.

    ReplyDelete
  111. This comment has been removed by the author.

    ReplyDelete
  112. I would like to thank you for your valuable time to spentand writing the excellent article. I got more information from this blog.
    divorce in virginia
    Virginia Sex Crimes Lawyer
    virginia reckless driving

    ReplyDelete
  113. very honest and well written post. I really appreciate your hard work thanks for sharing such a nice post.
    Please
    Solar System Installation Services in India

    ReplyDelete
  114. Thanks dear for such amazing blog sharing with us. Visit our page to get the best bulk email marketing services in India.
    Outbound SMTP Server

    ReplyDelete
  115. All the latest technologies have become so much popular and Education website like 360DigiTMG website visit below website link…. 360DigiTMG is considered as the leading pioneer in customer, corporate, and online training. Our training professionals impart the best of training experiences with detailed theoretical knowledge and real-time projects, so much so that our students excel in their careers. We provide job assistance in terms of resume preparation and interview etiquettes.data science course institute in nagpur

    ReplyDelete
  116. Nice Article. It was Really Helpful to me Thanks for Sharing
    CMA Colleges in Hyderabad

    ReplyDelete

  117. Your blog is fantastic! Thank you for sharing such wonderful content that is very useful to us. I have learned a lot of new information, and the way you explained it clearly is amazing. Please continue to post more useful information.

    Best Colleges in Hyderabad for BBA

    ReplyDelete
  118. I am grateful for your willingness to share your thoughts. Your efforts are truly appreciated and I look forward to reading more from you. Thank you again.

    CMA institute Hyderabad

    ReplyDelete
  119. Your blog is excellent and captivating. Please continue to share more informative posts like this. It was very helpful. Thank you for sharing. Check out my website.

    Best Junior Colleges in Hyderabad for MEC

    ReplyDelete
  120. amazing write , keep posting and if you are intresting in big data coder and code developer then checkout python classes in satara

    ReplyDelete
  121. É bom, me ajudou muito, porém tenho que lembrar que felinos não é só gato. Vi que você retrat강원도ou sobre outros animais, mas foi bem pouco.. Mesmo assim parabéns!

    ReplyDelete
  122. Thanks! Very interesting to read. This is really very helpful. Data Science Course In Lucknow : Digiperform

    ReplyDelete
  123. Excellent Blog! I would like to thank for the efforts you have made in writing this post.
    testing-tools-training-in-hyderabad

    ReplyDelete
  124. Fantastic Blog! I want to express my gratitude for all of your hard work in creating this post.
    Comment by - Best makeup artist in Jalandhar
    Makeup artist in Jalandhar

    ReplyDelete
  125. ITIO Innovex specializes in cryptocurrency exchange development , delivering secure, scalable, and user-friendly platforms. Our solutions offer seamless trading, high liquidity, and advanced security features, empowering users to trade digital assets with confidence. Join us in shaping the future of digital finance.

    ReplyDelete