Analytical solution of 1-D transient heat transfer
    41 views (last 30 days)
  
       Show older comments
    
Can you please help me code the analytical solution equation for 1D transient heart transfer to get the temperature profile? I need to include multiple terms, I suppose it need "for loop" but I'm not familiar how to code loops or sereies.

4 Comments
  Torsten
      
      
 on 11 Jun 2023
				
      Edited: Torsten
      
      
 on 11 Jun 2023
  
			- Plot the function f(x) = x*J1(x)/J0(x) - Bi to get an impression where its zeros are located.
- From the plot, choose good starting guesses to determine the first - say ten - zeros of f using "fzero".
- Compute the array C_n.
- Sum the first - say ten - terms of the series for theta_star for different values of r_star and t.
- Make a surface plot of theta_star over r_star and t (or whatever you want to plot).
Answers (1)
  Nipun
      
 on 29 Dec 2023
        Hi Nour,
I understand that you are trying to code the analytical solution equation for 1D transient heart transfer to get the temperature in profile in MATLAB.
Based on the provided system of equations, I propose the following steps to approach the solution:
Start with getting the roots of the transcendental equations. Plot the function and observe the first n zeroes of the equation
syms x
f(x) = x*J1(x)/J0(x) - Bi
fplot(f(x))
Say the interval of the roots is [a,b] then, use "vpasolve" to obtain the roots in that interval
roots = vpasolve(f(x)==0, x, [a,b])
Based on the array of roots, compute Cn using the relation:
C(i) = (2/x)*(J1(x)/(J1(x)^2 + J0(x)^2)) % where x = roots(i)
% You can also represent it in vector format
Compute the temperature profile using sum
temp_profile = sum(C.* exp(-roots.^2 * F0)* J0(roots*r) ) % vector representation
On increasing the size of roots (by appending more zeroes to the array and increasing the interval [a,b]), the accuracy of "temp_profile" will increase.
Link to documentation:
- symbolic representation : Equation Solving - MATLAB & Simulink - MathWorks India
- fplot in MATLAB : Plot expression or function - MATLAB fplot - MathWorks India
- vpasolve : Solve symbolic equations numerically - MATLAB vpasolve - MathWorks India
Hope this helps.
Regards,
Nipun
0 Comments
See Also
Categories
				Find more on Heat Transfer in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


