Skip to content

1D Heat Conduction Equation with custom user input using analytical solutions

License

Notifications You must be signed in to change notification settings

mluckyw/AN_heatcond_1D

Repository files navigation

Introduction

Hello There! I'm A Aerospace/Aeronautical Engineering Students currently diving too much time in MATLAB With further intrest in Java and Phyton.
As this is my first time uploading my works to GitHub, Please do forgive me for doing something wrong.
Further Feedback is welcomed as i dont get one from my proffesor.

Story Behind this Program

Started as a homework for just plotting a general heat equation in MATLAB.
Later turns out to be a user based input calculation of Homogenous 1D Heat Equation Calculations and plotting Using analytical equation.
and yes, i put too much work for this program that probably does not affect my grade so much.

What can this program do

  • Calculating the temperature for one dimensional heat conduction with each end holds at 0 degree celcius with the equation below


  • With input at the command window such as :
    • Rod length
    • Order of Fourier Series
    • Thermal Diffusifity
    • Step of iteration in the rod
    • Initial condition (Polynominal or constant)
    • Time elapsed
  • With Output of :
    • Cn Variable and General Equation of U(x,t) (V2.0)
    • Temperature Distribution across the rod
    • Plotting the Temperature based on order and time categorizations (V2.0)

    Temperature Plotting from V1.0

    Temperature Plotting from V2.0

    Grouping based on Time input

    Grouping based on Order input


What this program does not do (yet)

  • Calculating the temperature for one dimensional heat conduction with each end holds at a different temperature (Non - Homogeneous)
  • Determining The time with a maximum temperature as an input

What's The difference in difference version?

Glad you ask because this code already have two version available (30 June 2021)

  • Version 1.0
    • Computation of The temperature using a single loop for the temperature by using Matlab Integral Fucntion
    • Does not give the equation for Cn and U(x,t)
    • Computation requires long time for 3000 data points at 100 order within +-5 minutes per temperature
    • Computation is limited with one order input and three time elapsed input
    • Plotting only based on a sigle order input
  • Version 2.0
    • Computation of Temperature are splitted into two loops with Cn and U(x,t) separated by using Matlab int function for Cn
    • Displaying equation for Cn and U(x,t) in the command window
    • Computational time is shortened as it does not requiring integration at each loop
    • Computational is unlimited with as much as user input for order count and time elapsed (Though only debugged at max 3 each)
    • Plotting Based on categorization of order and time elapsed

Disclaimer

  • If you are using this code to do a calculation i did not held any responsiblility of any wrong data outputs that may affected you (altough Feedback is very much welcomed)
  • This is copyrighted by using MIT license with the details in the license file

About

1D Heat Conduction Equation with custom user input using analytical solutions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages