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:
The "graph paper" of the 3-dimensional Euclidean coordinate system:
Define the Euclidean space as a manifold:
Declare 1-forms for the space coframe:
Forms(e[k] = 1);
Declare the vectors for the space frame:
Declare the coframe on the space:
Coframe(e = d(x), e = d(y), e = d(z));
Declare the frame on the space:
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:
Redefine `atlas/simp` procedure to simplify the results:
`atlas/simp` := proc (a) factor(simplify(a)) end proc
Toroidal domainThe 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:
Declare 1-form for the domain coframe:
Forms(phi[i] = 1);
Declare the vectors for the domain frame:
Declare the coframe on the domain:
Coframe(phi = d(u), phi = d(v), phi = d(w));
Declare the frame of the domain:
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));
Calculate the connection:
Functions(f = f(u, v, w));
To calculate the Laplace operator one can use the grad and div operators:
Delta(f) = div(grad(f));
ConclusionsSo, what do we get?
We construct two domains (Cartesian and Toroidal) and map them one to another.
Also we calculate the Laplace operator.