       RE: Re: Curl

• To: mathgroup at smc.vnet.net
• Subject: [mg30522] RE: [mg30470] Re: Curl
• From: Emilio Martin-Serrano <emilio.martin-serrano at wanadoo.es>
• Date: Fri, 24 Aug 2001 20:58:15 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```I undestand the Jens's definition solves the problem for tensors of any
rank.

Could (any of) you give some examples of applications of *CurlN* for, say,
tensors of ranks 2, 3 and 4

Regards.

Emilio,

-----Mensaje original-----
De: Jens-Peer Kuska [mailto:kuska at informatik.uni-leipzig.de]
Enviado el: jueves, 23 de agosto de 2001 6:16
Para: mathgroup at smc.vnet.net
Asunto: [mg30470] Re: Curl

Hi,

curl include a cross product.
The cross product is
written with the  epsilon[] tensor,

Sum[epsilon[i,j,k] D[f[j],x[k]],j,k]

The epsilon tensor is 1 for an
even permutation of {i,j,k} and -1 for an odd permutation
of {i,j,k} and zero otherwise.  In three dimensions this
gives just a three dimensional vector. In higher dimensions
you get tensors of higher rank.

In Mathematica you can define

epsilon[index__Integer] := Signature[{index}]

dpos[i_, n_] := Table[If[k == i, 1, 0], {k, n}]

CurlN[f_, x_, n_Integer] :=
Module[{index, run},
index = {Sequence @@ Table[Unique[], {n - 2}], j, k};
run = {#, n} & /@ Drop[index, -2];
Table[
Sum[epsilon[Sequence  @@ index]Derivative[f[j]][Sequence @@
dpos[k, n]][
x], {j, n}, {k, n}], Evaluate[Sequence @@ run]]
]

that gives for n=3 the usual curl but for higher dimensions  n you
get a tensor of rank n-2.

Regards
Jens

Carlo Gabrieli wrote:
>
> Hi,
> I found on Roman Maeder "Computer Science with Mathematica" elegant
> implementations of Grad, Div, Laplacian, Jacobian but not of Curl. I
> know that the Mathematica package VectorAnalysis has a Curl function
> but I'd like to learn how to implement a Curl function for an
> arbitrary number of Cartesian coordinates
>
> Thanks in advance to all
> Best Regards
> Carlo Gabrieli

```

• Prev by Date: Re: Plot Joined Intelligently
• Next by Date: Re: Greatest element in list
• Previous by thread: Re: Curl
• Next by thread: Mathematica & Wavelets ...