MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Coordinate conversion with Grad

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75889] Re: [mg75872] Coordinate conversion with Grad
  • From: "Adriano Pascoletti" <adriano.pascoletti at dimi.uniud.it>
  • Date: Sun, 13 May 2007 05:35:01 -0400 (EDT)
  • References: <200705120710.DAA24082@smc.vnet.net>

Sachin,
differential geometry tells us that the local orthonormal basis at the point
(Rr, Ttheta, Zz) is given by the columns of the jacobian matrix divided by
the scale factors so

In[2]:=SetCoordinates[Cylindrical]
Out[2]=Cylindrical[Rr, Ttheta, Zz]

the orthonormal basis is given by

In[3]:=JacobianMatrix[Cylindrical] . DiagonalMatrix[
ScaleFactors[Cylindrical]^(-1)]
Out[3]={{Cos[Ttheta], -Sin[Ttheta], 0},   {Sin[Ttheta], Cos[Ttheta], 0}, {0,
0, 1}}

and the result you are looking for

In[4]:=JacobianMatrix[Cylindrical] . DiagonalMatrix[
   ScaleFactors[Cylindrical]^(-1)] . Grad[Cos[Ttheta]]
Out[4]=
{Sin[Ttheta]^2/Rr, -((Cos[Ttheta]*Sin[Ttheta])/Rr), 0}

Adriano Pascoletti

On 5/12/07, laxmipt at gmail.com <laxmipt at gmail.com> wrote:
>
> I am using Mathematica 5.2.
> I wish to do coordinate transformations for differential geometry.
> For
> example transform a Grad from a cylindrical system to a Cartesian
> system:
> For example:
> In[1]:= << Calculus`VectorAnalysis`;
> SetCoordinates[Cylindrical]
>
> Out[2]:=Cylindrical[Rr, Ttheta, Zz]
>
> In[3]:= Grad[Cos[Ttheta], Cylindrical[Rr, Ttheta, Zz]]
>
> Out[4]:={0,-Sin[Ttheta]/Rr,0}
>
> The above Grad vector refers to the cylindrical system.  How can I get
> Mathematica to convert it into the corresponding gradient in the
> Cartesian
> system, which would become:
> {sin^2(Ttheta)/Sqrt[x^2+y^2], sin(Ttheta)Cos(Ttheta)/Sqrt[x^2+y^2],0}
>
> Thanks!
> Sachin
>
>
>



  • Prev by Date: Re: Package Help in Mathematica 6
  • Next by Date: Re: elliptic integral (reloaded!)
  • Previous by thread: Coordinate conversion with Grad
  • Next by thread: Re: Coordinate conversion with Grad