Hello list,
I've been playing around with the "vect" package trying to define some
vector equations, for instance:
load("vect");
declare([u, E, B], nonscalar);
depends([n,u,E,B], [t,x,y,z]);
Lorentz_F : q * (E + u ~ B);
momentum : express( diff(u,t) + u.grad(u) - Lorentz_F = 0 );
Which works great, I've now got an equation in momentum that looks
like what I want, but now I want to try and get just the x-component
of the equation. Doing:
momentum[1];
doesn't work. It looks like the the derivatives don't get distributed
across the components of u so the different parts of the equation
don't get combined into one vector, so I have
d/dt [ u_x, u_y, u_z ] + ...
instead of
[ d/dt u_x, d/dt u_y, d/dt u_z ] + ...
Is there a way to either index the components of the equation in
momentum, or define my derivatives differently to accomplish the same
thing? Thanks for any tips.
--
Joshua Stults
Website: http://j-stults.blogspot.com