# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute elastic properties of a material with a specified elastic tensor (stiffness matrix)

Contributed by:
Wolfram Staff

ResourceFunction["ElasticData"][ returns basic elastic properties of a material with the stiffness matrix | |

ResourceFunction["ElasticData"][ gives elastic properties corresponding to the specified material parameters | |

ResourceFunction["ElasticData"][ gives the specified property " | |

ResourceFunction["ElasticData"][ gives an association of property values. | |

ResourceFunction["ElasticData"][ uses the specified running ExternalSessionObject session. |

ResourceFunction["ElasticData"] returns a combined association of elastic properties available in the Python packages mechelastic.core.ELATE and mechelastic.core.ElasticProperties.

If the necessary Python dependencies are not installed, the first invocation of ResourceFunction["ElasticData"] can take longer than usual as the function attempts to install the necessay packages automatically, using the the resource function PythonEvaluateWithDependencies.

Should the automatic installation fail for some packages, it might still be possible to install the packages manually using the resource function PythonPackageInstall.

The input stiffness matrix *m* is also called the elastic tensor.

The specified material parameters *params* can be one of the following:

{m,atoms,fc,lm} | a list of the stiffness matrix m, the list of atoms, their fractional coordinates fc and lattice matrix lm |

{m,sassoc} | the stiffness matrix m and an association of the structural parameters sassoc |

passoc | parameters given as an association |

The argument *prop* can be a string representing one of the available properties: Automatic to give most of the basic properties, Full to give all the available basic properties or All to give an association of most of the basic properties along with the properties corresponding to property plots.

When combining properties obtained from the underlying Python packages, ResourceFunction["ElasticData"][*params*,Automatic] omits duplicate properties that are available under different names, whereas ResourceFunction["ElasticData"][*params*,Full] returns all the available basic properties.

For properties corresponding to plots, *prop*_{i} can be given in the form {"*name*_{i}",*opts…*}, where *opts* can be options settings for ListPlot.

ResourceFunction["ElasticData"]["Properties"] gives a list of the available property names.

ResourceFunction["ElasticData"]["PropertyRules"] provides a mapping between the curated property names and the underlying Python-side names.

ResourceFunction["ElasticData"][*…*,*session*] avoids the overhead of opening a new Python session for every successive call.

ResourceFunction["ElasticData"] accepts the option "PrintOutput" that controls how the print output from the Python evaluations should be handled:

ResourceFunction["ElasticData"][…,"PrintOutput"→Automatic] appends the contents of print statements to the returned association in the form "Comments"→*comments*.

Get the basic properties of the elastic tensor of lithium niobate:

In[1]:= |

Out[1]= |

The available properties:

In[2]:= |

Out[2]= |

Create a dataset of the data:

In[3]:= |

Out[3]= |

Plot the spatial dependence of the shear modulus:

In[4]:= |

Out[4]= |

Get basic elastic properties of a material:

In[5]:= |

Out[5]= |

Get the specified property:

In[6]:= |

Out[6]= |

Several properties:

In[7]:= |

Out[7]= |

All available properties:

In[8]:= |

Out[8]= |

Specify plot options:

In[9]:= |

Out[9]= |

Obtain elastic properties of TiPbO_{3} given its elastic tensor and structure properties:

In[10]:= |

In[11]:= |

In[12]:= |

In[13]:= |

In[14]:= |

Out[14]= |

Obtain the same result by supplying the parameters as a single association or as the elastic tensor and structure properties given as an association:

In[15]:= |

Out[15]= |

Obtain elastic properties of wüstite taking the elasticity and structure properties from the Materials Project database:

In[16]:= |

Out[16]= |

In[17]:= |

Out[17]= |

Make several calls to the function in the same external session:

In[18]:= |

Out[18]= |

In[19]:= |

Out[19]= |

In[20]:= |

Out[20]= |

End the session:

In[21]:= |

Plot spatial dependencies of elastic properties of niobium pentoxide. Start a Python session:

In[22]:= |

Out[22]= |

Obtain the elastic tensor of niobium pentoxide from the Materials Project database:

In[23]:= |

Out[23]= |

Available elastic property plots:

In[24]:= |

Out[24]= |

Plot spatial dependencies:

In[25]:= |

Out[25]= |

End session:

In[26]:= |

Currently available elastic properties:

In[27]:= |

Out[27]= |

A mapping between the curated property names and the Python-side names:

In[28]:= |

Out[28]= |

Elastic properties that are available in the Materials Project database can be obtained with the resource function MaterialsProjectData:

In[29]:= |

Out[29]= |

On macOS, the installation of the underlying MechElastic Package in the system Python may fail:

In[30]:= |

Out[30]= |

In[31]:= |

Out[32]= |

Use a Python version installed with Homebrew, for instance using pyenv:

In[33]:= |

Out[33]= |

In[34]:= |

Out[34]= |

Some elastic properties are not available from the stiffness matrix alone:

In[35]:= |

In[36]:= |

Out[36]= |

Provide additional structure data to obtain the property:

In[37]:= |

In[38]:= |

In[39]:= |

In[40]:= |

Out[40]= |

- 1.0.0 – 29 June 2021

This work is licensed under a Creative Commons Attribution 4.0 International License