Question: Navier Stokes equations in toroidal coordinates

Hallo everybody,

I just started to use maple and I think I need some help from more experienced users.
I would like to transform the stationary Navier Stokes equations to toroidal coordinates.


The definition of my coordinate system is as follows:
x = -r * cos(sigma)
y = cos(Theta) * ( R + r * sin(sigma) )
z = sin(Theta) * ( R + r * sin(sigma) )


I tried to define the coordinate system and transform each term of the equation:

div( rho * CC) = -grad(p) + div(Tau)

I can transform the pressure gradient. However, I get an error for the divergence of the tensors.
Could someone please give me a hint on how to get the divergences?

Thanks!
Uwe



My code is printed below:

restart: with(plots): with(LinearAlgebra): with(VectorCalculus): with(linalg):

#torus defintion
x := -r*cos(sigma);
y := cos(Theta)*(R+r*sin(sigma));
z := sin(Theta)*(R+r*sin(sigma));
R := .35;
AddCoordinates(torus1[r, sigma, Theta], [cos(Theta)*(R+r*sin(sigma)), sin(Theta)*(R+r*sin(sigma)), -r*cos(sigma)]);
SetCoordinates(torus1[r, sigma, Theta]);

#pressure gradient
PressureGradient := Gradient(p(r, sigma, Theta, t));

#left hand side
c := vector(3, ([Cr, Ctheta, Cx])(r, sigma, Theta, t));
rhoCC := rho*multiply(c, transpose(c));
LHS := Divergence(rhoCC)

Please Wait...