LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands
Syntax:
dimension N
N = 2 or 3
Examples:
dimension 2
Description:
Set the dimensionality of the simulation. By default LAMMPS runs 3d simulations. To run a 2d simulation, this command should be used prior to setting up a simulation box via the create_box or read_data commands. Restart files also store this setting.
See the discussion in this section for additional instructions on how to run 2d simulations.
IMPORTANT NOTE: Some models in LAMMPS treat particles as extended
spheres or ellipsoids, as opposed to point particles. In 2d, the
particles will still be spheres or ellipsoids, not circular disks or
ellipses, meaning their moment of inertia will be the same as in 3d.
An exception to this is fix
nve/sphere in conjunction with atom
style granular: In this case, particles will be treated as disks
in 2d.
Restrictions:
This command must be used before the simulation box is defined by a read_data or create_box command.
Related commands:
Default:
dimension 3