EDEM API Files

EDEM includes the C++ EDEM API v3.9.0 for Contact Models, v2.2.0 for Factories, and v3.9.0 for Particle Body Forces.

You can also continue to use any legacy API from the previous versions of EDEM. For more information about how to use the API, see the API Reference Help included in the EDEM installation folder.

Example source files (which you can use as the basis for writing your own UDLs) are available from the customer section of Altair's website. Header files containing the details of each available function are available at the following location: Install Directory EDEM > src > Api.

The following tables provide an overview of EDEM’s API source file location and files.

API Directories

Directory Description
src/Api Contains v2.0.0 (and later) API files for contact models, particle body forces, and factories.
src/Api/Help Contains the Online Reference Help.
src/Misc Contains additional files that may be of use when developing UDLs. The Helpers.h file is an updated version of sharedTypes.h from the legacy API.
src/LegacyApi Contains older API files as shipped with the previous version of EDEM.

Core API Header Files

Directory Description
Apilds.h Contains unique ID numbers for all the supported APIs.
ApiTypes.h Contains constants and declarations used by the EDEM generic API.
IApi.h Defines the IApi interface. This is the base interface for all non-UDL APIs.
IApiManager_1_0.h Defines the IApiManager_1_0 interface that provides the ability to allocate and initialize various APIs for use by UDLs.
IApiManager_1_1.h Grants access to a range of API Managers.
IApiManager_1_2.h Grants access to the additional Particle, Material, and Warning Managers.
IApiPluginParameterManager_1_0.h Allows you to specify the EDEM GUI inputs for the UDL.
IApiPluginParameterManager_1_1.h Adds additional GUI options such as tables and combo boxes.
ICustomPropertyDataApi_1_0.h Provides basic access to custom property data and delta values.
ICustomPropertyManagerApi_1_0.h Provides basic access to custom property meta-data for one of four different custom property collections (Particle, Geometry element, Contact, and Simulation).
IFieldApi_1_0.h Defines the IFieldAPI_1_0 interface that provides basic access to field data through a series of query methods.
IFieldManagerApi_1_0.h Provides basic access to the Field Manager via a series of query methods.
IFieldManagerApi_1_1.h Allows you to get the fields by ID or name.
IGeometryManager_1_0.h Provides basic access to the custom properties associated with configured Geometries.
IGeometryManager_1_1.h Enables the custom Geometry property data entries to be reset by the property index instead of by name, and improves the speed of user API code.
IGeometryManagerApi_1_2.h Provides additional access to the configured Geometries mesh coordinates, in addition to the normal custom property access.
IGeometryManagerApi_1_3.h Adds more options for retrieving the Geometry mesh.
IGeometryManagerApi_1_4.h Provides additional access to Geometry indices from the Material and Geometry names.
IMaterialManagerApi_1_0.h Provides basic access to the materials, including their name, particle types, and material properties.
IParticleManagerApi_1_0.h Provides basic access to the particles, and the ability to reset particle custom property values, as well as get and set the size (scale) of the particles.
IParticleManagerApi_1_1.h Provides a function to get the total number of particles of a specified type.
IParticleManagerApi_1_2.h Enables the custom particle property data entries to be reset by the property index instead of by name, and improves the speed of user API code.
IParticleManagerApi_1_3.h Enables the option to mark the External Force model particle for additional CPU processing. Marked particles are removed from the simulation.
IParticleManagerApi_1_4.h Provides the option to retrieve particle type indices.
IParticleManagerApi_1_5.h Provides the option to retrieve material names from particle type indices and all particle types associated with a material.
IParticleManagerApi_1_6.h Provides additional access to particle data such as the surface area, sphericity and length of the particle.
IParticleManagerApi_1_7.h Re-implements the functions to support the new NExternalForceTypesV3_8_0 struct. The new interface also comprises additional functions to access the particle prototype data.
IParticleManagerApi_1_8.h Adds the ability to scale the mass of the particle without increasing its volume.
ISimulationManagerApi_1_0.h Provides access to the simulation properties, enabling them to be reset to a specified value.
ISimulationManagerApi_1_1.h Allows custom simulation property values to be reset by the index instead of by name, and improves the speed of user API code.
ISimulationManagerApi_1_2.h Returns the value of the gravity vector used in the simulation.
ISimulationManagerApi_1_3.h Provides basic access to the configured simulation properties and gravity values.
IWarningManagerApi_1_0.h Provides functionality for custom warnings and error message output.
NCalcForceTypesV3_0_0.h Contains structures used in the calculateForce() function.
NCalcForceTypesV3_4_0.h Adds particle type information to the structure.
NCalcForceTypesV3_8_0.h Adds the moment of inertia and scale information to the struct.
NExternalForceTypesV3_0_0.h Contains structures used in the externalForce() function.
PluginConstants.h Contains constants and declarations used by Contact Model, Particle Body Forces, and Factory UDLs.

Contact Model Header Files

Directory Description
IPluginContactModel.h Defines the IPluginContactModel interface that all Contact Model UDLs versioned interfaces are derive from.
IPluginContactModelV3_9_0.h Defines the IPluginContactModelV3_9_0 versioned interface for contact models. Contains all the main methods for implementation.
PluginContactModelCore.h Core interface for contact models. Implement the methods contained in this interface to enable EDEM to access your UDL.

Particle Body Force Header Files

Directory Description
IPluginParticleBodyForce.h Defines the IPluginParticleBodyForce interface that all Particle Body Force versioned interfaces derive from.
IPluginParticleBodyForceV3_9_0.h Defines the IPluginParticleBodyFroceV3_9_0 versioned interface for particle body forces. Contains all the main methods to implement.
PluginParticleBodyForceCore.h Core interface for Particle Body Force UDLs. Implement the methods contained in this interface to enable EDEM to access your UDL.

Particle Factory Header Files

Directory Description
IPluginParticleFactory.h Defines the PluginParticleFactory UDL interface that all Factory versioned interfaces derive from.
IPluginParticleFactoryV2_1_0.h Defines the IPluginParticleFactoryV2_1_0 versioned interface for factories. Contains all the main methods to implement.
IPluginParticleFactoryV2_2_0.h Allows API factories to be used with the Cylindrical Periodic boundaries.
PluginParticleFactoryCore.h Core interface for factories. Implement the methods contained here to enable EDEM to access your UDL.

Other Header Files

Directory Description
CGenericFileReader.h Provides a generic way to read configuration files. You will also need to compile the CGenericFileReader.cpp file into your UDLs shared library along with other source files.
HelpersV3_0_0.h Includes various utility classes to help with vector and matrix calculations.
HelpersV3_9_0.h This update includes all helpers in sync CUDA API, providing greater parity between the CPU and CUDA API.
Use Example Source files as the basis for writing your own UDLs.