I need Help with this MatLab coding Problem The solution of transient heat condu
ID: 2996210 • Letter: I
Question
I need Help with this MatLab coding Problem
The solution of transient heat conduction in a plane wall is given by the series Where theta is the dimensionless temperature, x is the dimensionless time and x/L is the distance from the center. Each term in the series depends on the value of lambdan, which are positive roots of the equation lambda n tan lambda n = Bi Bi is the Biot number. Create a function for calculating each term in the series, based on input values of An, r, and x/L. The output of the function will be the corresponding values of dimensionless temperature theta n. For Bi=7, find the first 6 roots of the equation to determine values of lambda 1, lambda 2, ...etc. up to lambda 6. (Use the appropriate form of the fzero command.) Call your function with each value of An, and values of r= 0.04, and x/L = 0, 0.1, 0.2, 0.3,... up to 1.0, to calculate the contributions of each term in the series to 0 i.e., use to get the lsl term, An to get the 2nd term, etc. How many terms are required for an accuracy of 10 -4? Tabulate your results of 0n versus x/L. Sum the theta n to yield the final result of theta versus x/L.Explanation / Answer
You say that you want the first 6 roots. That part is not exactly clear to me. First 6 roots starting from which point ? If you want, I can provide you the graph of the function.
1.) Code of the function:
function [ theta_n ] = series( lambda_n,tau,x_by_L )
theta_n = (4*sin(lambda_n) / (2*lambda_n + sin(2*lambda_n)) )*(exp((-lambda_n^2)*tau))*cos(lambda_n*x_by_L);
end
2.) Code for finding the roots lambda_n:
First, save the following code in a file named f.m:
function y = f(lambda_n)
y = lambda_n*tan(lambda_n) - 7;
Next, Run the following code with different values of x0 to find different roots of the equation using fzero:
fun = @f;
x0 = 1; % initial point
z = fzero(fun,x0)
3.) Code for finding the sum of the terms in the series:
theta=0;
for i=1:n
theta = theta + series(lambda_n,tau,x_by_L);
end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.