0% found this document useful (0 votes)
2 views

RecurDyn CosimulationManual

The RecurDyn Co-simulation Manual provides detailed instructions for installing co-simulation modules and procedures for both Windows and Linux environments. It covers prerequisites, interface requirements, and step-by-step processes for setting up and executing co-simulations, including how to resume simulations. The manual also includes notes on specific configurations and troubleshooting tips for effective co-simulation operations.

Uploaded by

040520349
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

RecurDyn CosimulationManual

The RecurDyn Co-simulation Manual provides detailed instructions for installing co-simulation modules and procedures for both Windows and Linux environments. It covers prerequisites, interface requirements, and step-by-step processes for setting up and executing co-simulations, including how to resume simulations. The manual also includes notes on specific configurations and troubleshooting tips for effective co-simulation operations.

Uploaded by

040520349
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

RecurDyn Co-simulation Manual

Release 8.0.0

Prometech Software, Inc.

Jun 05, 2023


CONTENTS

1 Installation of the Co-simulation Modules 1


1.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Co-simulation Procedures 5
2.1 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Linux (using MPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Resuming Co-simulations 15
3.1 Preparation for Resuming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Resuming Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.1 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

i
ii
CHAPTER

ONE

INSTALLATION OF THE CO-SIMULATION MODULES

1.1 Prerequisites

You need to install the following software beforehand. See their respective install guides for details of instal-
lation.
• Particleworks/Granuleworks
• RecurDyn

1.2 Interfaces

You can run a co-simulation with RecurDyn using the following interface.
• Uses RecurDyn External SPI (Standard Particle Interface) for co-simulation.
• Imports/exports geometries via Wall (.wall) files.
• Requires the additional installation of the interface, which corresponds to External SPI.

1.3 Windows

The following is an installation method when the SPI (Standard Particle Interface) is used (using Wall).
1. Copy one of the following .xml files in the folder where Particleworks/Granuleworks installed
(e.g., C:\Prometech\Particleworks_version_yymmdd\share\recurdyn) to the Bin\Solver\
CoSim\StdParticleInterface folder within the RecurDyn installation folder.
• Particleworks_V9R3.xml
– Use this file for versions before RecurDyn V9R4.
– This file is also available in RecurDyn V9R4 and later versions.
• Particleworks_V9R4.xml
– This file is available in RecurDyn V9R4 and later versions.

1
RecurDyn Co-simulation Manual, Release 8.0.0

– This allows you to see each component of the force that the fluid particles exert on the
polygon.
• Particleworks_V9R5.xml
– This file is available in RecurDyn V9R5 and later versions.
– This allows you to analyze the thermal interaction between the fluid and the flexible body.
2. Make sure Path in the .xml file is bin\Particleworks.dll. Otherwise, correct it.

• <Path>C:\Prometech\Particleworks_{version}_{yymmdd}\bin\Particleworks.
˓→dll</Path>

Note:
Example: If the RecurDyn installation folder is:
C:\Program Files\FunctionBay, Inc\RecurDyn V9R3
copy the files into the following folder:
C:\Program Files\FunctionBay, Inc\RecurDyn
V9R3\Bin\Solver\CoSim\StdParticleInterface

Note:
If there are two or more .xml files in the Bin\Solver\CoSim\StdParticleInterface folder, the
co-simulation may not work correctly. Copy only the file that you use.

1.4 Linux

The following is an installation method when the SPI (Standard Particle Interface) is used (using Wall).
1. Copy the following file in /path /to/particleworks/share/recurdyn to the CoSim/
StdParticleInterface directory within the directory where RecurDyn is installed (e.g.,
/opt/functionbay/).
• Particleworks.opt
2. Edit the Particleworks.opt file to change SOPATH to lib/libParticleworks.so in the Parti-
cleworks/Granuleworks installation directory.

• SOPATH='/path/to/particleworks/lib/libParticleworks.so'

Note:
Example: If the RecurDyn installation directory is:
/opt/functionbay

2 Chapter 1. Installation of the Co-simulation Modules


RecurDyn Co-simulation Manual, Release 8.0.0

copy the files into the following directory:


/opt/functionbay/CoSim/StdParticleInterface

Note:
On V9R3 (or later), you can set the path to the lib/libParticleworks.so to the environment variable
SPI_PATH_Particleworks instead of using the opt file.
Example: export
SPI_PATH_Particleworks='/path/to/particleworks/lib/libParticleworks.so'

1.5 Notes

• To migrate from the old interface to the SPI on V9R2 or later, remove the .dll/.so files copied in the
installation procedure for the old interface and restore the overwritten files.

1.5. Notes 3
RecurDyn Co-simulation Manual, Release 8.0.0

4 Chapter 1. Installation of the Co-simulation Modules


CHAPTER

TWO

CO-SIMULATION PROCEDURES

2.1 Windows

Note:
• On Windows, RecurDyn co-simulation is only available in a single node environment.
• For notes on the names and paths of co-simulation related files, see Notes.

1. Create a new project in Particleworks/Granuleworks.


2. Save the project file of RecurDyn (*.rdyn) to the scene folder of Particleworks/Granuleworks.
3. Export model files in RecurDyn, then import them in Particleworks/Granuleworks.
a. When Walls are exported from RecurDyn, a *.wall file is generated in the scene folder. The
name of the *.wall file is rd_pw.wall by default.
b. Import the generated *.wall file to the Particleworks/Granuleworks project.

c. The unit of geometry files exported with the .wall file is fixed to the meter. If you change length
unit in Particleworks/Granuleworks, imported geometries change their size in the 3D view.
4. Perform the preprocessing according to the Particleworks/Granuleworks user manual or the tutorial.

5
RecurDyn Co-simulation Manual, Release 8.0.0

• When you conduct the flexible body co-simulation, the following settings on Particleworks are
necessary for the flexible body polygons represented by 2-D shells.
– In the Property window > Details, enable Double-sided DF.
– Set Thickness of Polygon to the small value (e.g., 0.1).
• These settings are needed to remove the generated particles which interfere with the 2-D shell in
preprocessing. They have no effect on the co-simulation.
• The flexible body co-simulation is available since V9R3.

5. Create setting files for the co-simulation as below.


• Click the Run button to open the Run dialog. In the Execution tab > Run mode, select either
Simulation or Preprocess & Simulation.
• Enter the number of CPU cores used for the simulation. When calculating with GPU, select the
GPU to be used. (Only one GPU can be selected.) Select the precision of the calculation.
• Open the Simulation exec. tab and select the Close without running simulation option. Click
the Execute button to generate the setting files for co-simulation.
6. Launch RecurDyn and perform the dynamic analysis.
7. After the co-simulation, choose Animation > Show result motion on the menu bar to play the ani-
mation of the results by Particleworks/Granuleworks. Choose Animation > Show input motion to
restore to the original condition.

6 Chapter 2. Co-simulation Procedures


RecurDyn Co-simulation Manual, Release 8.0.0

8. When a co-simulation is conducted from a command line, the animations of polygons are sometimes
not reflected in Particleworks/Granuleworks. In this case, choose Animation > Sync. result motions
on the menu bar.

9. To apply RecurDyn motions to Post objects (e.g., probe) in the Outline window, select Tools > Set-
tings > Animation > Use motions written by Solver in Postprocess.
• This operation enables the appearance of a Post object (e.g., a frame of the Probe region) to
follow the RecurDyn motion.
• The calculation of postprocessing itself correctly treats the RecurDyn motion regardless of this
operation.

2.1. Windows 7
RecurDyn Co-simulation Manual, Release 8.0.0

2.2 Linux (using MPI)

Note:
• On Linux, MPI is necessary for a RecurDyn co-simulation.
• Flexible body calculations are only available in a single node environment.
• For notes on the names and paths of co-simulation related files, see Notes.

Copy a project created on Windows to a Linux machine, then run the co-simulation.
1. Do the procedures 1-5 in the co-simulation procedures on Windows.
2. In the Projects window, open Models and right-click the geometry file (e.g., .obj) and select Switch
path to change the file path of the geometry to a relative one. Alternatively, select Import to import
the geometry file to the project.

8 Chapter 2. Co-simulation Procedures


RecurDyn Co-simulation Manual, Release 8.0.0

3. Launch RecurDyn and open the .rdyn file in the scene folder of Particleworks/Granuleworks.
4. Do the following procedures to create the .rmd file.
• Click the File button and select Export.
• Move to the scene folder of Particleworks/Granuleworks in the Export dialog.
• In the File name, type Model1.rmd.
• In the Save as type, select RecurDyn Solver Data File (*.rmd).
• Click the Save button.

2.2. Linux (using MPI) 9


RecurDyn Co-simulation Manual, Release 8.0.0

5. Do the following procedures to create the .rss file.


• Click the Scenario button in the Analysis tab.
• In the Endtime, type the end time of the RecurDyn dynamic analysis.
• In the Step, type the number of frames of the RecurDyn dynamic analysis.
• Click the Create button.
• Click the Load button.
• Click the Export button.
• Move to the scene folder of Particleworks/Granuleworks in the Save As dialog.
• In the File name, type Model1.rss.
• In the Save as type, select RecurDyn Scenario File (*.rss).
• Click the Save button.
• Click the OK button.

10 Chapter 2. Co-simulation Procedures


RecurDyn Co-simulation Manual, Release 8.0.0

6. Copy the project folder to the Linux machine where the co-simulation conducted.
7. Log in to the Linux machine.
8. Run the co-simulation. The command varies by the precision or the used devices (CPU/GPU). For
details of the command line, see the Particleworks/Granuleworks user manual.
• Example) CPU solver, double precision, using Model1.rmd and Model.rss

– $ mpirun -np 2 /path/to/particleworks/bin/app.solver.double -k␣


˓→simd -p /path/to/scene -f /path/to/scene/result/sub.json -n 4 -

˓→-inter_proc_cmd="/path/to/recurdyn/rdsolver Model1 Model1"

• Example) GPU solver (with GPU 0 and 1), single precision, using Model1.rmd and
Model.rss
– $ mpirun -np 2 /path/to/particleworks/bin/app.solver.float -k␣
˓→cuda -g 0 -g 1 -p /path/to/scene -f /path/to/scene/result/sub.

˓→json -n 4 --inter_proc_cmd="/path/to/recurdyn/rdsolver Model1␣

˓→Model1"

2.2. Linux (using MPI) 11


RecurDyn Co-simulation Manual, Release 8.0.0

app.solver.<precision>
• The solver executive.
• app.sovler.float for single precision.
• app.sovler.float for single precision.

-np <processes> The number of processes.


-n <threads> The number of threads.
/path/to/particleworks The installation directory of Particle-
works/Granuleworks.
/path/to/recurdyn The installation directory of RecurDyn.
/path/to/scene The scene directory where co-simulation will
run.
-k <kernel>
• simd for the CPU solver.
• cuda for the GPU solver.

-g <GPU ID>
• The ID of GPU to use.
• You need as many -g options as the num-
ber of GPUs to use.

--inter_proc_cmd="<rdsolver> <rmd>
• <rdsolver> : The path of rdsolver, the
<rss>"
RecurDyn solver executive.
• <rmd> : The filename of .rmd without the
extension, which you made in the proce-
dure 4.
• <rss> : The filename of .rss without the
extension, which you made in the proce-
dure 5.

9. See the co-simulation procedures on Windows to visualize the result.

2.3 Notes

• Do not use any multibyte characters or Japanese characters in the following filenames and paths:
– The project folder and the scene folder of Particleworks/Granuleworks
– Walls exported from RecurDyn
– .rdyn, .rmd, and .rss files output by RecurDyn
• Do not change the locations of Walls exported from RecurDyn on Particleworks/Granuleworks.
• When running the coupled thermal analysis, the amount of heat the fluid particles receive from the
flexible body is calculated from the parameters defined in Particleworks (density, thermal conduc-
tivity, specific heat, and control parameter fλ) and the temperature of the flexible body calculated in
RecurDyn.

12 Chapter 2. Co-simulation Procedures


RecurDyn Co-simulation Manual, Release 8.0.0

• The coupled thermal analysis does not support powders.

2.3. Notes 13
RecurDyn Co-simulation Manual, Release 8.0.0

14 Chapter 2. Co-simulation Procedures


CHAPTER

THREE

RESUMING CO-SIMULATIONS

Note: In this chapter, we explain the settings for resuming co-simulations using RecurDyn V9R3 GUI as
an example. In other versions of RecurDyn, setting items may be different.

You can restart co-simulations using the initial condition file (ICF, .icf) of RecurDyn. See the RecurDyn
help for details.

3.1 Preparation for Resuming

If there is a possibility of resuming the co-simulation, you need additional settings to output the ICFs of
RecurDyn before you start the co-simulation. For ICF output settings in the RecurDyn GUI, go to Analysis
tab > Simulation Type > Dyn/Kin > Initial Condition tab > Create Initial Condition File (*.icf).
You need to enable the Create on Report Step option for resuming co-simulations.
• Most Recent : ICF is output only in the final result output step.
• All : ICFs are sequentially output for each result output step.

15
RecurDyn Co-simulation Manual, Release 8.0.0

3.2 Resuming Procedures

3.2.1 Windows

Common
Before the resuming, set the ICF to be used in Analysis tab > Simulation Type > Dyn/Kin > Initial Con-
dition tab > Use Initial Condition File (*.icf).

3.2.2 Linux

The resuming method depends on the ICF output setting that you set in Preparation for Resuming.
Most Recent
Add the --restart=<restart_frame> option to the executed command where <restart_frame> is the
frame number at which the resumed calculation starts. Note that this frame must be the final frame of the
previous simulation.
Example)

--restart=26

All
Add the --restart_icf=<ICF path> option to the executed command where <ICF path> is the path of
the ICF used for the resumed calculation. <ICF path> should be an absolute path or a relative path from
the scene folder. This option only supports ICFs whose filenames include time information as in the example
below.

16 Chapter 3. Resuming Co-simulations


RecurDyn Co-simulation Manual, Release 8.0.0

Example)

--restart_icf="_ICF_Model1/00000026_2.500000e-01.icf"

3.3 Notes

• When a co-simulation is resumed, the restart time (frame) of RecurDyn and that of Particle-
works/Granuleworks must be the same. If the times (frames) are not the same, the resumed calculation
maybe yields wrong results.

3.3. Notes 17

You might also like