Saturday, March 26, 2011

2D Coordinate system changing - Cartesian to Elliptic

2D Coordinate system changing - Cartesian to Elliptic


Coordinate system changing using atlas for Maple package

What we do?

In this article we discuss coordinate system changing from Cartesian to Elliptic.
  • We construct a Cartesian domain (C) with the standard flat metric and an Elliptic domain (E).
  • We map C into E and then calculate metric tensor field and connection induced on E by the mapping.
  • We also obtain the Laplace operator, Killing vector fields, geodesic lines and tangent vector fields on the elliptic domain.
  • We show by straight computations that geometry on domains C and E is just the same namely flat geometry of the plane.



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.

Let's begin and have fun!

Load atlas package:
with(atlas);

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


Cartesian domain

First of all we have to describe the space we are working in. The Cartesian domain is 2-dimensional Euclidean (flat) space i.e. a plane with a Cartesian coordinate system. To define the space we declare domain, forms, vectors, coframe, frame, flat metric and calculate connection (it equals to zero of caurse).

Define the Euclidean space as a manifold:
Domain(C);

C

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

ek

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

Ej

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

e1=dx,e2=dy

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

E1=x,E2=y

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

g=e1e1+e2e2

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

ωi,j

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

Elliptic domain

The Elliptic domain is a plane with 2-dimensional orthogonal coordinate system in which the coordinate lines are confocal ellipses and hyperbolae.

The "graph paper" of the Elliptic coordinate system:
with(plots):
coordplot(elliptic);

Define new domain:
Domain(E);

E

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

ek,wi

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

Wk

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

w1=du,w2=dv

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

W1=u,W2=v

Declare a mapping of the domain into :
Mapping(pi, E, C, x = cosh(u)*cos(v), y = sinh(u)*sin(v));

π
E.--->.C

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

Calculate the connection:
Connection(Gamma);

Let us see the result:
eval(Gamma);

Connection is not equal to zero. Nevertheless the domain has flat metric. To verify this fact we compute curvature 2-forms:
Curvature(Phi);

Obvious result:
eval(Phi);

Calculations in E domain

And now the most fun part!!! Let's answer the several questions:

Declare abstract functions on E domain:
Functions(f = f(u, v), h = h(u, v));

Calculate the gradient of the function:
'grad(f)'=grad(f);

Divergence of the frame vector fields:
'div(W[1])' = div(W[1]);
'div(W[2])' = div(W[2]);

The divergences are not equal zero.
To calculate the Laplace operator one can use the grad and div operators:
Delta(f)=div(grad(f));

Verify that there are no Killing vector fields in frame vector fields:
'L[W[j]](G)' = L[W[j]](G);

How do we calculate the Killing vector fields in an elliptic domain?
To do this we can use condition for the vector field X.

Construct the vector field X as a linear combination of the frame vector fields:
X := f*W[1]+h*W[2];

Calculate the corresponding Lie derivative:
'L[X](G)'=collect(L[X](G),`&.`);

We have to solve corresponding PDE system () and find the functions f and h. But...
But it is obvious that the vector fields are Killing ones in the Cartesian domain. Thus these vectors are Killing ones on the E domain also. It means that we have to express fields by frame vector fields on E.

First of all we find the expressions for corresponding 1-forms using restriction of the mapping:
e1 := `&/`(e[1], pi);
e2 := `&/`(e[2], pi);

After that we use dual operator to convert 1-forms into corresponding vector fields ("rising indexes"):
E1 := dual(e1);
E2 := dual(e2);

Verify the result:
'L['E1'](G)' = simplify(L[E1](G));
'L['E2'](G)' = simplify(L[E2](G));

By the way there are "no sources and drains" for these vector fields (just straight lines; see graph paper above):
'div(E1)' = div(E1);
'div(E2)' = div(E2);

How to calculate the geodesic lines?
To do this we can use the condition for tangent vectors X of a geodesic line.

Calculate the corresponding covariant derivative:
'cov[X](X)' = collect(cov[X](X), [W[1], W[2]]);

We have to solve the corresponding PDE system () and find functions f and h. But ...
But the obvious result is as follows:
'cov['E1'](E1)' = simplify(cov[E1](E1));
'cov['E2'](E2)' = simplify(cov[E2](E2));

Nothing surprising about it really. Vector fields E1, E2 are tangent ones of straight lines on the plane (just expressed by frame vectors of E domain). We are on the plane anyway (but with different coordinate system) thus the geometry on E is the same as on C.

Conclusions

So, what do we get?

We construct two domains (Cartesian and Elliptic) and map them one to another.
Calculate the Laplace operator, Killing vector and so on.
Also we show that geometry on the Cartesian and Elliptic domains is just the same namely flat geometry of the plane.

Although some formulas look quite big and impressive, but solving the problem take less than 10 minutes for me.

Post a Comment