kill(all)$

maxima : fvm: 1D, (Pe)clet number and graph (from exact equation) (Γ=cts),version 1.0
peter.vlasschaert@gmail.com,07/11/2022

load packages,option.
--------------------------

load(lrats)$ ratprint:false$

ref : see website
maxima : fvm: 1D, (Pe)clet number and exact solution difusion+convection (Γ=cts),version 1.0
peter.vlasschaert@gmail.com,18/10/2022
----------------------------------------------------------------------------------------------------------------------------
use :p2b

p1:(Φ(x)-Φ(0))/(Φ(L)-Φ(0))=(%e^((Pe(L)*x)/L)-1)/(%e^Pe(L)-1);

p1a:lhs(p1);

p1b:subst([Pe(L)=Pe],p1);

1e) Pe(L) = 0 , rhs = 0/0
-------------------------------

method 1: limit
-------------

p2:limit(p1b,Pe,0) = limit(rhs(p1b),Pe,0); 

p2aa:rhs(p2);

method 2: taylor
-------------

p2a:lhs(p1b)=expand(rhs(p1b));

p2a1:lhs(p2a);

taylor expansion (small Pe,order : 1,p2b1)

p2b:num(part(rhs(p2a),1));

p2b1:p2b =(taylor(p2b,Pe,0,1));

;p2c:limit(lhs(p2))=subst([p2b1],rhs(p2a));

2e) Pe(L) = inf = ∞
---------------------------

assume(L>0,x<L,x/L>0);

p3::limit(p1b,Pe,∞) = limit(rhs(p1b),Pe,∞); 

2e) Pe(L) = -inf =- ∞
---------------------------

p3:limit(p1b,Pe,-∞) = limit(rhs(p1b),Pe,-inf); 

graph :  function
-----------------------

Pe : -100,-0.5 ,x/L,,5,+100

p4:[ -100,-0.5 ,0.5,100];

p4a:makelist(lratsubst([L=1,Pe =p4[i]],rhs(p2a)),i,1,length(p4));

p4b:flatten([p4a,subst([L=1],p2aa)]);

wxplot2d(p4b,[x,0,1])$

explain : see above computations.