Skip to main content

materials

Build Status codecov PyPi Version GitHub stars

materials is a database of physical and chemical data, possibly with temperature dependence, of various more or less common materials. All data are given in SI units.

For example, to plot the density of various materials between 274 and 370 K you can do

import materials
import matplotlib.pyplot as plt
import numpy


T = numpy.linspace(274.0, 370.0, num=100)

rho_air = materials.air.density(T)
rho_argon = materials.argon.density(T)
rho_copper = materials.copper.density(T)
rho_water = materials.water.density(T)

plt.semilogy(T, rho_copper, label='copper')
plt.semilogy(T, rho_water, label='water')
plt.semilogy(T, rho_argon, label='argon')
plt.semilogy(T, rho_air, label='air')

plt.title('densities')
plt.xlabel('temperature (K)')
plt.ylabel('density (kg/m^3)')
plt.legend()

plt.show()

Installation

materials is available from the Python Package Index, so simply type

pip install -U materials

to install or upgrade.

Testing

To run the materials unit tests, check out this repository and type

pytest

Distribution

To create a new release

  1. bump the __version__ number,

  2. publish to PyPi and GitHub:

    make publish

License

materials is published under the MIT license.

Metadata

Release files for materials 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for materials 0.1.5
File Interpreter ABI Platform
materials-0.1.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / materials-0.1.5-py2.py3-none-any.whl

Download URL materials-0.1.5-py2.py3-none-any.whl
Size 15.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f945d558e3598e78e40799ab314c098ef039137fc82f2eb51dff8b847eb81c5c
BLAKE2b-256 checksum
How to use checksums
0c835e043c0174ffdc031c4f50faf3c374b004aaaeecea1f06a2a7e67f1d2d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.5 This release

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page