Co-simulation with the Libcosim Library
Generalities
The "Network" and "Shared memory" submodels of this library perform standard co-simulation (i.e. not hybrid). As explained in the Introduction section, this means that each application involved in co-simulation has to be launched separately. In order to exchange values easily with the other applications involved in co-simulation, new submodels have been developed. They are able to get and send values through:
Network (sockets), for remote machines,
Shared Memory, for local co-simulation.
The same approach has been applied to both the submodel that uses shared memory and to the one that uses TCP/IP. Therefore the following explanations are valid for these two submodels:
These submodels make it possible to share values between Simcenter Amesim and a third-party application. "Sharing" means both send and receive one or several variables. Obviously this also works between two Simcenter Amesim models.
These submodels have two modes called "client/server" for socket, and "master/slave" for shared memory. These modes correspond to both sides of the connection and are selected with a parameter of the submodel.
Using these submodels, the two simulations are synchronized: the server (or master) decides on meeting points and then, both server and client (master and slave) exchange data at these dates. Meeting points usually occur every sample time, where sample time is a parameter of the submodel.
Figure 13: Meeting point
The C-functions used by these submodels are grouped in a library so that it is simple to make third-party applications communicate with Simcenter Amesim.
Warning
These submodels must not be used to transfer data within a Simcenter Amesim model. You can use many network or shared memory submodels in the same sketch but attention must be paid to avoid merging slave and master (client and server). A master/slave pair (server/client) may not be present in a single sketch.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.lib-cosim/xid1852529 · retrieved 2026-07-17