ReplaceVariables

ReplaceVariables[linkage, {v1, v2, .., vn}->{eq1, eq2, ..eqn}]
constraints independent or dependent variables {v1, v2, .., vn} in linkage with equations {eq1, eq2, ..eqn}. {v1, v2, .., vn} are moved into $LDDerivedparametersB records. The function returns the modified LinkageData.
ReplaceVariables[linkage, {v1, v2, .., vn}->{v1→exp1, v1→exp2, ..vn→expn}]
constraints independent or dependent variables {v1, v2, .., vn} in linkage with expression {exp1, exp2, ..expn}. {v1, v2, .., vn} are moved into $LDDerivedParametersA records. The function returns the modified LinkageData.
  • The following options can be given:
NewSimpleParameters{}specifies new simple parameters to be appended to the linkage.
NewDrivingVariables{}specifies new driving variables to be to be appended to the linkage.
ParameterInitialGuessAutomaticspecifies initial guess values for the implicitly derived parameters.
JointLimitCheckFalseswitches on or off the limit check in case of the driving variables.
AccuracyGoalAutomaticAccuracyGoal is an option for various numerical operations which specifies how many effective digits of accuracy should be sought in the final result.
WorkingPrecisionMachinePrecisionWorkingPrecision is an option for various numerical operations which specifies how many digits of precision should be maintained in internal computations.
Load the LinkageDesigner package
In[1]:=
Click for copyable input
Load the predefined crank-slider mechanism
In[2]:=
Click for copyable input
Out[2]=
Retrieve the loop closing equations from the $LDDerivedParametersB record and assign to eq variable
In[3]:=
Click for copyable input
Out[3]//TableForm=
In[4]:=
Click for copyable input
Out[4]=
The loop closing equations expresses q2 and q3 derived parameters. If the equations are solved symbolically these variables could be calculated without the need of using root finding functions.
From the second equation q3 could be easily expressed q3->-(q1+q2). Using this fact the q2 could be calculated with PatternSolve function.
In[5]:=
Click for copyable input
Out[5]=
Replace {q2,q3} variables and use the explicit solution instead of the implicit equations
In[6]:=
Click for copyable input
Out[6]=
Display the linkage data and the figure of the new linkage1 - {q2,q3} variable expressed with explicit expressions
In[7]:=
Click for copyable input
Out[7]=
In[8]:=
Click for copyable input
Out[8]=
Display the linkage data and the figure of the original linkage - {q2,q3} variable expressed with implicit equations
In[9]:=
Click for copyable input
Out[9]=
In[10]:=
Click for copyable input
Out[10]=