Plastic strain in MD simulation

This post provides the approach to extract the plastic strain in MD simulation. We can compute the atom displacement as the trajectory from the MD simulation, but the strain is the concept in continuum mechanics, it is really hard to compute the tensor in a discrete system. Recently, some tools provide this function based on a theory that accounting the effects of the neighbor atoms. While considering the relative displacement with the neighbor atom and using the weight function, the deformation gradient tensor can be calculated. Therefore, the strain tensor is obtained. Plastic strain can be expressed as,

$$\boldsymbol{\varepsilon}^p  = \boldsymbol{\varepsilon} – \boldsymbol{\varepsilon}^e $$

so two strain tensor should be generated in the simulation data: total strain tensor $\boldsymbol{\varepsilon}$ and the elastic strain tensor $\boldsymbol{\varepsilon}^e$. Obviously, LAMMPS data file does not provide such information. Here I use the OVITO to get this data.

OVITO provide two modifiers, the first one is the “Atomic strain” and the second one is the “Elastic strain calculation”. Both of them provide the deformation gradient tensor and the strain tensor data. But I found there are some bugs for strain tensor output in OVITO, so I use the deformation gradient tensor data and computing the strain tensor with a Python script.

(more…)

Add a 3D convex hull in ABAQUS

Convex hull is the smallest envelope that contains the points set. It is used to construct the grain in grain-based model. There are several methods to generate the convex hull data, but it may need some efforts if you want to put it into ABAQUS model. Here, I post a simple method which is suitable for programming.

Generate convex hull data

Several methods can be used to generate the convex hull data. I am used to generate the convex hull data with my own code. But if you do not like write code, you can use Mathematica or Matlab to generate the data.

For example, in Mathematica, you can use following code to generate a 3D convex hull:

pts = RandomReal[{-1, 1}, {20, 3}];
ConvexHullMesh[pts]

(more…)

A example of MD simulation

This is a homework of computational nanomechanics. The basic requirement is to use the Lagrangian function to describe the motion of particles. In homework, it requires 5 particles. As an enhancement, I rewrote the code with Qt and use GNU Scientific Library(GSL) to finish the task.

Concept

The Lagrangian equation of motion describe the particle motion with energy method, the equation is:

$$ \displaystyle \frac{d}{dt}\frac{\partial L}{\partial \dot{x}_k}-\frac{\partial L}{\partial x_k}=0$$

$ L$ is the Lagrangian function of the system, $ k$ denotes the degree of freedom.

$$ \displaystyle L = T – U$$

$ T$ is the kinetic energy and $ U$ is the potential energy.

(more…)