kill(all)$

fluid : Non-Dimensional N-S Equations,reynoldsnumber ,version 1.0
peter.vlasschaert@gmail,26/04/2019.

load packages 
=============

load (lrats)$

see :  N-S equation (Navier -Stokes)
=> proof Bernoulli's Equation from N-S, version 1.0
      peter.vlasschaert@gmail.com,25/04/2019
===========================================
use: 'p1a,p1b,p1c'
===========================================

incompressible flow : ρ =  constant,steady state.
===========================================

p1a:ρ*('diff(v,y,1))+ρ*('diff(u,x,1))=0;
p1b:ρ*('diff(u,y,1))*v+ρ*u*('diff(u,x,1))=ρ*g*sin(α)+('diff(u,y,2))*Γ+('diff(u,x,2))*Γ-'diff(p,x,1);
p1c:ρ*v*('diff(v,y,1))+ρ*u*('diff(v,x,1))=-ρ*g*cos(α)+('diff(v,y,2))*Γ+('diff(v,x,2))*Γ-'diff(p,y,1);

because :  ρ = constant ≠ 0
=======================

p2a:ratsimp(p1a/ρ);
p2b:ratsimp(p1b/ρ);
p2c:ratsimp(p1c/ρ);

p3a:expand(p2a);
p3b:expand(p2b);
p3c:expand(p2c);

Non-Dimensional : analysis , we can put  g=0 ,α = constant no impact
===========================================================

factor :1e)  doesn't work (on the identity).
================================

p4:[g=0];
p4a:subst(p4,p3a),factor(%);
p4b:subst(p4,p3b),factor(%);
p4c:subst(p4,p3c),factor(%);

factor :  doesn't work (on the identity).
================================

p5a:lhs(p4a) = factor(rhs(p4a));
p5b:lhs(p4b) = factor(rhs(p4b));
p5c:lhs(p4c) = factor(rhs(p4c));

definition 
========

Γ = dynamic viscosity.
ρ = density 
γ = Γ/ρ = static viscosity

to get : definition ν = inside
=======================

p6:[Γ/ρ =γ];
p6a:lratsubst(p6,p5a);
p6b:lratsubst(p6,p5b);
p6c:lratsubst(p6,p5c);

p7a:expand(p6a);
p7b:expand(p6b);
p7c:expand(p6c);

rem :  v ≠ ν (= greek letter,smaller)

=>  symbols : only ,manual copy : ?
==============================
1e) select  => mouse
2e) past     => Ctrl v
=> {p8a,p8b,p8c}
rem : sign front ' must be removed.

p8a:'diff(v,y,1)+'diff(u,x,1)=0;
p8b:'(diff(u,y,1))*v+u*('diff(u,x,1))=-'diff(p,x,1)/ρ+('diff(u,y,2))*γ+('diff(u,x,2))*γ;
p8c:v*'(diff(v,y,1))+u*('diff(v,x,1))=-'diff(p,y,1)/ρ+γ*('diff(v,y,2))+γ*('diff(v,x,2));

p9a:ev(p8a,nouns);
p9b:ev(p8b,nouns);
p9c:ev(p8c,nouns);

 => ?

reason : no dependencies, see below , 'How to solve'.
rem : nous ,stand for operator evaluation.

--------------------------------------------------------------------------------
operator = differentation. example above.
--------------------------------------------------------------------------------

============================================
general : operator(atom) ,  'Maxima syntax'
rem : operator : diff,integrate,sin,cos..........
============================================

Non-Dimensional : analysis . (N-S)
=============================

example : length
==============

length :  Dimensional : unit length , m,  notation : [m]
=====================================================
1D  
===
 L = length interval    = >  m => [m]

=>   

Non-Dimensional (= quantities)
==========================

l : variable for length  =>  m => [m]

=>   number = l/L  ( = m/m=[m]/[m] =Non-Dimensional = float )

======================================================
info : m : meter
======================================================

reason :
=======
---------------------------------------------------------------------------------------------------
1e) mathematical  ( = general way of the solution)
2e) Non-dimensional quantities. (later define :  Reynolds number )
----------------------------------------------------------------------------------------------------
=>  to put  'RE = Reynolds number' into  N-S, into ? 'p7a,p7b,p7c'
----------------------------------------------------------------------------------------------------

'p7a,p7b,p7c' , Maxima , symbols ,no dependencies .

Nota : 

Maxima : expression ( math = equations)
==================================
==================================

dependencies;

qq:Maxima : define  mathematics.
--------------------------------------------------
u=u(x,y)
v=v(x,y)
p=p(x,y)

depends([u,v,p],[x,y]);

p10a:ev(p8a,diff);
p10b:ev(p8b,diff);
p10c:ev(p8c,diff);

info :
====

evaluation : Maxima.
=================

syntax use : ev(expression, operator,g=0)

example : ev(p10c,diff,ρ=7.0)

dependencies;

meaning : qq , see above. 'define mathematics relation'.

Define : Non-Dimensional (= quantities) for N-S
=======================================

a) Dimensional quantities
---------------------------------------

1e)  x  : length => m => [m].
2e)  y :  length => m => [m].
3e)  u : velocity => m/s => [m/s].
4e)  v :  velocity => m/s => [m/s].
5e)  p :  pressure => kg/(m*s^2) => [kg/(m*s^2)].

rem : p : N/m^2 =1/m^2*(kg*m/s^2) = kg/(m*s^2).
========================================
N     : newton , 'Force' = [kg*m/s^2].
p      :  Force/area
========================================

b) Non -Dimensional quantities
-----------------------------------------------

1e)  X  :x/L   
2e)  Y :  y/L
3e)  U : u/uinf
4e)  V:  v/uinf
5e)  P :  ?
6e)  ρ,ν :nothing ( reason : constant)

rem : uinf ,ref: flow direction : x -direction .
           L      ,ref :flow direction : x -direction .
info : general flow y-direction use : vinf ( not here)

What about  P ?
=============
flow :ρ, uinf,L,....  ' parametric values'.
--------------------------------------------------------
ρ      = density = [kg/m^3]
uinf = velocity = [m/s]
L      = length    = [m]

How construct  : P
================
P = p/Pref = Non-Dimensional quantity

How construct : Pref
==================

Pref = ρ*(uinf)^2 = (kg/m^3)*(m/s)^2 = (kg/(m*s^2)).
Pref = [kg/(m*s^2)]

Definition : P
===========

P = p/Pref = p/(ρ*(uinf)^2)

result : needed  N-S => Non-Dimensional version N-S
=====

define : new constant for Non-Dimensional analysis.
============================================

Non-Dimensional (= quantities) for N-S
================================

1e)  X  :x/L   
2e)  Y :  y/L
3e)  U : u/uinf
4e)  V:  v/uinf
5e)  P :  p/Pref = p/(ρ*(uinf)^2)
6e) ρ,ν :nothing ( reason : constant)

p11a: X= x/L;
p11b: Y = y/L;
p11c: U  = u/uinf;
p11d: V = v/uinf;
p11e: P =p/(ρ*(uinf)^2);

solve : {p11a,p11b,p11c,p11d,p11e} =>
              x,y,u,v,p

p12a:solve(p11a,x);
p12b:solve(p11b,y);
p12c:solve(p11c,u);
p12d:solve(p11d,v);
p12e:solve(p11e,p);

p12:[p12a[1],p12b[1],p12c[1],p12d[1],p12e[1]];

du/dx : ?  : Non-Dimensional form
---------------------------------------------------

depends([X],[x],[Y],[y],[U,V],[X,Y]);

'diff(u,x) = ev(subst(p12,diff(u,x)),nouns);

?  doesn't work .

other method : ?
==============

m1:Non -Dimensional : velocity
------------------------------------------

a)  u ,v  =>  U,V
============

p12a1:p12c[1];
p12b1:p12d[1];

a1)  du/dx,du/dy 
=============

p13a1:diff(u,x) = uinf/L*diff(U,X);
p13b1:lratsubst([x=y,X=Y],p13a1);

a2)  du/dx,du/dy  =>  dv/dx,dv/dy
===========================

p13a2:diff(v,x) = uinf/L*diff(V,X);
p13b2:lratsubst([x=y,X=Y],p13a2);

b1)  d(du/dx)/dx,d(du/dy )/dy
=======================

p13a11:diff(u,x,2) = uinf/L^2*diff(U,X,2);
p13b11:lratsubst([x=y,X=Y],p13a11);

b2)  d(du/dx)/dx,d(du/dy )/dy =>  d(dv/dx)/dx,d(dv/dy )/dy
===============================================

p13a22:diff(v,x,2) = uinf/L^2*diff(V,X,2);
p13b22:lratsubst([x=y,X=Y],p13a22);

m2:Non -Dimensional : pressure
-------------------------------------------------

depends([P],[X,Y]);

p13a33:diff(p,x) = (ρ*uinf^2)/L*diff(P,X);
p13b33:lratsubst([x=y,X=Y],p13a33);

p14:[p13a1,p13b1,p13a2,p13b2,p13a11,p13b11,p13a22,p13b22,p13a33,p13b33]$
p14a:[p12a1,p12b1];

Non-Dimensional form: N-S
=======================
USE : =>  {p10a,p10b,p10c}

p15a:lratsubst(p14,p10a);
p15b:lratsubst(p14,p10b);
p15c:lratsubst(p14,p10c);

p16a:lratsubst(p14a,p15a)*L/uinf;
p16b:lratsubst(p14a,p15b);
p16c:lratsubst(p14a,p15c);

simplification, p16b
================

remove : factor ,lhs
=================

lhs :

p17a: (V*(diff(U,Y,1))+U*(diff(U,X,1)));

rhs:

p17b:rhs(p16b)*L/(uinf)^2;

p17c:expand(p17b);

definition :  Reynolds number = RE
==============================

p20: (uinf*L)/γ = RE;

p21:rhs(p20) = lhs(p20);

final result : Non-Dimensional  'p10a'

p22:lratsubst([p20],p17a=p17c);

p22a:expand(p22);

final : three : Dimensional
======================

p23a:p10a;
p23b:p10b;
p23c:p10c;

final : three : Non-Dimensional of {p10a,p10b,p10c}
===========================================

info : 'for p23c'  and  relation between 'p23b'
=====================================

p24a1:(diff(U,Y,1))*V+U*(diff(U,X,1))= diff(U,Y,2)/RE+diff(U,X,2)/RE-diff(P,X,1);
p24a2:[diff(U,Y) = k1,diff(U,X) = k2,diff(U,Y,2)=k11,diff(U,X,2) = k22,diff(P,X) = k3];
p24a3:lratsubst(p24a2,p24a1) ;
p24a4:[k1=diff(V,Y) ,k2=diff(V,X),k11=diff(V,Y,2),k22=diff(V,X,2),k3=diff(P,Y)];
p24a5:lratsubst(p24a4,p24a3) ;
p24a6:expand(p24a5);

 =====================================

final :equations : Non-Dimensional .
==============================

p24a:p16a;
p24b: p22a;
p24c:p24a6;

1/RE : before laplace part : diffusion term.

 ===============================

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