On 02/17/2014 10:46 AM, Jason Moore wrote:
Another approach would be to write a traditional vector calculus
module that uses the geometric algebra package in the background. I
don't know enough about geometric algebra to know if that is actually
possible. But maybe. Alan could probably comment.
The sympy.physics.vector module can be improved, but keep in mind that
Prasoon's work is essentially what that is. We'd ideally need a vector
calculus package that is in the top level name space of sympy which
would replace sympy.physics.vector functionality. The main hurdle is
the fact that we rely heavily on immutability in sympy.physics.vector
and the new vector classes should be immutable and based on core SymPy
classes.
Jason
moorepants.info <http://moorepants.info>
+01 530-601-9791
On Mon, Feb 17, 2014 at 9:22 AM, Sachin Joglekar
<[email protected] <mailto:[email protected]>> wrote:
Thats definitely a plan. I am going to send a PR soon with the
grad, curl, divergence and scalar potential functions that a basic
electrostatics module would need. What further enhancements can
you think of to the module? Have a look at the code and share your
ideas.
About implementing a vector module for SymPy, there are various
upsides to that. First off, having a core based on SymPy's
architecture would probably be much faster than the current
implementation (Provided we can provide it as much flexibility as
the current one has, with the constraint of immutability). Second,
we would like the physics vector-related stuff to be more
homogeneous with the rest of SymPy, which it currently is not.
However, last summer we did realise that's not an easy job. I
would still suggest you look at Prasoon's code (and the the small
amount I tried) and see whether you can build such a module.
On Monday, February 10, 2014 7:09:44 PM UTC+5:30, Rajath
Shashidhara wrote:
Hello,
I'm interested in implementing electrodynamics in sympy.
Any thoughts about this?
I don't seem to find any documentation about grad, divergence,
and curl.
Are they implemented?
I'm willing to do this as well.
Please give me feedback.
Thanks.
--
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 [email protected]
<mailto:sympy%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.
The main problem with the current GA module is that it only allows one
instance of a geometric algebra at a time. That is you can have a
geometric algebra with space time coordinate system that is (t,x,y,z) or
(t,r,theta,z) or (t,r,theta,phi) or any other by defining an appropriate
metric tensor (you are also not limited to
space time 4D). But only one instance of the algebra at a time is
allowed in the current GA module (I am developing a revised GA module
that does not have this limitation). The problem I see with this
limitation is if one needs to map one coordinate system into another.
The map from geometric algebra/calculus to 3d vector calculus is
simple. When the geometric algebra is instantiated a special vector
'grad' and the pseudo scalar 'I' is defined and the operations dot (|),
wedge (^), and geometric (*) products implemented. Then if U(x) and
V(x) are vector fields and f(x) is a scalar field we have -
1. U \cdot V = U|V (dot product)
2. U \times V = -I*(U^V) (vector product)
3. \nabla \cdot U = grad|U (divergence)
4. \nabla \times U = -I*(grad ^ U) (curl)
5. \nabla f = grad*f (gradient of scalar function)
Of course 2 and 3 are only valid in a 3d vector space and with dealing
with relativity it is much nicer to deal with a 4d Minkowski space.
My new implementation is functional and includes some new objects such
as multivector differential operators. I have not made a branch of it
yet since the api has changed some and I need to fix the documentation.
My biggest problem in revising the GA module is doing the documentation
in Sphinx. I have been using LaTeX for 30 years and writing docs in
Sphinx makes me feel like I am documenting while wearing blinders.
If anyone is interested the new code is at https://github.com/brombo/GA
and includes documentation in LaTeX and a set of introductory notes (in
progress) for geometric algebra and calculus.
I would be very interested in what you (plural) think should be the
functionality required for a physics module. I think the only thing
currently missing from my new GA module is a mapping from one instance
(coordinate system) of a geometric algebra to another, assuming each
geometric algebra are based on the same vector space (dimension and
signature).
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.