[Date Index]
[Thread Index]
[Author Index]
Re: custom coordinate systems in mathematica Help!
*To*: mathgroup at smc.vnet.net
*Subject*: [mg97087] Re: custom coordinate systems in mathematica Help!
*From*: dh <dh at metrohm.com>
*Date*: Thu, 5 Mar 2009 04:53:00 -0500 (EST)
*References*: <golr2n$qd9$1@smc.vnet.net>
Hi,
first check out the standard package: VectorAnalysis. If you can find
your coordinate system there, you are done.
If not there exists a package "GeneralVectorAnalysis.m". You will have
to search the group archive or at Wolfram for it.
If this does not help neither, you must do the work yourself. E.g.
Assume we have: u[x,y,z],v[x,y,z],w[x,y,z],
then we get the Gradient operator in {u,v,w} coordinates by:
gr = Function[xx,
Tr /@ (Outer[
D[#3, #1] D[xx, #2] &, {x, y, z}, {u, v, w}, {U, V, W}])]
This is a handsome piece of code, but it works by first creating all
possible combination of derivatives. Then "Tr" picks the one we want and
sums them. E.g. if we want the gradient of the scalar function p[u,v,w]:
gr[u[u,v,w]]
this gives:
{
(p^(1,0,0))[u,v,w] (u^(1,0,0))[x,y,z]+(p^(0,1,0))[u,v,w]
(v^(1,0,0))[x,y,z]+(p^(0,0,1))[u,v,w] (w^(1,0,0))[x,y,z]
,
(p^(0,1,0))[u,v,w] (v^(0,1,0))[x,y,z]+(p^(0,0,1))[u,v,w]
(w^(0,1,0))[x,y,z]+(u^(0,1,0))[x,y,z] (p^(1,0,0))[u,v,w]
,
(p^(0,0,1))[u,v,w] (w^(0,0,1))[x,y,z]+(v^(0,0,1))[x,y,z]
(p^(0,1,0))[u,v,w]+(u^(0,0,1))[x,y,z] (p^(1,0,0))[u,v,w]
}
have fun, Daniel
Magician wrote:
> Hi!,
> HELP!
>
> I've asked this question a couple of times but never received an
> answer.
>
>
> I have a new coordinate system to deal with.
> x=f(u, v,w)
> y=g(u,v,w)
> z=h(u,v,w)
> (x,y,z) are Cartesian
> and it's inverse is known.
> How can I program this in Mathematica and compute the gradient, curl,
> divergence, laplacian
> and other operators in this coordinate system ????
>
Prev by Date:
**Re: Conjecture: 2n+1= 2^i+p ; 6k-2 or 6k+2 = 3^i+p**
Next by Date:
**Re: "Do What I Mean" - a suggestion for improving**
Previous by thread:
**Re: custom coordinate systems in mathematica Help!**
Next by thread:
**GraphPlot questions**
| |