kill(all)$

fluid:input div(σ)'cylindrical coordinates' combination with velocity,'version 1.0'.
peter.vlasschaert@gmail.com,12/06/2019

see: website
===========

see:fluid : Cauchy momentum equation,version 1.0.
see:fluid : stress strain  (= cylindrical coordinates ),version 1.0.
see:fluid  : divergence of tensor cylindrical coordinates( = tensor),version 1.0.

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

see:fluid : stress strain  (= cylindrical coordinates ),version 1.0.

p1:[σ[r,r]=2*('diff(u[r],r,1))*μ-p,σ[r,θ]=('diff(u[θ],r,1)-u[θ]/r+'diff(u[r],θ,1)/r)*μ,σ[r,z]=('diff(u[z],r,1)+'diff(u[r],z,1))*μ,σ[θ,r]=('diff(u[θ],r,1)-u[θ]/r+'diff(u[r],θ,1)/r)*μ,
    σ[θ,θ]=((2*('diff(u[θ],θ,1)))/r+(2*u[r])/r)*μ-p,σ[θ,z]=('diff(u[θ],z,1)+'diff(u[z],θ,1)/r)*μ,σ[z,r]=('diff(u[z],r,1)+'diff(u[r],z,1))*μ,σ[z,θ]=('diff(u[θ],z,1)+'diff(u[z],θ,1)/r)*μ,
    σ[z,z]=2*('diff(u[z],z,1))*μ-p];

lhs = rhs
-------------

p1a:[er = e[r],eθ = e[θ], ez = e[z],ur = u[r],uθ = u[θ],uz = u[z]];

rhs = lhs
--------------

p1b:makelist(rhs(p1a[i]) =lhs(p1a[i]),i,1,length(p1a));

see:fluid  : divergence of tensor cylindrical coordinates( = tensor),version 1.0.

p2a:'diff(a[θ,r],θ,1)/r-a[θ,θ]/r+'diff(a[z,r],z,1)+'diff(a[r,r],r,1)+a[r,r]/r;
p2b:'diff(a[θ,θ],θ,1)/r+a[θ,r]/r+'diff(a[z,θ],z,1)+'diff(a[r,θ],r,1)+a[r,θ]/r;
p2c:'diff(a[θ,z],θ,1)/r+'diff(a[z,z],z,1)+'diff(a[r,z],r,1)+a[r,z]/r;

a => σ ,
=====

1e) divergence(σ) => vector σ ,{er,eθ,ez}.
------------------------------------------------------------
er => component : p3a
eθ => component : p3b
ez => component : p3c

p3:[a=σ];

p3a:subst(p3,p2a);
p3b:subst(p3,p2b);
p3c:subst(p3,p2c);

2e) input  :div(σ) ,'stress strain'
----------------------------------------------

depends([p],[r,θ,z]);

er :component
=============

p4a:subst(p1,p3a);

use : 'p1b'

p4b:subst(p1b,p4a);

ev : option ,nouns

p4c:ev(p4b,nouns);

p4d:expand(p4c);

p4e:collectterms(p4d,μ);

p4f:coeff(p4e,μ)*μ;

p4g:p4f*er+(p4e-p4f);

index notation

p4h:subst(p1a,p4g);

eθ :component
=============

p5a:subst(p1,p3b);
p5b:subst(p1b,p5a);
p5c:ev(p5b,nouns);
p5d:expand(p5c);
p5e:collectterms(p5d,μ);
p5f:coeff(p5e,μ)*μ;
p5g:p5f*eθ+(p5e-p5f);
p5h:subst(p1a,p5g);

ez :component
=============

p6a:subst(p1,p3c);
p6b:subst(p1b,p6a);
p6c:ev(p6b,nouns);
p6d:expand(p6c);
p6e:collectterms(p6d,μ);
p6f:coeff(p6e,μ)*μ;
p6g:p6f*ez+(p6e-p6f);
p6h:subst(p1a,p6g);