The Maths FB

IMPORTANT NOTES:

Equations

You must enter the equations correctly with the correct syntax. The Maths FB will check the syntax and formatting, but not the equation itself. If you enter an incorrect equation, the output will be incorrect.
For example, if you enter the equation  ((u*t) + (0.5*a*t))to findr to find the 'final velocity of a point that has constant acceleration' then the result will be incorrect The correct equation is ((u*t) + (0.5*a*t*t)).

Motion Derivatives

YOU must add the symbolic equation of each motion derivative.

If your application needs position, velocity and acceleration, then you must add the three equations separately.

If you do not add the motion derivatives (velocity and acceleration), their values remain at zero.

Units

Use the 'Output Data Type' in the Maths FB dialog-box drop-down box to select the units at the output-connector.

The units 'inside' the Maths FB are S.I. units. For example,

50mm at the input connector becomes 0.05m and applied to an equation.
50° at the input-connector becomes [50*2*pi/360] rads. and applied to an equation.

What can you do with a Maths FB?

The Maths FB can use data that is available at the output-connectors of other FBs.

You can use the Maths 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 Maths 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 Maths FB. You can edit the Gearing FB, so that it becomes a parametric-constant of an equation in the Maths FB, for example 'Friction Coefficient'.

Change the Units of a Variable

For example, change the units at the input-connector of a Maths FB - for example: mm or degrees - to different units at the output-connector of the Maths FB - for example: Newtons.

To Add a Maths FB and open the Maths FB dialog-box

ModellingFBtoolbar-Maths

Add a Maths FB:

1.Click Modelling-FB toolbar > Maths FB
2.Click the graphic-area

The Maths FB is now in the graphic-area


Open a Maths FB dialog-box

1.Double-click the Maths FB.

or

See How to edit an Elements.

Example Application: Calculate 'Power' from 'Torque' and 'Angular Velocity'.

Dialog-FB-Maths-2

The different areas of the Maths FB dialog-box:

1s-red  Click the Orange separator to see the buttons 2s3s4s

2s 'Add Input [-Connector]' and 'Add Output [-Connector] buttons [see also: below].

3s Click the Update button to make sure the output from the Maths FB is as intended

4s The 'units' of all Output-Connectors from the Maths FB are set with the Output Data-Type list-box - see also: below

5s The Math equations for each data-channel of each Output-Connector.


Basic Example

For example, we want to calculate Power from Torque and Velocity at a Pin-Joint:

P =  Ʈ . ω


Maths-FB-ForceTorque

Prepare the model:

1.Add a Rocker - see Tutorial 1
2.Edit the CAD-Line along the centre of the Rocker, to open the CAD-Line dialog-box.

In CAD-Line dialog-box | Mass Properties tab > User Mass Properties . Enter a a value for the Mass parameter ['0' Radius of Gyration]

In CAD-Line dialog-box | Mass Properties tab > User Mass Properties . Enter values for its position that is not at Origin of the CAD-Line.

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.
4.Edit the Maths FB

We need two input-connectors for the two parameters [Ʈ and ω] and one output-connector [P].

By default, there is one output-connector.

5.Open the Maths FB dialog-box, and click the Add Input button two times.
6.Connect a wire from the output-connector of the Force-Data FB to the Top input-connector of the Maths FB.
7.Connect a wire from the output-connector of the Motion-Dimension FB to the Bottom input-connector of the Maths FB.

The Angular Velocity [ω] input would be the Angular Velocity of the same Pin-Joint. You might use the output of a Motion-Dimension FB, if it is available. Or, you might need to measure the angular-velocity of the Pin-Joint with a Measurement FB.

8.Make sure Calculate Forces and Display Force icons are 'active'.

You should now see the model in the image above.

Maths FB-2

In the Maths FB dialog-box

1.Enter the Equation p(0)*v(1)

p   : is Data-Channel #1 [Torque from Force-Data FB that measures a Pin-Joint]

(0) : is input-connector[wire] #1

*   :   is to multiply

v     : is  Data-Channel #2 [Angular-velocity from a 'Rocker' Motion-Dimension]

(1)  : is input-connector[wire] #2

Thus we are multiplying Torque and Angular Velocity to give Power

P =  Ʈ . ω

Use a Graph FB to plot the Power

Data from Input-Connectors, Data at Output-Connectors, Units, and Valid Equations

FB-Maths-InputChannels

Data-Channels and Input-Connectors

When you click the Add Input button, you do not change anything inside the dialog-box. You only add a new input-connector.

Each wire you connect to the input-connector has three[3] data-channels [typically, three motion-derivatives]

The input and the data-channel of an input is identified with a letter and a number.

The letter gives the data-channel on each input. The letters are always:

p = Channel 1 ; v = Channel 2 ; a = Channel 3

We identify each input-connector with a number:

The input-connector is in parentheses in an equation.

(0), (1), (2)... for input-connectors 1, 2 and 3 respectively.

FB-Maths-Outputs

Thus, examples might be:

p(0) = Data-channel 1, with input-connector 1

a(2) = Data-channel 3, with input-connector 3

v(1) = Data-channel 2, with input-connector 2

Data at Output-Connectors

The data at each output-connector are given in sets of three.

The image has two sets of three: Output-connector 0 and 1, with Data-Channels 0–2 and 3–5, respectively.

FB-Maths-OutputCoordiantes

Output Data Type: Units (S.I. Units 'inside the Maths FB)

Output Data-Type drop-down box specifies the units for all of the output-connectors.

If you change the Output Data Type, you should click the 'Update' button at the bottom of the dialog-box.

The units that are used within each equation are the SI unit of the 'Output Data Type' : kilogram, metres, seconds, radians


WARNING:

An input of 18° becomes [2*π*18/360] = 0.314 radians within the Maths FB, and then back to 18° again when the Output Data Type is set to Rotary Coordinates.

An input of 18° becomes [2*π*18/360] = 0.314 radians within the Maths FB, BUT the data is converted to 314mm from 0.314radians at the output-connector, when the Output Data Type is set to Linear Coordinates.

To look at the values at the output-connector of a Maths FB, plot the values at the output-connector of a Maths FB with a Graph FB.

Valid Equations

The tick ,or a cross at the start of each equation identifies whether the equation is valid.

You must make it valid. An invalid equation might be where the number of parentheses is incorrect. Read the message in the Feedback Area.


Input-Wires, Output Wires: Channels and Units

Each wire has three channels.

...wire from...

Channel 1

Label & Units

Channel 2

Label : Units

Channel 3

Label & Units

Data Type / Notes

Linear Motion FB

Machine Angle

 

Deg

Machine Angular Velocity :

Deg/sec

Machine Angular Acceleration :

Deg/sec/sec

Note: Velocity: is a function of Machine Speed in Machine Settings dialog-box.

Gearing FB

Dis

Input Unit

Vel

Unit/s

Acc

Unit/s/s

Output Data is a function of input data type - Linear or Rotary

Motion

Dis

mm or deg

Vel

mm/s or deg/s

Acc

mm/s/s or deg/s/s

Output Data: motion-values, Linear or Rotary

Change the Output Data Type to the match input Units

Motion-Dimension

Dis

mm or deg

Vel. or Ang. Vel.

mm/s or rad/s

Acc

mm/s/s or rad/s/s

If Slider, Data-Type is Linear, if Rocker, Data-Type is Rotary

Measurement

Dis

mm or deg

Vel

mm or deg

Acceleration

If Linear Dimension, then Data-Type is Linear, and Rotary for Angles

Point FB

Displacement

Velocity

Acceleration

Data Type is Linear.

Cam-Data FB

Pressure Angle

 

deg

Contact Pressure Angel 1

deg

Contact Pressure Angle 2

deg

Radians

 

Radius-of-Curvature Cam 1

Radius-of-Curvature Cam 2

----

Linear Units

 

Contact Force Total

Contact Force, X component

Contact Force, Y component

Units as set in Machine Settings dialog-box.

 

Shear Stress Cam 1

Shear Stress Cam 2


Units as set in Machine Settings dialog-box.

Force Data FB

Joint Total Force

Force, X Component

Y Component

Units as set in Machine Settings dialog-box.

 

Cam Contact Force

X Component

Y Component

Units as set in Machine Settings dialog-box.

 

Spring Force

X Component

Y Component

Units as set in Machine Settings dialog-box.

Maths FB

A 'special' :

Any Unit

As per equation

As per equation

You connect a wire to it and convert its units to a different Data Type. Beware of units.

Tutorial and Reference Help Files for MechDesigner and MotionDesigner 13.2 + © Machine, Mechanism, Motion and Cam Design Software by PSMotion Ltd