Handle H transport properties
Project description
H-transport-materials
Installation
pip install h-transport-materials
Usage
Access the internal database
import h_transport_materials as htm
import matplotlib.pyplot as plt
# filter only tungsten and H
diffusivities = htm.diffusivities.filter(material="tungsten").filter(isotope="h")
htm.plotting.plot(diffusivities)
plt.yscale("log")
plt.ylabel("Diffusivity (m$^2$/s)")
plt.legend()
plt.show()
Add custom properties
import h_transport_materials as htm
import numpy as np
# Create a custom property
my_custom_property = htm.ArrheniusProperty(pre_exp=1e-5, act_energy=0.2)
# From (T, y) data
my_fitted_property = htm.ArrheniusProperty(
data_T=[300, 400, 500, 600],
data_y=[1e-8, 1e-7, 1e-6, 1e-5],
)
print("Pre-exponential factor: {:.2e}".format(my_fitted_property.pre_exp))
print("Activation energy: {:.2f} eV".format(my_fitted_property.act_energy))
# Pre-exponential factor: 4.40e-03
# Activation energy: 0.35 eV
Filters
import h_transport_materials as htm
# tungsten solubilities
htm.solubilities.filter(material="tungsten")
# copper and cucrzr solubilities
htm.solubilities.filter(material=["copper", "cucrzr"])
# all_authors_except_ryabchikov
htm.diffusivities.filter(material="tungsten").filter(author="ryabchikov", exclude=True)
# only Tritium
htm.diffusivities.filter(isotope="t")
Compute mean values
import h_transport_materials as htm
import matplotlib.pyplot as plt
tungsten_diffusivities = htm.diffusivities.filter(material="tungsten").filter(
author=["moore", "zakharov"], exclude=True
)
# compute mean diffusivity
mean_D_0, mean_E_D = tungsten_diffusivities.mean()
mean_diffusivity = htm.ArrheniusProperty(mean_D_0, mean_E_D)
# plot
htm.plotting.plot(tungsten_diffusivities, alpha=0.5)
htm.plotting.plot(mean_diffusivity, color="black", linewidth=3)
x_annotation = 0.0034
plt.annotate("mean value", (x_annotation, mean_diffusivity.value(T=1 / x_annotation)))
plt.ylabel("Diffusivity (m$^2$ s$^{-1}$)")
plt.yscale("log")
plt.show()
Export to BibTeX
The refernces of properties and properties groups can be exported to a bibfile.
import h_transport_materials as htm
tungsten_diffusivities = htm.diffusivities.filter(material="tungsten")
tungsten_diffusivities.export_bib("my_bibfile.bib")
Contributions
The current database is far from complete. Contributions are most welcome to extend it by adding new properties and also new materials!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for h_transport_materials-0.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca5020646f1aa2bfe36e4e6f39fa1181ec679262a9f2662adda93b94b8f4ea06 |
|
MD5 | 349b67f50a3d5640ec29a837f2e30d9a |
|
BLAKE2b-256 | 8801bf08fd8c810fe90936562c5df88a64c1316bc4b4db6c578dbc452bb23abe |
Close
Hashes for h_transport_materials-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a735d946d9e12bbea95b8e259f7da4eedeb9a591f032b9445f6eaf9e6138776 |
|
MD5 | 311eb7a7f72a06c062c1d451dd05e54c |
|
BLAKE2b-256 | e175cfe7fe89a6dcc6edca1cb7b334ca5fc59b083bbe021edc96159f63cf379a |