47.1.4.4. RecurDyn/SPI

RecurDyn Linux solver has an ability to co-simulate with particle solvers using SPI. To run co-simulation with particle solver, the Environment Variable for SPI must be set. Then RecurDyn Linux solver can find the SO library file for a particle solver.

Requirements for a particle solver to co-simulate with RecurDyn in Linux

To run the particle solver in RecurDyn, two settings are needed.

  • Setting SPI Coupling SO Library File: The SPI coupling SO library file acts as a communication channel between RecurDyn and the particle solver. RecurDyn loads the SO file when a co-simulation starts.

  • Setting Environment Variable for SPI: The environment variable for SPI tells RecurDyn solver the location of the particle solver coupling SO library file.

There are two methods to use SPI in the standalone solver as bellow. The particle solver can be used choosing one of the two methods.

Setting the path of Particle solver using the OPT File

Particle solver can be set using the OPT file provided by the particle solver program.

  • OPT file Path : <ParticleworksInstallPath>\share\recurdyn\Particleworks.opt

  • It can be used by changing the SO file path inside the opt file.

Environment Variable for SPI ** - **Key: SPI_PATH_[Name]

  • where [Name] is the same as the value of the <Name></Name> element in XML configuration file.

  • Value: <Coupling SO library file path>

    • The path of the coupling SO library file, including the complete file name.

    • The path must be absolute.

  • For example:

    • Name element in XML configuration file: <Name>ParticleSolver</Name>

    • Command Line: export SPI_PATH_ParticleSolver=/opt/ParticleTest/ParticleSolverLibrary.so

To run a RecurDyn SPI model in Linux

  1. A model must first be created in the RecurDyn/GUI in Windows. Please refer to the RecurDyn Manual for SPI for a general overview of co-simulation between RecurDyn and particle solvers.

  2. In order to generate the RecurDyn solver data input file, the co-simulation with the particle solver must be started in the Windows version of RecurDyn.

  3. The user must copy the RecurDyn solver and particle solver data input file to the Linux system.

  4. The user adds the environment variable for SPI on the Linux additionally. If the linux SO file needs some dependency files, then the user should set the path of dependencies to the environment variable the LD_LIBRARY_PATH. The “ldd SO_File” command shows dependencies.

    • For example:

    • The EDEM Linux SO file needs some dependencies, which are in the “bin” and “lib” directories in the EDEM installed path. Therefore, the user needs to set the following 3 lines.

    • Command Line: export PATH=EDEM_INSTALL_PATH/altair/EDEM/bin:$PATH

    • Command Line: export LD_LIBRARY_PATH=EDEM_INSTALL_PATH/altair/EDEM/lib:EDEM_INSTALL_PATH/altair/EDEM/bin:$LD_LIBRARY_PATH

    • Command Line: export SPI_PATH_EDEM=EDEM_INSTALL_PATH/altair/EDEM/lib/libEDEMRecurDynCouplingClient1.so

  5. Then the RecurDyn Linux solver can execute the simulation using the data file as input.