simple : heat conduction (1D), part 1, plane wall,version1
peter.vlasschaert@gmail .com , 14/07/2021

kill(all)$

load packages ,option.
=================

load(lrats)$ ratprint:false$

The plane-wall (thickness = L)
===========

ode : (o)rdinary (d)ifferential (e)quation
-------

p:'diff(T,x,2)=0;

bc :(b)oundary (c)onduction
-----
k :thermal conductivity

→ x = 0  ,(h[1],Tinf1,k)
     h[1]:convective heat transfer.
     Tinf1:hot temperature

bc1:h[1]*(T-Tinf1) - k*'diff(T,x) =0;;/*inner wall :hot */

→ x=L ,(h[2],Tinf2,k)
     h[2]:convective heat transfer.
     Tinf2:cold temperature

rem :Tinf1> Tinf2

bc2:h[2]*(T-Tinf2)-k*'diff(T,x)=0;;/*outer wall cold*/

solve : ode.
=========

→ solution (general )

p1a:ode2(p,T,x);

≥ unknown

p1a1:makelist(listofvars(rhs(p1a))[i],i,1,length(listofvars(rhs(p1a)))-1);;

≥ variable ' one dimension '

p1a2:listofvars(rhs(p1a))[length(listofvars(rhs(p1a)))];

≥ differentation 'p1a' , dT/dx ?

p1b:'diff(T,x)=diff(rhs(p1a),x);

≥ p1a,p1b

p1c: [p1b];

→ solution with bc condition(bc1,bc2) => (bc1a,bc2a)

bc1a:ev(subst(p1c,bc1));

bc1a:subst([p1a],bc1a);

bc1a:subst([x=0],bc1a);

bc2a:ev(subst(p1c,bc2));

bc2a:subst([p1a],bc2a);

bc2a:subst([x=L],bc2a);

≥ [%k1,%k2] ,find from {bc1a,bc2a}

p1d:flatten(solve([bc1a,bc2a],p1a1));

→ final solution:solve ode & solution with bc condition(bc1,bc2) => (bc1a,bc2a)

p1e:subst(p1d,p1a);

p1ea: rhs(p1e);

→ temperature ( x=0,left side wall),outside

p1e1:subst([x=0],p1e);

→ temperature ( x=L,right side wall),inside

p1e2:subst([x=L],p1e);

→ temperature function : to analyse the 'the wall inside'

TT[x]:=''p1ea;

we want to find temperature @ L/2 ,the middle of the wall:

p1f: temperature(L/2) =TT[L/2];

we want heat flux :

p1fa:heatflux = h[1]*(Tinf1-rhs(p1e1));

p1fa1:ratsimp(p1fa);