Message Boards Message Boards

0
|
4087 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to use/ evaluate symbolic vector calculus identities?

Dear Wolfram Team:

If have tried to apply identities of vector derivatives involving ratios and products (not just for simple " * " but also the "Dot" and "TensorProduct" generalizations).

Unfortunately, the expressions, done in simbolic tensor form, remain unevaluated.

See notebook attached for an example with the divergence, where the following identities (taken from Vector Derivative (Wolfram mathworld)) should be used by the program:

Divergence identities from wolfram mathworld I am not sure if:

1) I am missing something (maybe some add-in, but in the reference pages the relevant add-in should be incorporated in main program since at least version 9)

2) I should activate some extra command.

3) Something is wrong with my version of Mathematica so I need to download//install it again.

4) Anything else

Thank you in advance for your help.

Attachments:
3 Replies

I am not aware of built-in facilities for vector calculus at this level of abstraction. There may be ready-made packages around. However, we can roll out a version using pattern replacement rules:

scalarQ[_?NumberQ] := True;
divRules = {myDiv[(s_ /; scalarQ[s])*v_, x_] /; FreeQ[s, x] :> 
    s*myDiv[v, x],
   myDiv[v1_ + v2_, x_] :> myDiv[v1, x] + myDiv[v2, x],
   myDiv[(s_ /; scalarQ[s])*v_, x_] :> 
    s*myDiv[v, x] + myDot[myGrad[s, x], v],
   myDiv[myCross[v1_, v2_], x_] :> 
    myDot[v2, myCurl[v1, x]] - myDot[v1, myCurl[v2, x]]};
renderRules = {myDiv -> Inactive[Div], myDot -> Inactive[Dot], 
   myGrad -> Inactive[Grad], myCross -> Inactive[Cross],
   myCurl -> Inactive[Curl]};
scalarQ[s1] = True;
scalarQ[s2[__]] = True;
expr = s1*v[t, x] + v2[t, x] + s2[t, x]*v3[t, x] + 
   myCross[v4[t, x], v5[t, x]];
expr /. renderRules
myDiv[expr, x] //. divRules /. renderRules
POSTED BY: Gianluca Gorni

Maybe the identity involving the divergence of a tensor product can be proved by making the algebraic computation of the partial derivatives, assuming T1 = Through[{f1, f2, f3}[x1, x2, x3]] etc.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract