GSoC 2020 Idea: Improving SymPy Units

21 views
Skip to first unread message

Anson Biggs

unread,
Mar 27, 2020, 2:35:41 AM3/27/20
to sympy

Improving Units

Idea

I personally use SymPy for engineering and a great way to check myself for mistakes is checking that the units for my equations are consistent and compatible. I think that SymPy could greatly benefit from having a more robust unit system built-in especially when it comes to usage in engineering, science, and physics. 

Status

The only discussion I saw in the past few years is https://github.com/sympy/sympy/wiki/Unit-systems which has some good historical links as well but it looks like this topic hasn't actually been worked on in about 5 years. 


Involved Software

It may be best to use an external library for the quantities that are already tested for the lower level part of the code and implement their values with SymPy.

Difficulty

Medium Python Difficulty

Prerequisite Knowledge

A solid understanding of units.

Francesco Bonazzi

unread,
Mar 27, 2020, 3:45:30 AM3/27/20
to sympy


On Friday, 27 March 2020 07:35:41 UTC+1, Anson Biggs wrote:

Improving Units

Idea

I personally use SymPy for engineering and a great way to check myself for mistakes is checking that the units for my equations are consistent and compatible. I think that SymPy could greatly benefit from having a more robust unit system built-in especially when it comes to usage in engineering, science, and physics.


So far, I think SymPy's unit system is one of the most advanced out there. There is a bit of concern on its robustness as it's not been thoroughly tested, and parts of it are still under development.

It may be best to use an external library for the quantities that are already tested for the lower level part of the code and implement their values with SymPy.


The value of a quantity generally depends on the unit system. Even the units of a quantity depend on the chosen unit system.
 
A nice thing to have is a formula converter for unit systems. For example, transform the Maxwell equations from SI to natural units and vice versa.
Reply all
Reply to author
Forward
0 new messages