## 3D Coordinate system changing - Cartesian to Toroidal

### 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?

In the end of the article you can find the file with code.

### Let's begin and have fun!

Load atlas package:

with(atlas);

### Cartesian domain

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

### 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.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:

Delta(f) = div(grad(f));

### 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.

## No comments:

Post a Comment