ASCII File Results Provider

This example illustrates how to develop a results provider that reads an ASCII results file generated from a Simpack analysis.

You learn how to:

  • Use the SIMULIA Co-Simulation Services API to develop a results provider that reads an ASCII data file.
  • Compile and link your results provider with SIMULIA Co-Simulation Services.
  • Import external fields into an Abaqus analysis.
  • Generate the configuration and specification files.
  • Run a sequential analysis.

This page discusses:

Problem Description

This example is adapted from the Simpack tutorial on flexible bodies using co-simulation (see SIMPACK_Tutorial_flex_abaqcosim.zip on the Simpack media). You do not need Simpack because we provide the generated results file with this example.

The Simpack model consists of an automotive front axle with a flexible control arm as shown in Figure 1. During the first 0.25 sec, the front axle is accelerated to a velocity of 10 m/sec, and then the speed is kept constant.

Figure 1. Simpack model and detail showing location where fields are transferred.

We perform a detailed finite element analysis of the control arm, where displacements and rotations of the left control arm computed by Simpack are imported and applied at three discrete locations shown in Figure 2. The imported displacement and rotation are applied using distributing constraints in Abaqus.

Figure 2. Abaqus model of control arm.

Compiling the Results Provider

If you have not already done so, extract the SIMULIA Co-Simulation Services API kit as described in Extracting the SIMULIA Co-Simulation Services API Kit. The compiler needs access to the SIMULIA Co-Simulation Services header files. Typical compile options for MBDControlArm_Reader.cpp are as follows (see Compiling your Application with SIMULIA Co-Simulation Services):

On Windows:

cl /c /W0 /MD /TP /I<location of CSS header files> MBDControlArm_Reader.cpp

On Linux:

g++ -c -fPIC -w -Wno-deprecated -I <location of CSS header files> MBDControlArm_Reader.cpp

Linking the Results Provider

Depending on how you load the dynamic libraries, the linker might need access to the SIMULIA Co-Simulation Services dynamic libraries. Typical link options for MBDControlArm_Reader are as follows (see Linking the SIMULIA Co-Simulation Services to Your Application):

On Windows:

link /nologo /INCREMENTAL:NO /subsystem:console /machine:AMD64 /STACK:20000000 /NODEFAULTLIB:LIBC.LIB /DEFAULTLIB:kernel32.lib /DEFAULTLIB:user32.lib /DEFAULTLIB:advapi32.lib /FIXED:NO /LARGEADDRESSAWARE /out:.\MBDControlArm_Reader.exe .\MBDControlArm_Reader.obj /LIBPATH:<location of CSS .dll> ABQSMACseModules.lib msvcrt.lib

On Linux:

g++ -fPIC -Wl,-Bdynamic -Wl,--add-needed -o MBDControlArm_Reader ./MBDControlArm_Reader.o -L<path to CSS .so> -lABQSMACseModules

Executing the Sequential Simulation

The results provider and the SIMULIA Co-Simulation Services Director are started from the Abaqus execution procedure; therefore, you only need to run the Abaqus job. The configuration and results specification file are generated by the Abaqus preprocessor.

abaqus -job MBDControlArm_Abaqus

When starting the processes manually, we recommend that you run all processes in separate command shells during the development and debugging stages. First, obtain the configuration and specification files by running a datacheck analysis:

abaqus -job MBDControlArm_Abaqus -datacheck

Then, start the three processes in separate command shells:

  • Start the Abaqus job by providing the -csedirector command line argument. You should wait until the Abaqus preprocessor completes because it might overwrite the existing configuration and specification files.

    abaqus -job MBDControlArm_Abaqus -csedirector venus:93000 -int

  • Start the MBDControlArm Results Provider.

    MBDControlArm_Reader -job MBDControlArm_Simpack -file MBDControlArm_Simpack.dat -spec MBDControlArm_Simpack_spec.xml -csedirector venus:93000 -timeout 300

  • Start the SIMULIA Co-Simulation Services Director process

    abaqus -cse -job MBDControlArm_Abaqus_css -configure MBDControlArm_Abaqus_config.xml -listenerport 93000 -timeout 300

Results

This example illustrates how to write a results provider to read an ASCII data file. In this case the data file is a Simpack report file. Figure 3 and Figure 4 show the deformation and stresses, respectively, of the control arm under the imposed loading at time=1.0.

Figure 3. Abaqus deformation contour of control arm.

Figure 4. Abaqus stress contour of control arm.

Files

The C++ code for the results provider, the Abaqus input file, and the Simpack report file are available in the examples/ folder in the SIMULIA Co-Simulation Services API kit. If you have Abaqus installed, you can use the abaqus fetch execution procedure to obtain the files.

MBDControlArm_Reader.cpp
C++ code for the Results Provider.
MBDControlArm_Abaqus.inp
Abaqus input file for the control arm.
MBDControlArm_Simpack.dat
Results report file generated from the Simpack analysis containing deformation and rotation at three discrete locations.