kill(all)$

maxima :appendix modified TRAM ODE-BVP problem ,version 1.
peter.vlasschaert@gmail.com,18/11/2020

load(lrats)$

TRAM : (T)ubular (R)eactor with ( A)xial (M)ixing
ODE   : (O)rdinary (D)ifferential (E)quations

1e) ODE : isothermal TRAM equation .BVP ( = Boundary Value Problem)
========================================================
y    = concentration
Pe = peclet number
Da = Damkohler number
----------------------------------------------------------------------------------------------------

p1:1/Pe*'diff(y,x,2)-'diff(y,x)-Da*y^2 =0;

→ BC1: @ x=0

p1a:'diff(y,x) = -Pe*(y-1);

→ BC2: @ x=1

p1b:'diff(y,x) = 0;

How to get modified TRAM problem
---------------------------------------------------

→ 1e) select  new variable . 'z'

p2a:z=1-x;

→ 2e) find  dy/dz

depends(y,z);

p2b1:'diff(y,x) = 'diff(y,z)*'diff(z,x);

p2b2:lhs(p2b1)=at('diff(z,x)*'diff(y,z),p2a);

p2b3:lhs(p2b1)=ev(rhs(p2b2),nouns);

p2b4:lhs(p2b1)=part(rhs(p2b3),0)*part(rhs(p2b3),1,1);

p2b4a: q = rhs(p2b4);

rem : sign before expression can be found , part(expression,0)

→ 3e) find  'diff(y,x,2) =d(dy/dx)/dx.

p2c1: 'diff(y,x,2) = at('diff(q,z)*'diff(z,x),p2a);

p2c2:lhs(p2c1)=lratsubst([p2b4a],rhs(p2c1));

p2c3:lhs(p2c1)=ev(rhs(p2c2),diff);

→ 4e) ODE p1 ( z =  variable)

p2d:[p2b4,p2c3];

p2d1:lratsubst(p2d,p1);

p2d2:expand(ratsimp(p2d1));

→ 5e) BC 

→ BC1: @ x=0  ,  need , ' z value '

p2e1a:subst([x=0],p2a);

p2e1a1:(lratsubst([p2b4],p1a));

→ BC1: @ x=1  ,  need , ' z value '

p2e1b:subst([x=1],p2a);

p2e1b1:(lratsubst([p2b4],p1b));

2e) ODE : modified isothermal TRAM equation .BVP ( = Boundary Value Problem)
===============================================================
use : z =x

p3:subst([z=x],p2d2);

→ BC1: @z=0

p3a:lratsubst([z=x],p2e1b1);

→ BC2: @ z=1

p3b:factorsum(lratsubst([z=x],p2e1a1));

problem 6.23 use : {p3,p3a,p3b}, see website: problem 
→  Pe = 6,Da = 2