Using the EDEM Command Line

The EDEM Command Line has the same flags for both Windows and Linux:

edem.exe -–console –i “input.dem” [processing flags][post-processing flags]

When using EDEM from the command line, the help can be displayed using:

edem.exe -h

Flags will not alter the deck. The simulator will run with the defined parameters from the command line, but will not change the simulator settings defined in the EDEM interface.

Required Flags

Switch Description
-f/-i <string> Input deck

Processing Flags

The processing flags set the simulator options such as simulation time, Time Step, and number of processors. You can also specify the license server to use from the command line. If you do not specify any processing flags, the value stored in the simulation deck will be used. If there is no value saved in the simulation deck then the default value will be used.

Switch Description
-c/--console/--script Run EDEM  in console-only mode
-r/--run-time <double> Total run time, default value = 1
-w/--write-out <double> Write out interval, default value = 1e-05
-g/--cell-size <double> Grid cell size (R min), default value = 2
-t/--time-step <double> Time step, default value is 1.0e-06. Set to 0 to enable auto Time Step.
-p/--processors <int> Number of processors, default value = 1
-R/--rewind Rewind the simulation to the beginning
--particle-properties Recalculate the particle properties for all materials
-E/--engine [0|1|2] 0=CPU Solver, 1=GPU OpenCL Solver, 2=GPU CUDA Solver. Default is 0.
-D --device [0|1|...] Device index. + can be used for multi-device, such as 0+1.
--particle-properties Recalculates the particle properties (mass/inertia) for all materials. Applicable if particle properties have been modified by an external program.
-n/--steps-total <int> Run the simulation for given number of steps.
--dyn [0|1] Enable the dynamic domain. See example.
--dyn-interval <double> Set the dynamic domain check interval. Default value is 0.1 s.
--dyn-check <int> Set the dynamic domain number of checks. Default value is 3.
--dyn-disp <double> Set the dynamic domain particle displacement. Default value is 10% of R min.
--gpu-split <string> Set GPU splitting axis. Default value is X.
--wait-license-key Wait for license keys until they are available
--simExport Export data per write out interval. Must match name of Text Export within configuration file.
--compress-data Run the simulation with compressed data turned on/off0=Disable or 1=Enable data compression. Default is machine compression setting unless already set in simulation.
--acd Run the simulation with alternative contact detection method on/off0=Disable or 1=Enable alternative contact detection on GPU. Default is off unless already set in simulation.
--precision Change the solver precision. 0=Double, 1=Single precision, 2=Hybrid.
--fma Enable FMA optimizations for GPU solvers. 0=Disabled 1=Enabled.


Post-Processing Flags

Use the post-processing flags to specify data export parameters. You can either specify the type of data to export (all, particle, geometry, and so on) or specify your simulation’s configuration file.

If you want to export data from the command line, first select File > Export > Results Data from the Analyst to set the path and filename to export to and the queries required.

Switch Description
-e/--export [A|P|G|C|K] <string> Type of data to export and filename (.csv)A - Export all data P - Export particle data G - Export geometryequipment part data C - Export contact data K - Export collision data.
See example.
-e <string> Filename of EDEM BulkSim .dfg file which specifies data to export.


Miscellaneous Flags

EDEM contains additional flags which can be useful in certain situations.


Switch Description
-?/-h/--help Display options.
-v/--version Display versions.
--no-free <Windows> Do not free EDEM BulkSim from console in GUI mode.
--file-logger <string> Print all output logs to file.
--server-dialog Show server selection dialog.
-S/--server <string> Set the license server to the specified string. This is instance specific-it will not update the default license server.
--cs Enable the EDEM coupling server.
--auto-grid Enable Auto Grid resizing.
--wait Prevents connection clean-up after coupled simulation.
-L/--legacy-display Use legacy graphics.
-s/--sim Open EDEM in ‘Simulator Only’ mode.
-convert <string> Converted simulation deck destination.
--rg Replace geometry. See example.

Stopping Command Line Simulations

A command line simulation will run until the simulation end time is reached, either set in the Simulator or via the -t flag.  

In addition users can stop a command line simulation by creating a <simulation_name>.dem.stop file in the same folder as the simulation_name.dem file.

(c) 2023 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support