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

8 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Bill Greene
Bill Greene am 23 Apr. 2016
Bearbeitet: Bill Greene am 23 Apr. 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 Kommentare
JAMES KARUGU
JAMES KARUGU am 23 Apr. 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 am 23 Apr. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Krishnaraj Sambath
Krishnaraj Sambath am 7 Okt. 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