**Written by: Xiaoran Han – Project Engineer**

This blog article shows how to replace physical translational, rotational flanges, fluid ports and thermal ports using real input and real output connectors. The technique can be useful when splitting the model is required in order for the model to run on other platforms with external controllers, for example compiled FMU (Functional Mockup Unit) of a Dymola model running in Simulink coupled to a Simulink controller. In another case splitting a single model into several FMUs may be required so that the model can be run with multi-core processor.

**Splitting translational mechanics flange connections**

The following model is a spring mass oscillator. Figure 1 and 2 show a model connected by translational flanges and a model connected by real I/O. The model can thus be split with `mass1’ having three outputs from position speed and acceleration sensors and an input of reaction force from `force’, and with `spring1’ having three inputs of position speed and acceleration into the `move’ components and an output of reaction force from `forceSensor’. All components are from Modelica standard library. Figure 3 shows simulation results from both non-split and split models are the same. With regards to simulation time the two models are identical.

Figure 1: Mass spring oscillator connected using translational flanges

Figure 2: Mass spring oscillator connected using real I/Os

Figure 3: Oscillation of mass1 of non-split and split model

**Splitting rotational mechanics flange connections**

An engine model running with a load is shown in Figure 4. Figure 5 shows rotational flanges are split using `torqueToAngleAdaptor’ and `angleToTorqueAdaptor’. Figure 6 shows the same result for non-split and split models. The two models have identical simulation time with identical number of linear systems of equations. All components are from Modelica Standard library.

Figure 4: Engine model with rotational flange

Figure 5: Engine model with split rotational flange

Figure 6: Load speed of non-split and split model

**Splitting fluid port connections**

A pipe model is used to demonstrate splitting the model. Figure 7 shows two orifices and a volume model are placed between a source and a sink. To split between source and orifice at the top of the plot a mass flow source and a volume source can be inserted in sequence, in order to follow staggered grid approach to improve simulation time (Claytex blog post: ‘How to avoid computationally expensive fluid networks in Dymola). This is possible via use of massFlowSource_h (boundary1) and boundary_ph (boundary) from Modelica library as seen in Figure 8. To split between an orifice and a volume, figure 9 shows a volume and a mass flow source are added in sequence. Figure 10 shows enthalpy of Volume model and mass flow rate of orifice2 of non-split and split models. With regard to simulation time, all three models take identical CPU time to simulate, despite additional mass flow source and pressure source in split model. The translated models have the same number of linear system of equations for both non-split and split models, where state selection for the models are the same.

Figure 7: Pipe model connected using fluid port

Figure 8: Pipe model split between a volume and an orifice

Figure 9: Pipe model split between an orifice and a volume

Figure 10: Enthalpy of Volume and mass flow rate of orifice2 of non-split and split models

**Splitting thermal port connections**

Figure 11 and 12 show a thermal model of a motor (an example from Modelica standard library) and a split thermal model of motor. A plot of the temperature sensor reading of both models is shown in Figure 13. CPU time and state selection are the same for both models.

Figure 11: A thermal model of motor

Figure 12: A split thermal model of motor

Figure 13: Plot of temperature sensor reading for non-split and split thermal model of motor

This blog article summarises techniques for splitting mechanical, fluid and thermal connections. These techniques have been used for splitting an engine model in an application to run split engine models with several FMUs in a multi-core processor.

**Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.**