I want know if there is a way to solve the PDE for diffusion in a cylinder with 0.3 metre radius and 1.6 metre height. I am trying to create a cylindrical coordinate with this code.
%cylinder
% n = linspace(-pi,pi,30);
% m = linspace(0,1.6,20);
% [theta,z] = meshgrid(n,m);
% r = 1 .* cos(theta);
% [X,Y,Z] = pol2cart(theta,r,z);
% surf(X,Y,Z)
% axis equal
But this one I can't define the radius.
This is the equation that I have to work with (Unsteady state - 3d). I got the code for only 2d with plain but I cant work with 3D cylindrical coordinate. I would like to work with with the discretization of partial differential equations. How I can solve this problem with Matlab? Thank you