DefineCalcFunction

DefineCalcFunction[linkage, calc]
function defines a calculation function on calc symbol. The input of the generated calculation function is the list of the independent variables of linkage. The calculation function returns the list of linkage parameters values in the same order as they appear in GetLinkageRules function
  • DefineCalcFunction generates a solver function of the linkage. This function takes the independent variables as input, calculate the dependent variables and returns all linkage parameters,independent and dependent together.
  • The generated calculation function (Calc) has the following template:
  • Calc[{dvar1, dvar2, ..., svar1, svar2, ..svarj}], where dvari-s are the driving variables' value svari's are the simple parameters' value.
  • Calc[{dvar1, dvar2, ..., dvari}], where dvari-s are the driving variables' value. Simple parameters ' value are substituted from linkage database.
  • The function returns the list of linkage parameters values in the order as they appear in GetLinkageRules function
Load LinkageDesigner package
In[1]:=
Click for copyable input
Load the four-bar mechanism example
In[2]:=
Click for copyable input
Out[2]=
Define the calculation function on symbol f
In[3]:=
Click for copyable input
Out[3]=
Display the function definition
Evaluate function using the =10° driving variable
In[5]:=
Click for copyable input
Out[5]=
GetLinkageRules of linkage in posture =10°
In[6]:=
Click for copyable input
Out[6]=