Using pdepe for 1d transcient heat conduction through a composite wall

8 visualizaciones (últimos 30 días)
I have four adjacent slabs each modelled by a pde. My problem is how to handle the boundary conditions at the interfaces. I know that the temperature and the first partial derivative are continuous across the perfect interface. I want to know how to define the bcfun function at the interfaces

Respuesta aceptada

Bill Greene
Bill Greene el 23 de Abr. de 2016
Editada: Bill Greene el 23 de Abr. de 2016
You want to model this multi-region wall with a single pde and then write your pde function (pdefun) so that it returns a different flux value (f) and capacitance (c) depending on the slab. You use the input x coordinate to test for the particular slab the coefficients are requested for. Also, as described in the documentation, you want to insure that you have mesh points (xmesh) at the intersection points of the slabs.
Then the BC function is defined to return boundary conditions only at the true boundaries of the wall.
  2 comentarios
JAMES KARUGU
JAMES KARUGU el 23 de Abr. de 2016
Thanks so much Bill. Is this approach okay?
%coefficients
k1 =0.58;
k2 =0.17;
k3 =0.12;
k4 =0.055;
%densities
rho1=1860;
rho2=1920;
rho3=1860;
rho4=2083;
% specific heat capacities
c1=1215;
c2=1170;
c3=1340;
c4=1300;
%defining flux terms
if(x>=0 && x<20)
f = k1/(rho1*c1)* DuDx;
if(x>=20 && x<170)
f = k2/(rho2*c2)* DuDx;
if(x>=170 && x<320)
f = k3/(rho3*c3)* DuDx;
if(x>=320 && x<=470)
f = k4/(rho4*c4)* DuDx;
s = 0;
Bill Greene
Bill Greene el 23 de Abr. de 2016
My response should have said that you want to return both an f and a c depending on the x value. f is ki*DuDx and c is rhoi*ci where i=1,4 in your example. Your test on x is essentially correct but could be done better with an if/else block.

Iniciar sesión para comentar.

Más respuestas (1)

Krishnaraj Sambath
Krishnaraj Sambath el 7 de Oct. de 2016
@James: There's a subtlety to Bill's response. You need to update both c & f as rhoi*Cpi & ki, respectively, and not just f as ki / (rhoi * Cpi) and leaving c as 1 for all layers. Doing it the latter way will impose incorrect conditions at the interfaces.

Community Treasure Hunt

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

Start Hunting!

Translated by