Diffusion Calculation with Python and Pint

I was working on an engineering problem involving diffusion that involved a couple of different units including joules, grams, kilograms, meters, centimeters, moles, megapascals and weight percent. To make sure that I kept track of all the units and unit conversions throughout the problem, I thought I'd try using pint, a Python package for unit conversions.

more ...

Unit conversions with Python and Pint

Units and unit conversions are BIG in engineering. Engineers solve the world's problems in teams. Any problem that is solved has to have a context that it is solved in. How heavy can a rocket be and still make it off the ground? What thickness body panels should be used to keep occupants save during a crash? In engineering, a number without a unit is like a fish without water. It just flops around hopelessly without context and is useless. How can we get help using units? Programming is one way. In this post, we are going to use Python and Pint, a python package used for unit conversions, to do a couple of sample unit conversion problems.

more ...