Newton's Law of Viscosity: Appendix B.1 

We can now attempt to use the definitions that we have to write Newton's Law of Viscosity 

 

tau = -mu(Typesetting:-delayGradient(v)+Typesetting:-delayGradient(v)^T)+(2/3*mu-kappa)(VectorCalculus:-Del*v)*delta 

 

In Maple, given our previous definitions this can be written as follows.  First, since we will need the Transpose function, we implement the LinearAlgebra package. 

 

> with(LinearAlgebra); -1
 

 

Next, note that the following code gives a 3x3 matrix of ones. 

 

> Matrix(3, 3, 1); 1
 

Matrix(%id = 149050280) 

 

Now we simply write Newton's Law of Viscosity in Maple code. 

 

> eqnB1 := `τMatrix`(x, y, z) = -mu*(Jacobian(v(x, y, z), [x, y, z])+Transpose(Jacobian(v(x, y, z), [x, y, z])))+(2/3*mu-kappa)*Divergence2(v(x, y, z))*Matrix(3, 3, 1); 1
eqnB1 := `τMatrix`(x, y, z) = -mu*(Jacobian(v(x, y, z), [x, y, z])+Transpose(Jacobian(v(x, y, z), [x, y, z])))+(2/3*mu-kappa)*Divergence2(v(x, y, z))*Matrix(3, 3, 1); 1
eqnB1 := `τMatrix`(x, y, z) = -mu*(Jacobian(v(x, y, z), [x, y, z])+Transpose(Jacobian(v(x, y, z), [x, y, z])))+(2/3*mu-kappa)*Divergence2(v(x, y, z))*Matrix(3, 3, 1); 1
 































 

 

The result is a mess and simplification does not help, as seen below. 

 

> simplify(eqnB1, size); 1
 































 

 

Note at this point, it will still be necessary to redefine the Jacobian as we did with the divergence.  If this is not done, evaluation at a specific x, y, and z could result in problems.  Furthermore, we can see that the given equation is still not completely functional for solving as general system of equations.