Analytical solution of 1-D transient heat transfer
47 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1404334/image.png)
4 个评论
Torsten
2023-6-11
编辑:Torsten
2023-6-11
- 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).
回答(1 个)
Nipun
2023-12-29
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Thermal Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!