9.1.2 Solving for One ParameterThe coupled system building and solving functions. Mech's SetCouple and SolveCouple functions are now used to adjust the length of the drive bar bar2. In the four-bar's current configuration, the X coordinate of point 3 on the center bar is 0.898 at T = 0.1. The following example uses a coupled system to find the length of the drive bar that causes the X coordinate of point 3 to be equal to 0.8 at T = 0.1. Here is the current X coordinate of point 3 on the center bar.
Out[23]= | |
SetCouple basically adds a degree of freedom to the mechanism model by allowing a parameter to become a dependent variable, and also adds an equation to constrain the new degree of freedom. The following command essentially says "adjust the value of bar2 such that the X coordinate of point 3 on the center bar is equal to 0.8 at the current default time T = 0.1." The current default initial guesses obtained from LastSolve[] are used as the initial guesses for the CoupleSystem, unless otherwise specified. The current value of the parameter bar2 is used for its initial guess. This builds the CoupleSystem object.
Out[24]= | |
SetCouple returns a CoupleSystem object that is solved with SolveCouple. The CoupleSystem object contains a new set of constraint equations that include all of the constraints in the current model, plus one. The list of rules returned by SolveCouple is of the same form as the rules returned by SolveMech. This solves the CoupleSystem object and finds a new value of bar2.
Out[25]= | |
The new value of the parameters bar2 is added to the current parameters list.
Out[26]= | |
This shows that the desired condition is satisfied.
Out[27]= | |
Options for SolveCouple. Without building a new CoupleSystem object, cpsys can be re-solved at a new value of time by using the InitialCondition option. Note that the InitialCondition option expects a setting of the form Time -> t, not T -> t. The CoupleSystem is solved again with a new value of time.
Out[28]= | |
The contents of the current parameters list are updated.
Out[29]= | |
|