Borrar filtros
Borrar filtros

Pdepe- Spacial Discretization has failed. Trying to solve a heat transfer equation and I'm confused on how to definte the boundary conditions for my case

3 visualizaciones (últimos 30 días)
Hello,
I'm trying to solve a heat transfer equation for a heat exchanger modeled as a flat plate which has a constant temperature at one end, with no directly applied heat flux, and I want to get an output graphic of the temperature change through the material over time, and I'm getting the following error:
Error using pdepe
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative.
I was trying to do this with PDEPE but I'm unsure of how to define the boundary conditions for this case.
Please see the below:
L = 0.0155; %15.5mm
global rho cp k q
phi = 0.1;
rho=(phi*2700)+((1-phi)*712); %kg/m^3
cp=(phi*900)+((1-phi)*2200); %J/kg-K
k=(phi*80)+((1-phi)*0.36); %W/m-K
q = 73E3;
x = linspace(0,L,500);
t = linspace(0,200,500);
m = 0;
sol = pdepe(m,@PCMpde,@PCMic,@heatbc,x,t);
figure(1);
colormap hot
imagesc(x,t,sol)
colorbar
xlabel('x')
ylabel('time')
function [c,f,s] = PCMpde(x,t,u,dudx)
global rho cp k
c = rho*cp;
f = k*dudx;
s=0;
end
function u0 = PCMic(x) %Temperature is 'u'
u0 = 22; %Initial Temperature
end
function [pl,ql,pr,qr] = heatbc(xl,ul,xr,ur,t)
global q
pl = 40;
ql = 1;
pr = ur;
qr = 1;
end
I'm unsure if I'm able to do this with the above, as I believe I need to have a definite boundary condition for the temperature at the far end of the heat exchanger, but I thought this would be able to solve for that in the steady state as I don't want to limit the temperature at the distance L.

Respuestas (1)

Torsten
Torsten el 1 de Mayo de 2023
Editada: Torsten el 1 de Mayo de 2023
At the moment, your boundary conditions read
k*dT/dx = -40 at x = 0
k*dT/dx = -T at x = L
I don't think this is what you try to set.
To set the boundary conditions, p and q have to be chosen such that
p + q*f = 0
where f = k*dT/dx in your case.
Choose pl, ql at x = 0 and pr, qr at x = L appropriately.
  2 comentarios
David Argueta
David Argueta el 1 de Mayo de 2023
I'm confused on how I would choose these appropriately for my case, as I'm unsure of what the temperature at x=L would be, however I want to specify that at x=L, my heat flux, q , would be zero as I want to have a sealed/adiabatic end.
I'd like to have an applied temperature of 40 at x=0, while the initial temperature for all oher points would be u0 of 22 at time=0, which lead me to believe that qr should be 0 at x=L.
Would you be able to explain this as I think I've misunderstood how to apply this in the form of p+q*f = 0
Thank you
Torsten
Torsten el 1 de Mayo de 2023
It should be obvious that
pl = ul - 40;
ql = 0;
pr = 0;
qr = 1;
for the boundary conditions you want to set since
(T-40) + 0*k*dT/dx = 0 at x = 0
0 + 1*k*dT/dx = 0 at x = L.

Iniciar sesión para comentar.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by