Previous section-----Next section

9.2.1 Solving for Two Parameters

Building coupled systems across multiple configurations.

The InitialGuess and Time options are used somewhat differently than standard Mathematica option usage because one specification for time and one set of initial guesses must be given for each separate mechanism configuration. The Time option must be specified for a multiple configuration CoupleSystem because the default setting sets the value of time to be the same for all configurations, making all configurations identical. Since the Compiled option applies to the entire CoupleSystem, it can appear in any part of the SetCouple command.
The following example uses the four-bar model that was developed in Section 9.1. A coupled system is used to adjust the lengths of both the drive and driven bars so as to meet two geometric conditions that are satisfied at two different points in time. The X coordinate of point 3 on the center bar is set to 0.8 at T = 0.1, and the distance from the global origin to point 2 on the center bar is set to 3.8 at T = 0.3.
Because the coupled system is simultaneously solved in two different mechanism configurations, the same initial guess for both configurations may not be acceptable. Therefore, the InitialGuess option is used to explicitly specify initial guesses for each configuration.

Here are two initial guesses for the two configurations.

Here are parts of the two conditions at the two initial configurations.

This builds the CoupleSystem object.

A CoupleSystem object that spans multiple configurations has a unique solution at each configuration. Thus, SolveCouple returns a nested list of solution rules with each list corresponding to one configuration of the mechanism.

This solves the CoupleSystem object and finds new values for bar2 and bar3.

This shows that the desired condition is satisfied.