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 “lammps.case” 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 : https://sites.google.com/a/ensight.com/user_defined_tools/lammps-translation
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: firstname.lastname@example.org).