How to do integration of this equation and plot graph between T and y
Show older comments

Here
variables are t' and n only
u=0.020;
x=0.025;
y=(0:0.0001:0.010); we have to vary y
z=0;
t=5;
neta= 0.6;
P=200;
C=500;
l=0.008;
Alpha=17e-6;
ro= 1000;
r=sqrt((x-(u*(5-t)))^2+y^2);
Accepted Answer
More Answers (1)
Aayush Meena
on 8 Jul 2021
0 votes
1 Comment
Like so:
u=0.020;
x=0:0.0001:0.050; %%%%%%%%%%%%%
z=0.002; %%%%%%%%%%%%%
t=5;
eta= 0.6;
P=200;
C=500;
ro= 1000;
l=0.008;
Alpha=17e-6;
r = 0.01; % Guessed value as you haven't specified r
k = eta*P/(pi*ro*C*l);
y= 0.005; %(0:0.001:0.010); Arbitrary constant - use your own value
DT = zeros(1,numel(x));
for i = 1:numel(x) %%%%%%%%%% y goes to z
f1 = @(tp) (4*Alpha*(t-tp)+r^2).^-1;
f2 = @(tp) exp(-((x(i) - u*(t-tp)).^2+y.^2).*f1(tp));
DeltaTfn = @(tp) f1(tp).*f2(tp).*(1 + 2*f3(tp,z)); % pass z to function f3
DT(i) = k*integral(DeltaTfn,0,t);
end
plot(x,DT),grid
xlabel('x'), ylabel('\Delta T')
disp(DT(numel(x)))
function s = f3(tp,z) %%%%%%%
t = 5;
Alpha=17e-6;
l=0.008;
s = 0;
nmax = 10; % Adjust this until you get convergence
for n=1:nmax
s=exp(-Alpha*n^2*pi^2*(t-tp)/l^2)*cos(n*pi*z/l) + s; %%%%%%%
end
end
That's pretty much every combination of x, y and z dealt with now!
Categories
Find more on Visualization and Interpretability 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!


