kill(all)$

fluid : Continuity equation  cylindrical  coordinates,part2.
peter.vlasschaert@gmail.com,30/04/2019

see : website
fluid : Continuity equation  cylindrical  coordinates,part1.

load packages.
=============

load(lrats)$

elementary volume element :cylindrical

=>    (x,y,z)   <->  (r,θ,z)

volume element 'cylindrical coordinates'
(design with geogebra 5)

General equation : continuity
========================

p1:rate[mass,in] -rate[mass,out] =  rate[mass,accum];

rem :accum: accumulation
------------------------------------------------
axes : x-direction :  red    arrow
             z-direction : A to B
             y-direction : green arrow
------------------------------------------------      
see : Figure 2     

relation :between Figure 1 and Figure 2
=================================

-----------------------------------------------------------
area : 1  => F1 F2 D C   =  AA
area : 2  => F1 C I H       = BB
area : 3  => H F1 F2 G   = CC
----------------------------------------------------------

first index , second index
=====================

see : Figure 1

thrid index :
=========
---------------------------------------------------------
o : outer area  (r+Δr)
i   : inner area  (r)
a  : above area (z+Δz)
b  : below area (z)
l   : low   area  (θ)
h  :high  area  (θ +Δθ)
----------------------------------------------------------

1e) result : Figure 1
================

AAo  = (r+Δr)*Δθ*Δz
BBl  = Δr *Δz
CCa  =(r)*Δθ*Δr

2e) result : Figure 1
================

inner  area :1 =>  AAi  = r*Δθ*Δz
high   area :2 =>  BBh = (θ+Δθ)*r*Δz
below area :3 =>  CCb = (r+Δr)*Δθ*Δr

area : definitions
==============

p2a:AAi  = r*Δθ*Δz;
p2b:AAo  = (r+Δr)*Δθ*Δz;
p3a: CCb = (r+Δr)*Δθ*Δr;
p3b:CCa  =(r)*Δθ*Δr;
p4a:BBl  = Δr *Δz;
p4b:BBh = (θ+Δθ)*r*Δz;

volume :definition
================

p5:ΔV = Δr*(r*Δθ)*Δz;

p5a:[rhs(p5) =lhs(p5)];

p2a1:expand(p2a);
p2a2:expand(p2b);
p2a3:expand(p3a);
p2a4:expand(p3b);
p2a5:expand(p4a);
p2a6:expand(p4b);

we need only three :  because when use linear approximation
=================
index : i   =>  r -direction
index : l   =>  θ -direction
index : b  =>  z - direction

Formula :frame :  Δi *Δj*Δk  = 0  for any combination.

p7a:p2a1;
p7b:p2a5;
p7c:lhs(p2a3) = part(rhs(p2a3),2);

r-direction
=========

inner :
=====

p8a: ρ*ur*rhs(p7a);

outer :
====

rem : 'r' must  be into differation,take out because of r
=> to make correction simple substitution.

p8b:p8a+'diff(ρ*ur*r,r)*Δr*rhs(p7a)/r;

use :p1   (use :ΔV)
======

lhs : part1
---------------

p8c:p8a-p8b;

rem  : multiply with  r/r =1
--------------------------------------
a) how put r above into lratsubst
b) r below  outside lratsubst

p8c1:lratsubst(p5a,p8c*r)/r;

θ-direction
=========

low :
=====

p9a: ρ*uθ*rhs(p7b);

high :
=====

p9b:p9a+'diff(ρ*uθ,θ)*Δθ*rhs(p7b);

use :p1   (use :ΔV)
======

lhs : part2
---------------

p9c:p9a-p9b;

rem  : multiply with  r/r =1
--------------------------------------
a) how put r above into lratsubst
b) r below  outside lratsubst

p9c1:lratsubst(p5a,p9c*r)/r;

z-direction
=========

below:
=====

p10a: ρ*uz*rhs(p7c);

above:
======

p10b:p10a+'diff(ρ*uz,z)*Δz*rhs(p7c);

use :p1   (use :ΔV)
======

lhs : part3
---------------

p10c:p10a-p10b;

p10c1:lratsubst(p5a,p10c);

rhs : only one part 'p1'
===================
[kg/s] =[Kg/m^3*m^3/s] => Δρ/Δt*ΔV

p11:'diff(ρ,t)*ΔV;

result  'p1'

continuity equation ,cylindrical coordinates.
=====================================

p12:p11-(p8c1+p9c1+p10c1) = 0;

p12a:factor(p12);

ΔV ≠ 0; Maxima trick  , ΔV =1

p12b:subst([ΔV=1],p12a);

final result : ' continuity equation ,cylindrical coordinates.'
==========

p12c:expand(p12b);

rem : into general , r ,gives the problem because must stay
inside of differentation with respect to r.

ρ = constant at all time, maxima trick find condition for incompressible flow
=>  maxima trick  :  ρ = 1

p12d:subst([ρ = 1],p12c);

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

rem : ρ =constant.

depends([ur],[r],[uθ],[θ],[uz],[z]);

general : evaluation
=================

p13:ev(p12d,nouns);

p13a:expand(p13);

relation from dependencies
=======================

dependencies;

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