Re: field line with NDSolve

• To: mathgroup at smc.vnet.net
• Subject: [mg58045] Re: field line with NDSolve
• From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
• Date: Fri, 17 Jun 2005 05:18:42 -0400 (EDT)
• Organization: Uni Leipzig
• References: <d8rl77\$jnl\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

you will never get a result as long ais you use variables
with underscores in it, an underscore is a short form for
Pattern[] and and "eqn_bnd" is Pattern[eqn,bnd] and not a
symbol.

Regards
Jens

<topolog at gazeta.pl> schrieb im Newsbeitrag
news:d8rl77\$jnl\$1 at smc.vnet.net...
> Hi everybody!
>
> I am trying to obtain a magnetic field line in
> 3d, i.e. z(x{y),y).
> So I have magnetic induction vector B = (Bx, By,
> Bz), where
> Bi=Bi(x,y,z), i={x,y,z}. By the definition I set
> an unit vector in
> direction y: b = B / Abs[By] = (bx, by, bz) and
> replace coordinates
> x and z with functions x[y], z[y]. The final
> step is to integrate
> the set of 2 equations:
> x'[y] = bx
> z'[y] = bz
>
> In version 4.0 of Mathematica I was able to
> solve that with the code
> below, but in 5.1 I am not anymore. I suppose
> the conflict exists in
> passing arguments as symbolic, since B depends
> on z through
> InterpolatingFunction(s) and after replacing
> z -> z[y], I got
> InterpolatingFunction[{{0., 1000.}}, <>][z[y]].
> But I am not sure
> how to manage this ...
>
> B = {Bx, By, Bz};
> b = B/Abs[By] /. {x -> x[y], z -> z[y]};
> r = {x[y], z[y]};
> eqn_b = {D[r[[1]], y] == b[[1]], D[r[[2]], y] ==
> b[[3]]}
>
> bnd_con = {x[ymin] == xmax/2, z[ymin] ==
> zmax/10};
> eqn_bnd = Join[eqn_b, bnd_con];
> B_line = NDSolve[eqn_bnd, r, {y, ymin, ymax}];
>
> The error I get is:
>
> NDSSolve::nlnum : The function value {...a large
> expression...} is
> not a list of numbers with dimmensions {2} at
> y={...a value...}
>
>
> Ragards
> Rafal Kosinski
>
>
>
> --
> Promocja! Format 15x20 tylko 99gr!
> Zamów odbitki cyfrowe online - odbierz za darmo
> w EMPiK-u lub wy¶lemy Ci je poczt±
> http://gazeta.empikfoto.pl
>

```

• Prev by Date: Re: field line with NDSolve
• Next by Date: Re: Preventing LegendreP from self-extracting in manipulations
• Previous by thread: Re: field line with NDSolve
• Next by thread: Mathematica 5.1 Cumulative Normal Definition