Unverified Commit 2c5c4ab1 authored by sschoenholz's avatar sschoenholz Committed by GitHub
Browse files

Merge pull request #62 from google/radial_distribution

Added utility to compute bulk modulus.
parents 31615a0d 873d1338
......@@ -138,3 +138,7 @@ def pair_correlation(displacement_or_metric, rs, sigma):
def box_size_at_number_density(
particle_count, number_density, spatial_dimension):
return np.power(particle_count / number_density, 1 / spatial_dimension)
def bulk_modulus(elastic_tensor):
return np.einsum('iijj->', elastic_tensor) / elastic_tensor.shape[0] ** 2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment