Pint, MPmath and implied units, working with Excel

Spreadsheets linking to the Python Pint and MPmath libraries have been presented here before at:

Units and solvers with Pint and Sympy

mpmath for Excel

I have now updated the spreadsheet to work with pyxll, and with some new functions and examples. The spreadsheet and associated Python code can be downloaded from:

EvalU.zip

New functions include:

py_Quant creates a Pint Quantity object, which may be conveniently used to convert between any compatible units:

py_AddUnits adds units to the Pint Unit Registry, and py_UnitDefined checks if a unit yet exists:

A new example has been added, illustrating how to work with formulae that have constants with implied units, using as an example finding the tensile strength of concrete based on a constant times the concrete’s compressive strength:

This entry was posted in Concrete, Excel, Link to Python, Newton, PyXLL, UDFs and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.