Creating the Input Mesh File for the Partner Code

Extract the spindle ball boundary surface to use as the input surface mesh in the partner code.

In this tutorial, the partner numerical code that solves for the ball position reads input mesh files with .stl coded format. You create this surface mesh by exporting the spindle ball boundary from the fluid simulation.
  1. In your working directory, create a new folder named CoSimAPI_Mesh.
  2. In your simulation, right-click the Representations > Volume Mesh node and select Extract Boundary Surface...
  3. In the Extract Boundary Surface dialog, click OK.
  4. Expand the Representations > Extracted Surface > Regions > Spindle Valve Fluid > Boundaries node.
  5. Right-click the spindleball node and select Export Boundaries...
  6. In the Save dialog:
    1. Navigate to CoSimAPI_Mesh.
    2. Set Files of Type to Stereolithography File (*.stl).
    3. Click Save.
  7. In the STL Export Options dialog, set File Type to Coded and click OK.
  8. Save the simulation.