MathGroup Archive 2005

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

Search the Archive

PlotVectorField

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59412] PlotVectorField
  • From: <topolog at gazeta.pl>
  • Date: Tue, 9 Aug 2005 03:30:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Mathematica Users!

I met a difficulty in plotting a vector field B={Bx,By,Bz}. Here how
it looks like:

1. My vector components are:

Bx = Bx(x,y,z) =         F1(z) * Exp[A + I*kx*x + I*ky*y ]
By = By(x,y,z) = Bo(z) + F2(z) * Exp[A + I*kx*x + I*ky*y ]
Bz = Bz(x,y,z) =         F3(z) * Exp[A + I*kx*x + I*ky*y ]

where F1,F2,F3,Bo are Real functions in terms od
InterpolatingFunction[z], A,kx,ky are Real parameters, x,y,z are 3D
coordinates of Real space and I denotes Imaginary unit.


2. I take 2D cuts, for example {Bx,By} and {Bx,Bz}


2a) {Bx,By} works fine:

PlotVectorField[{Re[Bx], Re[By]} /. {z -> zmax}, {x, xmin, xmax},
{y, ymin, ymax}]

It works fine because I set a concrete value of z-functions F1,F2,F3,Bo.


2b) {Bx,Bz} fails:

PlotVectorField[{Re[Bx], Re[Bz]} /. {y -> ymax}, {x, xmin, xmax},
{z, zmin, zmax}]

It fails with following error:

'Min::nord: Invalid comparison with 0.721941 +0.I attempted'


3. I have been trying following modifications:

PlotVectorField[{ComplexExpand[Re[Bx]], ComplexExpand[Re[Bz]]} /. {y
-> ymax}, {x, xmin, xmax}, {z, zmin, zmax}]

and also

PlotVectorField[{ \\
ComplexExpand[Re[Bx]/. InterpolatingFunction[s__] -> \\
(InterpolatingFunction[s][Re[#]] &)], \\
ComplexExpand[Re[Bz]/. InterpolatingFunction[s__] -> \\
(InterpolatingFunction[s][Re[#]] &)]} \\
/. {y -> ymax}, {x, xmin, xmax}, {z, zmin, zmax}]

(here \\ denotes continuation of line)

Unfortunately no of that tricks helps.


It is very important to me and urgent, so I would appreciate any help. 

Thanks in advance and best regards

Rafal Kosinski








-- 
Tylko w sierpniu Avanti tak¿e w wersji MINI - z ³atwo¶ci± zmie¶ci siê w torebce!
http://www.avantimoda.pl


  • Prev by Date: Re: Redefining a function with a rule for coefficients
  • Next by Date: Re: Re: Some bugs in Mathematica
  • Previous by thread: Re: Re: Mathematica goes Bad
  • Next by thread: Re: PlotVectorField