Co-Simulation API: Spindle Valve
This tutorial demonstrates how to use the Simcenter STAR-CCM+ Co-Simulation API (Application Programming Interface), in order to couple a partner program to a Simcenter STAR-CCM+ simulation. The partner simulation models the behavior of a spindle ball valve in response to a multiphase flow.
- The primary Simcenter STAR-CCM+ simulation
- The partner simulation, that is, a Simcenter STAR-CCM+ simulation that represents the partner program.
The partner program sets up and interacts with its Simcenter STAR-CCM+ representation through the Co-Simulation API library.
In this tutorial, you model the flow of water and gas through the opening between the ball and seat of a spindle valve. A numerical code is provided that models the position of the ball in response to the fluid forces. The fluid simulation uses the position data from the ball valve code to move the ball relative to the valve surface.

During the co-simulation, the ball valve code receives traction (pressure plus shear wall stress) from Simcenter STAR-CCM+ and returns the ball displacement. On receiving the ball valve displacements, Simcenter STAR-CCM+ applies the mesh morpher to move the surface of the ball valve in response.