pdepe solver for spherical coordinates

I am using the heat conduction equation for solid which has the source term to enter the code in Matlab. But even changing any values of s the plot is not chnaging atall. What could be the problem?

6 comentarios

Torsten
Torsten el 28 de Mzo. de 2023
We don't know since we don't know the code you are using.
John D'Errico
John D'Errico el 28 de Mzo. de 2023
Probable user error. A mistake you made in either running or writing the code.
Think about it. Read your question, as if you were yourself trying to provide help. We are expected to know what you did wrong, based only on being told that when you change the value of s, nothing happens. What is s? Now think about how we should know the answer to your question from that little information.
Seriously. Do you want a better answer? You need to provide more information. You might show the code you wrote, and hope someone will be willing to dive into it. If you do that, then you also need to show the actual equations you are trying to solve, so that same person might be able to verify if you implemented them properly.
Ishani Prachchhak
Ishani Prachchhak el 28 de Mzo. de 2023
m=0; %for spherical symmetry
egen=1.234e19;%Energy absorbed per unit volume(W/m^3)
k=5.9;%(W/m.K)
Tinfi=296;
x=linspace(0,15e-9,20); %m
t= linspace(0,1e-10,20);
%x=r u=T
sol=pdepe(m,@pdefun,@pdeic,@bc,x,t);
u=sol(:,:,1);
surf(x,t,u);
xlabel('r');
ylabel('t');
function [c,f,s]= pdefun(x,t,u,dudx);
alpha=7.9e-9;%(m^2)/s
egen=1.12157e-05;
k=5.9;%(W/m.K)
c=1/alpha;
f=(dudx)*x^-2;
s=egen/k;
end
function T0=pdeic(x)
T0=296;
end
function [pl,ql,pr,qr]= bc(xl,ul,xr,ur,t)
k=5.9;%(W/m.K)thermal conductivity
x=15e-9;
A=4*3.14*(x)^2;%Area
pl= 0;
ql= 1;
pr=1.234e19;
qr=-2*k;
end
Ishani Prachchhak
Ishani Prachchhak el 28 de Mzo. de 2023
Ishani Prachchhak
Ishani Prachchhak el 28 de Mzo. de 2023
I am trying to solve for constant conductivity equation using pdepe.
Torsten
Torsten el 28 de Mzo. de 2023
Editada: Torsten el 28 de Mzo. de 2023
You set up the following problem:
1/alpha * du/dt = d/dx ( 1/x^2 * du/dx) + egen/k
u(t=0) = 296
1/x^2 * du/dx = 0 at x=0
1.234e19 - 2*5.9/x^2 * du/dx = 0 at x = 15e-9.
Is this really what you try to solve ?
If not: please include equation, initial and boundary conditions.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Preguntada:

el 28 de Mzo. de 2023

Editada:

el 28 de Mzo. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by