kill(all)$

heat :boundary conditions (insulated,convection:h,Tinf),example1, final,version 1.0
peter.vlasschaert@gmail.com,09/07/2019

example : flow heat x-direction

When T must be function of x : T(x)
-----------------------------------------------
steady state : independent of time.

depends(T,x);

dependencies;

p1:ev(1/r^n*diff(r^n*diff(T,r),r) +g(r)/k= 0,r=x,n=0);

example 1
given : volumetric heat generation g(x) = a*x+b,
lin a wall with tickness Lwhile rhs wall dissipates
heat by convection into ambient air Tinf.Lhs wall
insulated.
k,a,b = constant
=====================================
rem :  + direction flow (ic,bc)
flow : lhs inside    the wall
          rhs outside the wall

solution:

mathematical formulation of the problem.

1e) boundary condition : lhs   (x=0)
------------------------------------------------

bc: lhs insulated :  dT/dx (x=0)

p2a:diff(T,x) =0;

2e) boundary condition : rhs   (x=L)
------------------------------------------------

bc:rhs: h: heat transfer coef,given T ambient air = Tinf

p2b:-k*diff(T,x) = h*(T-Tinf);

3e) heat generation in the wall g(x)
-----------------------------------------------

g(x) = a*x+b

p1a:subst([g(x) =a*x+b],p1);

4e)  use ode2 to solve  ode2
---------------------------------------

p3:ode2(p1a,T,x);

find : %k1,%k2
===========

dT/dx : ?
------------

p3a:diff(p3,x);

use :1e :  x=0, dT/dx=0
--------------------------------
rem : subst doesn't work

p3b:[ x=0,diff(T,x)=0];
p3b1:ev(p3a,p3b);

find : %k2
--------------

p3b2:solve(p3b1,%k2);

result : T  (use 1e bc)
-----------

p4:subst(p3b2,p3);

result : dT/dx (use 1e bc)
-----------------

p4a: subst(p3b2,p3a);

find: %k1
------------

use :1e :  x=L, -k*diff(T,x) = h*(T-Tinf)
---------------------------------------------------

p5:-k*subst([x=L],rhs(p4a))=h*(subst([x=L],rhs(p4))-Tinf);

p5a:solve(p5,%k1);

temperature distribution (use 'p4') , T = T(x)
==================

p5b:subst(p5a,p4);

ode : (a*x+b)/k+'diff(T,x,2)=0       0 < x < L

BC :
===========================
'diff(T,x,1)=0                            @x=0
-k*diff(T,x) = h*(T-Tinf)            @x=L
===========================

p5c:ratsimp(p5b);