LAMMPS DEM Particles into EnSight

Recently, a user inquired about the ability to read in Discrete Element Model (DEM) data from the LAMMPS program. EnSight has many features used to visualize and analyze DEM particles from other solvers. With a quick look at their format, along with the ability to utilize Python to write a small translation routine, there is a new translation script available here to work with LAMMPS datasets.

This Python routine takes a particular LAMMPS output file containing DEM particles, denoted with a “.dat” extension, and converts this dataset into EnSight Format. The single part in EnSight contains only points (and point elements) representing the DEM particles. The routine will also convert the variable information provided within the .dat file into nodal variables. This routine does not have a lot of testing, but seems to work fairly straight forward.
(1) The provided .dat file is ASCII
(2) Variable names used within the .dat file are provided at the top of the file
(3) Columns 1,2,3 contain the X,Y,Z positions of the particles.
(4) Timestep information is provided in the “Zone” field.

After using the tool to convert the dataset, the user will have an “ensight_files” directory containing the converted information. The user can subsequently just load the “” file within the “ensight_files” directory directly to read the data in (there is no need to convert the data each time). The Tool writes command language back into the Journal File, so that recovery and utilization of the Journal File for scripting is still valid.

Help for this tool is provided from the “Help” button straight in the tool’s GUI, or via the Tool Help in the User Defined Tool Window. Help can b found here :

The current version of the Tool is version 2.0 from September 18, 2012

Any issues or problems should be reported back here, to CEI, or the author (Kevin Colburn:

Download LAMMPS Conversion Tool here

Data translator: Nastran RMS to EnSight Case Gold

The script reads a Nastran .bdf input file and .rms variable files and converts them to a single EnSight case. The .rms files contain displacement and acceleration data (R, T, R0, and T0).

Download the script (2011-6-1)

Current state is usable but requires manual editing: the user must edit the file names and paths in the python script. It has not been polished and has only been tested on a small number of datasets. A fair amount of performance optimization has been done and the script has been used to translate models of over 1 million nodes in reasonable time.

This script was created for an aerospace customer in China. A version of the script is in use by the customer.



Load .bdf input file using EnSight’s Nastran input reader; export geometry to case format; read variable data from ascii .rms file(s); export variables to case format using the enout API; modify the case file to merge the geometry and variables into a single case.


EnSight versions: 9.2
OS: all