<< Click to Display Table of Contents >> Navigation: Getting Started Tutorials - MechDesigner > Tutorial 18: Math FB > Step 18:0: Introduction to the Math-FB |
IMPORTANT NOTES:
Equations You must enter the equations correctly with the correct syntax. The Math FB will check the syntax, but not the equation itself. If you enter an incorrect equation, the output will be incorrect. Motion Derivatives YOU must add the symbolic equation of each motion-derivative. If your application needs position, velocity, and acceleration, then you must enter the three equations separately. If you do not add the motion-derivatives (velocity and acceleration), their values remain at equal to the values at the input-connector. Units Use the Output Data Type drop-down box in the Math FB dialog-box to select the units at the output-connector. The units inside the Math FB are S.I. units. For example, •50mm at the input-connector becomes 0.05m when applied to an equation inside the Math FB dialog-box •50° at the input-connector becomes (50*2*pi/360)rads. and applied to an equation inside the Math FB dialog-box |
The Math FB can use data that is available at the output-connectors of other FBs. You can use the Math FB to do: Simple Algebra For example: 2+3. The output will be 5, of course. Parametric Constants For example, connect the output of a Motion-Dimension FB of a Crank and the output of a Force-Data FB of the same Joint. You can use the Math FB to multiply the Torque(Nm) and the Velocity(rad/sec) values to give the Power(kW) as the output. Top-Tip: Connect a Gearing FB to the input of a Math FB. You can edit the Gearing FB, so that it becomes a parametric-constant of an equation in the Math FB, for example, a Friction Coefficient. Change the Units of a Variable For example, change the units at the input-connector of a Math FB to different units at its output-connector - for example: mm to Newtons. |
Add a Math FB:
The Math FB is now in the graphic-area Open a Math FB dialog-box
The Math FB dialog-box is now open |
Math FB dialog-box
Add Connectors ; Output-Data-Type
Add Input button You need one input-connector for each variable or parameter in your equation.
Add Output button You need one output-connector for each variable and its motion-derivative
Output Data-Type
There is ONE Data-Type for All of the Output-Connectors. |
Wire Numbers and Data-Channels
The format of a variable in an equation is: Data-Channel (Wire-Number) ![]() Three wires connected to the input of a Math FB |
|||
The image above shows three(3) Wires connected to input-connectors of a Math FB. Wire-Numbers - IMPORTANT : Wire-Numbers start at 0
Data-Channel
Example Entries in an Equation:
|
How many input and output-connectors? - and Example:
By way of an example we will calculate Power : P = Ʈ . ω Power (N.m./sec) = Torque(N.m.) × Angular Velocity (rad/sec) Torque data and Angular-Velocity data are the inputs and Power is the output. Thus, you need two input-connectors and one output-connector. |
We get Torque data from a Force-Data FB We get Angular-Velocity data from a Motion-Dimension FB Prepare the model: 1.Add a Rocker - see Tutorial 1 2.Edit the CAD-Line of the Rocker, to open the CAD-Line dialog-box. In Mass Properties tab > User Mass Properties . In Mass Properties tab > User Mass Properties . We will not enter a value for the Inertia or Radius of Gyration. This makes the mass a Point Mass - the mass of the Rocker is reduced to a particle. 3.Add a Force-Data FB, open the Force-Data FB dialog-box, select the Pin-Joint, and select the Point in the Base-Part to find the Torque that acts-on the Base-Part. |
See image above - the Wires and Data-Channels of the Force-Data FB and the Motion-Dimension FB Prepare the Math FB: 1.Open the Math FB dialog-box: 2.Add two Input-Connectors with the Add-Input button 3.Select Power for the Output Data Type. 4.Click UPDATE button after we select the Output Data Type and before we add equations. 5.Enter the Equations to calculate Power. The Math FB uses SI units for all data at its input-connectors The equation in the Math FB is: p(0)*v(1) Wire-Number 0 (top), Channel 1 (p = Torque) × Wire-Number 1 (bottom wire), Channel 2 (v = Angular Velocity) |
![]() MathFB- |
SYNTAX and VALID Equations: Click the Update after you edit the equation to find if its syntax is correct or not correct. For example, the syntax is not correct if it does not have the correct number of parentheses. The reason is given as a message in the Feedback-Area. The |
Each wire has three channels. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|