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")
for D in diffusivities:
htm.plotting.plot(D)
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=np.array([300, 400, 500, 600]), data_y=np.array([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
for D in tungsten_diffusivities:
htm.plotting.plot(D, 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()
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
h_transport_materials-0.0.4.tar.gz
(165.2 kB
view hashes)
Built Distribution
Close
Hashes for h_transport_materials-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80a00e6ada0dde8f2c77a06a9496769e5a895d0fc65f7032f37d3d2f35dcfb38 |
|
MD5 | b72ab41030968f970e59955f18c7c3c9 |
|
BLAKE2b-256 | 74bd63df1555f777c72f0863d25c443bec082615b22651fd60d085a7c5ff4581 |
Close
Hashes for h_transport_materials-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 066053eb1ec9ec81edf003549ae212089b5db809f34dd1fe7d21ac59d36ca322 |
|
MD5 | 4cb1aaf78daf17c32c9d14ec17486970 |
|
BLAKE2b-256 | e60ab4e1fb2a726e313113316e0b2f44683ecbc264e8227bcf72ed4e9ffbdec2 |