On 04/04/2013 08:05 AM, Alan Bromborsky wrote:
On 04/04/2013 06:27 AM, Prasoon Shukla wrote:
I think I have a fair idea of what the class may behave like. Let's
have a vector field like so (an example):
*v*(x, y, z) = /f (x, y, z) /*i *+ /g (x, y, z) /*j *+ /h (x, y, z) /*k*
*
*
Just and example in rectangular coordinates using variables x, y and z.
Now, we can have a class, say ParamSpace(). Let us define a spherical
surface like so:
/p = ParamRegion(x=5*sin(u)*cos(v), y=5*sin(u)*sin(v), z=5*cos(u),
params=[u, v], bounds=[(u, 0, PI), (v, 0, 2*PI) ])/
This object can then be passed to Vector.integrate() and can serve as
the container for defining the region of integration.
Obviously, one problem is how to implement multiple patches. I am
still thinking on it.
After this, the next step is the integration itself. This means I
need to add functionality to the integration module so that it can
handle multiple integrals too. (I couldn't find any such functions
already existing in SymPy. Is there any implementation of it?).
Another problem is with vector calc theorems. For example, if you
have a contour for a line integral, what area do you choose for
applying the Stokes theorem (as the area can be any that has the
contour as its boundary)? Similarly for Gauss theorem too. I am still
thinking in this direction. Will post here when something occurs to me.
--
You received this message because you are subscribed to the Google
Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
You might want to let i,j, and k be sympy noncommuting symbols then
you automatically get vector addition, subtraction, and multiplication
by a scalar and could write -
/p = ParamRegion(r=5*sin(u)*cos(v)*i+5*sin(u)*sin(v)*j+5*cos(u)*k,
params=[u, v], bounds=[(u, 0, PI), (v, 0, 2*PI) ])
change of coordinates becomes proper substitutions for i,j,k in terms
of i',j',k'.
Practically speaking with stokes theorem a surface would be defined
first and the closed contour would lie on the surface, not the other
way around.
/ --
You received this message because you are subscribed to the Google
Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
Another suggestion would be to overload the multiplication operator
(__mul__) so that if a and b are vectors then a*b = a.b+a x b. This
could be accomplished with a
multiplication table for the basis vectors i,j,k and using the sympy
member functions args_cnc() and subs(multiplication_table_dictionary) to
perform the multiplications. Thus for a*b the scalar part would always
be the dot product and the non-commutative part the vector product.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.