kill(all)$

fluid :simple pipeflow (use shear force),version 1.0
peter.vlasschaert,23/04/2019

load packages 

load(lrats)$

see:'website'
===========
fluid flow gravity (down ,inclined plane),incompressible flow (NS).'version1.0'
definition : shear stress

1e) shear force = force from pressure.
===============================

τ = shear stress = force/area.
what is : shear force
========================
F = shear force
A = area (surface perpendicular to the flow)
====================================
rem :  τ opsit to the direction of u ( u : x -direction)

p1:τ = F/A;
p1a:solve(p1,F)[1];

what is : area
============

A: cylindrical pipe
---------------------------

A: shear area .

p2a:A= 2*π*r*Δx;

what is : force ( = from pressure)
============================

A:circle area=π*r^2

p2b:F = Δp*(π*r^2);

rem : two ends on a pipe
 first        end : p
 second end  :p + Δp
=>  Δp = second end -first end.

result :'1e'
=========

p3:subst([p2a],rhs(p1a)) = rhs(p2b);

find  :  τ
=======
use : 'p3'

p3a:solve(p3,τ)[1];

cilindrical pipe : τ
===============
shear stress.

p4:  τ = Γ*Δu/Δr;

combination 'p3a','p4'.
===================

p4a: rhs(p3a) = rhs(p4);

limit through ,Δx ,Δr => 0

p4b:r/2*'diff(p,x) = Γ*' diff(u,r);

how to find : u
============

p5:lhs(p4b)  - rhs(p4b) = 0;

p5a:ode2(p5,u,r);

how to find : %c
==============

1e)  use BC : u = 0   when  r = R
------------------------------------------------
radius of cylinder =R,use : 'p5a'

p6a:[u=0,r=R];
p6b:subst(p6a,p5a);

2e) solve for %c
-------------------------

p6c:solve(p6b,%c);

how to find : final  u
=================

p6d:subst(p6c,p5a);

p6e:factor(p6d);

rem : profile parabolic 'r'
====================
u = b1*r^2+b2*r+b3

b1=ratcoeff(rhs(p6e),r,2);
b2=ratcoeff(rhs(p6e),r,1);
b3=ev(rhs(p6e),r=0);

limit  r => 0 : u0  r=> R : uR
======================
use : 'p6e'

1e)  limit r => 0  (center -line)
------------------------------------------

p7a:u0 = limit(rhs(p6e),r,0);

p7a1:[rhs(p7a)=lhs(p7a)];

2e)  limit r => R  (wall of  the pipe)
-------------------------------------------------

p7b:uR = limit(rhs(p6e),r,R);

Maximum velocity : u0 @ center-line.

Average value u : u[avg]
=====================
definition : u[avg]
----------------------------
u[avg] = volumetric flow rate /cross section (=A= π*r^2)
units (SI):  [m/s] = [m^3/s/m^2]

p8a: A= %pi*r^2;
p8b:'diff(A,r) = diff(rhs(p8a),r);

differential definition. 'u[avg]'
========================

u[avg] =integrate(u*dA,r,0,R)/A(r= R).

p8c:u[avg]= integrate(rhs(p6d)*rhs(p8b),r,0,R)/(π*R^2);

what about : u[avg] and u0
=======================

p8d:lhs(p8c) = lratsubst(p7a1,rhs(p8c));

computation : head loss
====================
definition : h[l]= Δp/(ρ*g)

p9a:h[l] = Δp/(ρ*g);

1e)  how to find Δp from dp/dx.
----------------------------------------------

p9b:solve(p8c,('diff(p,x,1)))[1];

p9b1:[lhs(p9b) = Δp/Δx];
p9b2:subst(p9b1,p9b);

given : pipe length L

p9b3:[Δx= L];
p9b4:subst(p9b3,p9b2);

solve : Δp

p9b5:solve(p9b4,Δp);

2e)  Head loss h[l]
---------------------------
use : definition,'p9a' ,above

p9b6:subst(p9b5,p9a);

find : parabolic profile u,u0
======================
use : 'p7a,p6e'

p10:lhs(p6e)  = lratsubst(p7a1,rhs(p6e));

p10a:expand(p10);

p10b:p10a/u0;

p10c:lhs(p10b) = expand(rhs(p10b));

p10d:lhs(p10b)=subst([p7a],rhs(p10c));

p10f:p10d*u0;

check : with above limit
====================
r =  R

p11:uR = limit(rhs(p10f),r,R);

rem : p7b = p11, result true.

how to check : is 'command maxima'

p11a:is(rhs(p7b) =rhs(p11));

'--------------------------------------------------------------------------------------------'