https://github.com/nschloe/materials
Density, magnetic permeability etc. for a range of materials.
https://github.com/nschloe/materials
chemistry engineering physics physics-simulation
Last synced: 9 months ago
JSON representation
Density, magnetic permeability etc. for a range of materials.
- Host: GitHub
- URL: https://github.com/nschloe/materials
- Owner: nschloe
- License: mit
- Created: 2017-03-29T07:40:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-07T09:52:50.000Z (over 8 years ago)
- Last Synced: 2025-07-05T18:37:49.678Z (12 months ago)
- Topics: chemistry, engineering, physics, physics-simulation
- Language: Python
- Size: 61.5 KB
- Stars: 9
- Watchers: 2
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# materials
[](https://travis-ci.org/nschloe/materials)
[](https://codecov.io/gh/nschloe/materials)
[](https://pypi.python.org/pypi/materials)
[](https://github.com/nschloe/materials)
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
```python
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](https://pypi.python.org/pypi/materials/), 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](https://en.wikipedia.org/wiki/MIT_License).