[lammps-users] Calculating strain energy

Dear Lammps users
I’m modeling a tensile test on CNT reinforced Aluminum alloy nanocomposite
I would like to calculate the strain energy in the system using the command PE_strain[1]
The fix that I’m using to apply a strain rate on the longitudinal direction of the cylindrical unit cell is as follows

fix 1 all nvt temp 300 300 $(100.0*dt)

variable strate equal 1e-4

fix 2 all deform 1 z erate ${strate} units box remap x

My question is how I can output the strain energy using the command PE_strain [1]


There is no command PE_strain or PE_strain[1] in LAMMPS.

Is there is a way of outputting the strain energy in Lammps?

The PE_strain that I meant is the one mentioned under the fix npt/nvt command


Yes there is a way and it is described in the “Restart, fix_modify, output, run start/stop, minimize info” section & in section “8.3.1. Output from LAMMPS” of the manual.

You can use the notation f_{name of your fix npt command}[{appropriate integer index based on how many ndof and thermostats/barostat chain you have used}] and output the value using the “thermo_style custom …” command.


Στις Δευτέρα, 6 Σεπτεμβρίου 2021, ο χρήστης isra muscati <[email protected]> έγραψε:


That strain energy is not the strain energy you are looking for but the strain energy generated by using a variable cell integrator like fix npt or fix nph.

To know what you need to output with LAMMPS you first need to describe what the strain energy you are looking for is in general.
Then people experienced with using LAMMPS can tell you what property to extract. Most likely you need to do some post processing.