This example describes a low-level test case for the performance of libcosim in terms of accuracy and efficiency . Figure 1 shows a simplified model of a quarter truck with two masses mWheel and mChassis representing the mass of wheel and chassis respectively. Both masses have a single vertical degree of freedom coupled by a linear spring-damper system representing the suspension force and tire force. The ground profile is given as external input.
For co-simulation, three FMUs are generated namely the chassis, wheel and ground. The ground and chassis each have one variable group for connecting to the wheel which has two variable groups that are commutative to those of the ground and chassis. Table 1 shows the connections for these variables. Specifically for this example, the first element in the variable name indicates which fmu it belongs to. The local default parameters used in the model are listed in Table 2.
Table 1: Input and output variables of the quarter truck fmus for connection
| || ||Vertical force from the chassis suspension applied to the wheel|
| || ||Vertical velocity of the wheel sent to the chassis part|
| || ||Vertical force from the truck wheel tyres applied to the ground|
| || ||Ground profile, given as the vertical velocity variation sent to the truck wheel|
Table 2: Local parameters of the quarter truck model
| ||40 kg||Wheel Mass|
| ||400 kg||Chassis Mass|
| ||150000 Nm^-1||Wheel Spring Stiffness|
| ||0 Nsm^-1||Wheel Damper Coefficient|
| ||15000 Nm^-1||Chassis Spring Stiffness|
| ||1000 Nsm^-1||Chassis Damper Coefficient|
The following scenario is performed as example: The system starts from equilibrium state where
zWheel = zChassis = 0. The ground profile is defined as a step function excited by a jump of 0.1m in vertical direction at 1s. Figure 2 below shows the simulation results using the cosim demo app. In the plot the vertical displacements of the wheel and the chassis are displayed.
 Arnold, M., Clauss, C., & Schierz, T. (2014). Error analysis and error estimates for co-simulation in FMI for model exchange and co-simulation V2. 0. In Progress in Differential-Algebraic Equations (pp. 107-125). Springer, Berlin, Heidelberg.