My idea here is to represent temperature in a plane circle divided in polar coordinates (grid) using colours, as the plot axis will only show the geometry dimensions.
That's what I have so far.
[R,THETA] = meshgrid(linspace(0,r,nr),linspace(0,theta,ntheta)*(pi/180));
[X,Y] = pol2cart(THETA,R);
contourf(X,Y,T,10);
The main issues here are that awful line and the absence of the theta grid.
And that's the kind of grid that I'm looking for, but inside of a single plane.
The code:
r = 0.05; % Radius (m)
dr = 0.0025; % Element Size R (m)
nr = r/dr+1; % Number of Elements R
rc = (nr-1)/2+1; % Central Element R
theta = 360; % Degrees (°)
dtheta = 5; % Elezement Size Theta (°)
ntheta = theta/dtheta+1; % Number of Elements Theta
[R,THETA] = meshgrid(linspace(0,r,nr),linspace(0,theta,ntheta)*(pi/180));
[X,Y] = pol2cart(THETA,R);
T1 = 10;
T2 = 50;
dT = T2-T1; % dTemperature
for i = 1:73
T(i,:) = T1:dT/(nr-1):T2; % Temperatura Distribution
%T(i,:) = T(i,:) * i*0.5;
end
contourf(X,Y,T,10);
Thank you in advance.