Equation of Motion and the Derivative of a vector following the Motion:

Section 3.2 in BS&L

> restart;

> with(linalg):

> Dv:=(vin,v)->evalm(map(diff,vin,t)+v[1]*map(diff,vin,x)+v[2]*map(diff,vin,y)+v[3]*map(diff,vin,z)); Derivative of a vector vin wrt the motion v

[Maple Math]

> dels:=s->grad(s,vector([x,y,z])); The gradient of a scalar

[Maple Math]

> dels(p(x,y,z,t));

[Maple Math]

> tau:=(x,y,z,t)->matrix([[txx(x,y,z,t),txy(x,y,z,t),txz(x,y,z,t)],[tyx(x,y,z,t),tyy(x,y,z,t),tyz(x,y,z,t)],[tzx(x,y,z,t),tzy(x,y,z,t),tzz(x,y,z,t)]]);

[Maple Math]

> ddt:=t->vector([diff(t[1,1],x)+diff(t[2,1],y)+diff(t[3,1],z),diff(t[1,2],x)+diff(t[2,2],y)+diff(t[3,2],z),diff(t[1,3],x)+diff(t[2,3],y)+diff(t[3,3],z)]); del dot a tensor as in eq. 3.2-10 and in Table A.7-1

> ddt(tau(x,y,z,t));

[Maple Math]
[Maple Math]
[Maple Math]

> eqmot:=evalm(rho(x,y,z,t)*Dv(vector([vx(x,y,z,t),vy(x,y,z,t),vz(x,y,z,t)]),vector([vx(x,y,z,t),vy(x,y,z,t),vz(x,y,z,t)]))+dels(p(x,y,z,t))+ddt(tau(x,y,z,t))-rho(x,y,z,t)*vector([gx(x,y,z,t),gy(x,y,z,t),gz(x,y,z,t)])); Eq. 3.2-10

> eqmot[1];

> tau2d:=(x,y)->matrix([[txx(x,y),txy(x,y),0],[tyx(x,y),tyy(x,y),0],[0,0,0]]);

[Maple Math]

> eqmot2:=evalm(rho*Dv(vector([vx(x,y),vy(x,y),0]),vector([vx(x,y),vy(x,y),0]))+dels(p(x,y))+ddt(tau2d(x,y))-rho(x,y)*vector([0,gy,0])); For the case where rho is constant and the flow is only in the x and y directions.

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]