radial heat transfer equation

Hi,
I solved a radial heat generation problem. I would like to plot for different value of k_u and q_dot from center to the wall. This is my code, and any feedback would be greatly appreciated.
clear
close all
q_dot = linspace(3000,5000,10);
r = linspace(0.000000001,0.01,50);
k_u = linspace(1000,5000,10);
T =@(r,q_dot,k_u) ( - (q_dot/ (4*k_u))* r.^2 + (100/k_u)* log(r) + 2000 );
for i = 1:length(q_dot)
for j = 1:length(k_u)
for k = 1:length(r)
T_sol(i,j,k) = T(r(k),q_dot(i),k_u(j));
end
end
end
plot(T(1,1,:), r)

7 Comments

How do you want to see the result? What about slice?
This image just an image from my textbook to give a reference. I am looking at one slice. i am trying to see the temperature distribution from 0 to r. someone told me i should not use 3-D loops. but i could not figure out how. I am looking at one sile of the cylinder.
i will have different graph for different k_u or q_dot. I just want to be sure that I am doing the right thing.
You have 3 independent variables (r,q_dot,k_u) and 1 dependent variable
It's 4D data. This is how i see 4D data (temperature is color)
Can you explain more?
what i am trying to practice in matlab, like in this function, if i have a function depends on 5 different variables, or 3 in our case, I want to be able to see if how my function is changing depending on one of the variable. As I said, i am trying to learn how i can loop this functions, store the data, and visualize them.
This is just one example.
Thank you
I will later work on velocity function depending on density, temperature etc. If i can understand how his type of structures work, I think I can figure out the rest.
Look also into isosurface
i will work on more but this isosurface did not work. i am not looking for isosurfaces. thanks for your help though.

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 19 Mar 2020

Commented:

on 19 Mar 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!