## 3D Coordinate system changing - Cartesian to Toroidal

Toroidal coordinate system on 3-space using atlas for Maple package

### What we do?

In this article we discuss 3D coordinate system changing from Cartesian to Toroidal.
• We construct the Cartesian domain () with the standard flat metric and a Toroidal domain (T).
• We map into T and then calculate metric tensor field and connection induced on T by the mapping.
• We also obtain the Laplace operator on 3-space in the toroidal coordinate system.

### What we use?

For the calculations we will use atlas 2 for Maple - modern differential geometry package.
In the end of the article you can find the file with code.

with(atlas);

### Cartesian domain

First of all we have to describe the space we are working in. The space is 3-dimensional Euclidean (flat) space. To define the space we declare domain, forms, vectors, coframe, frame, flat metric and calculate the connection (it equals to zero of cause).

The "graph paper" of the 3-dimensional Euclidean coordinate system:
with(plots):
coordplot3d(rectangular);

Define the Euclidean space as a manifold:
Domain(R^3);

Declare 1-forms for the space coframe:
Forms(e[k] = 1);

Declare the vectors for the space frame:
Vectors(E[j]);

Declare the coframe on the space:
Coframe(e[1] = d(x), e[2] = d(y), e[3] = d(z));

Declare the frame on the space:
Frame(E[k]);

Declare a flat metric on the space:
Metric(g = `&.`(d(x), d(x))+`&.`(d(y), d(y))+`&.`(d(z), d(z)));

Calculate the connection of the metric:
Connection(omega);

Redefine `atlas/simp` procedure to simplify the results:
`atlas/simp` := proc (a) factor(simplify(a)) end proc

Now the working space is defined completely and we can start to solve the problem.

### Toroidal domain

The Toroidal domain is a space with 3-dimensional orthogonal coordinate system that results from rotating the two-dimensional bipolar coordinate system about the axis that separates its two foci.

The "graph paper" of the Toroidal coordinate system:
with(plots):
coordplot3d(toroidal);

Define new domain:
Domain(T);

Declare 1-form for the domain coframe:
Forms(phi[i] = 1);

Declare the vectors for the domain frame:
Vectors(Phi[k]);

Declare the coframe on the domain:
Coframe(phi[1] = d(u), phi[2] = d(v), phi[3] = d(w));

Declare the frame of the domain:
Frame(Phi[j]);

Declare a mapping of the domain into :
Mapping(pi, T, R^3,
x = sinh(v)*cos(w)/(cosh(v)-cos(u)),
y = sinh(v)*sin(w)/(cosh(v)-cos(u)),
z = sin(u)/(cosh(v)-cos(u)));

Now we can calculate the metric induced on the domain by the mapping:
Metric(G = `&/`(g, pi));

Connection(Gamma);

Calculate the connection:
eval(Gamma);

Functions(f = f(u, v, w));

To calculate the Laplace operator one can use the grad and div operators:

### Conclusions

So, what do we get?

We construct two domains (Cartesian and Toroidal) and map them one to another.
Also we calculate the Laplace operator.