kill(all)$

 proof Bernoulli's Equation from N-S, version 1.0
 peter.vlasschaert@gmail.com,25/04/2019

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

load(lrats)$
load(vect)$

see : website: fluid dynamics

q: fluid flow gravity (down ,inclined plane),incompressible flow (NS).'version1.0'
peter.vlasschaert@gmail.com, 23/04/2019

we use 'q' : equations 'p7a,p7b,p7c'.
==============================
N-S :  2D version.

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);

proof Bernoulli's Equation
======================

1e) select equations
-------------------------------

p2a:p1b;
p2b:p1c;

2e)  set  α = 0
--------------------
u -  x direction
v -  y direction

p3:[α =0];
p3a:subst(p3,p2a);
p3b:subst(p3,p2b);

3e)  no diffusion (Γ =0)
-----------------------------------------

p4:[Γ=0];
p4a:subst(p4,p3a);
p4b:subst(p4,p3b);

divide by ρ for => 'p4a,p4b'

p5a:p4a/ρ,expand;
p5b:p4b/ρ,expand;

4e) implimentation  irrotationality of flow.
------------------------------------------------------------
see :website ,simple Bernoulli's Equation In Irrotational Flow , version 1.0.

reason : implimentation of total differential.

G : function 
==========

declare(G,nonscalar);

p6a:express(curl(G))=0;

because vector product : always three components
1e)  x-direction
2e)  y-direction
3e)  z-direction  ( because perpendicular to the plane xy)
-------------------------------------------------------------------------------------
rotation : z-direction. ( = above xy plane)
reason : vector product ' = curl(G) '

p6b:part(p6a,1,3) = 0;

p6c:p6b -part(p6b,1,2);

find relation : between 'p6b' and 'p5a,p5b'
---------------------------------------------------------------
proof : G[x] => u 
              G[y] => v

p7:[G[x]=u,G[y]=v];
p7a:subst(p7,p6c);

p7b:rhs(p7a) = lhs(p7a);

5e)  use 'p7a,p7b' into 'p5a,p5b'
-----------------------------------------
reason : construct total differential.
p5a  = > x  =>  dx
p5b  = > y  =>  dy

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

p8a:p5a;
p8b:p5b;

p9a:subst([p7b],p8a);
p9b:subst([p7a],p8b);

6e) multiply p9a*diff(x),p9b*diff(y)
--------------------------------------------------

p10a:p9a*dx;
p10b:p9b*dy;

7e) add (p10a,p10b)
-------------------------------

p11:p10a+p10b;

p11a:expand(p11);

8e) u,v,p are depent  x,y
------------------------------------

construct total  differential u,v,p

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

p12a:diff(u,x) *dx+diff(u,y) *dy = du;
p12b:diff(v,x) *dx+diff(v,y) *dy = dv;
p12c:diff(p,x) *dx+diff(p,y) *dy = dp;

p13a:p12a*u;
p13b:p12b*v;

p12:[p12a,p12b,p12c];

9e) combination 7e) and 8e)
========================

p13:lratsubst(p12,p11a);

p13a:expand(p13);

rem :

V=sqrt(u^2+v^2)

p13b:V^2=u^2+v^2;

x -direction,u
===========

p14a:'diff(u^2,u) =diff(u^2,u);

p14b:p14a/2;

rem : u from  lhs(p13a)

y-direction,v
===========

p14c:subst([u=v],p14b);

rem : v from  lhs(p14c)

combination
===========

p15:lhs(p14b)+lhs(p14c);

p15a:p15= subst([u=V],lhs(p14b));

result :Bernoulli's Equation
=======================

p16:p13a;

lhs : coef ( for integration)
========
du,dv

p16a:ratcoeff(lhs(p16),du);
p16b:ratcoeff(lhs(p16),dv);

p17a:integrate(p16a,u) + integrate(p16b,v);

rhs : coef ( for integration)
========
dp,dy

p16c:ratcoeff(rhs(p16),dp);
p16d:ratcoeff(rhs(p16),dy);

p17b:integrate(p16c,p)+integrate(p16d,y);

use :p13b
========

p18a:p17a-p17b=C;

use : definition , from V above
=>  V= V(u,v)

p18b:lratsubst([rhs(p13b)=lhs(p13b)],p18a);

p18c:expand(p18b);

rem : C units  Energy /mass.
rem : C integration constant

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