solving 1D heat equation with constant heat flux (boundary condition)

31 Ansichten (letzte 30 Tage)
Hello everyone, i am trying to solve the 1-dimensional heat equation under the boundary condition of a constant heat flux (unequal zero). The heat flux is on the left and on the right bound and is representing the heat input into the material through convective heat transfer. I am using pdepe to solve the heat equation and with dirichlet boundary conditions it is working. To represent the heat flux i was thinking of a Neumann boundary condition, but i can't figure out how to contribute the value of the heat flux into the boundary condition. For a heat flux of zero (isolation) the code would look like this (leaving out the declaration of the parameters):
function u0=IC(x)
u0=T_0;
end
function [pl,ql,pr,qr]=BC(xl,ul,xr,ur,t)
ql=1;
pl=0;
qr=1;
pr=0;
end
function [c,f,s]=DGL(x,t,u,DuDx)
c=1;
f=a*DuDx;
s=0;
end
% solution
x=linspace(0,L,10);
t=linspace(0,t_End,10);
sol=pdepe(m,@PDE,@IC,@BC,x,t);
u=sol(:,:,1);
uu=sol(end,:,1);
end
Now the heat flux being unequal zero, my idea was to modify pl and pr in dependence of the heat flux density, but i can't find a connection. Has anyone an idea?
Regards, Malte

Akzeptierte Antwort

Torsten
Torsten am 25 Aug. 2016
What is the boundary condition you are trying to implement ?
lambda*dT/dn = alpha*(T-T_ext) (n: outer normal) ?
Best wishes
Torsten.
  2 Kommentare
MalteSe
MalteSe am 25 Aug. 2016
Bearbeitet: MalteSe am 25 Aug. 2016
Yes i think that is the boundary condition i am trying to implement. At first i thought, that it would be something like:
alpha*(T-T_ext)=rho*c_p*dT/dt*dx
As the heat transfer causes the material to heat up, but i couldn't solve that equation due to the dt.
With your equation i get:
q=1 and p= -alpha*(T-T_ext)/(rho*c_p)
which gives me feasible results when comparing heat transfer with the "heating up" of the material, so thanks a lot for your answer!
But why is the equation i tried to implement wrong? Because technically the process at the border is heat transfer rather than heat conduction...
Cheers, Malte
Torsten
Torsten am 26 Aug. 2016
Bearbeitet: Torsten am 26 Aug. 2016
q = 1, p = -alpha*(T-T_ext) at the left boundary
q = 1, p = alpha*(T-T_ext) at the right boundary.
if in DGL, you set
f = lambda*DuDx;
c = rho*cp;
s = 0;
Best wishes
Torsten.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by