Component Instances

Component instances define the subsystem models participating in the coupled simulation.

This page discusses:

The <componentInstances>> wrapper element defines the subsystem models (that is, the analysis jobs) participating in the coupled simulation. Use the <componentInstance> element to define an individual subsystem model.

<componentInstance> Element

Use the <componentInstance> element to define each subsystem model in the coupled simulation.

The name attribute is an internal reference, for cross-referencing purposes within the Co-Simulation Configuration file. The <component> element references the component instance to a component by its name.

Set the modelIdentifier attribute on each <componentInstance> element equal to the job name or the FMU file name (without its extension). The job name must correspond to the job name the application registers with the SMACseConnect function (see Establishing connection to and disconnecting from the SIMULIA Co-Simulation Services Director).

If the component instance uses the bottom-up implementation, certain basic assertions about the simulator behaviors can be modified:

  • You can use the <initialConditions> element to specify how the initial conditions exchange is performed by the subsystem models.

    By default, each subsystem model sends initial fields when the SMACseInitialConditionStart function is called and receives initial conditions when the SMACseInitialConditionEnd function is called.

    In some cases, a subsystem might require the initial condition from another subsystem to compute its initial conditions. In this case, you can reverse the send and receive order; set the <sendBeforeReceive> element to false to have the client receive the initial conditions first.

    A declaration of false by both component instances would result in deadlock failure; such a declaration does not physically make sense and results in a consistency error.

  • You can force a client to march in lockstep.

    Specify the <timeIncrementation> element, and set the <lockstep> element to true to force the client to march in lockstep. Otherwise, the component instance is allowed to subcycle.

Example

The following example illustrates how to define subsystem models:

<componentInstances>
     <componentInstance modelIdentifier="fan" name="Structure">
           <component>StructuralSolver</component>
           <timeIncrementation>
                 <lockstep>true</lockstep>
           </timeIncrementation>
           <initialConditions>
                 <sendBeforeReceive>true</sendBeforeReceive>
           </initialConditions>
     </componentInstance>
     <componentInstance modelIdentifier="air" name="Fluid">
           <component>FluidSolver</component>
           <timeIncrementation>
                 <lockstep>true</lockstep>
           </timeIncrementation>
           <initialConditions>
                 <sendBeforeReceive>false</sendBeforeReceive>
           </initialConditions>
     </componentInstance>
     <componentInstance modelIdentifier="PID_controller" name="PID">
          <component>ControlsFMU</component>
      </componentInstance>
</componentInstances>