Initial Conditions
Initial conditions need to be exchanged at the start of a coupled simulation. Use the
SMACseInitialConditionsStart and
SMACseInitialConditionsEnd functions to exchange initial
conditions. Both functions take no arguments.
All fields that are exchanged must be defined using the initial condition category (Connection Groups). You must call both functions whether or not initial conditions are exchanged.
In general, SMACseInitialConditionsStart sends the client’s initial
outgoing fields, and SMACseInitialConditionsEnd receives a remote
client’s fields.
In some cases, a client might need the remote client’s initial fields to compute its
initial conditions. In this case, you can use the
<initCondSeqIsSendRecv> element in the Configuration file
(see Component Instances) to reverse the send
and receive operations. Only one of the clients can receive initial fields
first.
When you embed the SIMULIA Co-Simulation Services in parallel mode, you must call these functions collectively on all compute ranks.
Example
The following example illustrates the exchange of initials conditions:
//
// After the initial fields have been computed by the application, exchange
// the initial fields at the start of the simulation.
//
if ( SMACseInitialConditionsStart( ) == SMACseSolutionStatus_InitialConditionsReceived) {
// May use SMACseGetField to retrieve fields from CSS.
};
:
if ( SMACseInitialConditionsEnd( ) == SMACseSolutionStatus_InitalConditionsReceived) {
// May use SMACseGetField to retrieve fields from CSS
}