# Force Flow in the Position-Based Translational Domain

This example describes how to interpret force flowing through a Simscape™position-based mechanical translational network. The example summarizes rules for interpreting the signs of logged forces and then considers forces in three types of systems: springs being pulled or pushed from different ends, simple systems with external forces applied at a mid-point, and a more complex system with an external force applied at the mid-point.

### Rules for Applying and Interpreting Forces

The position-based mechanical translational domain uses two key principles:

1. The Simulink® canvas shows block connectivity, not part orientation. Think about the Simulink canvas as a schematic view. Rotating blocks in the schematic view can be convenient in diagrams but does not equate to rotating parts in the physical world. Parts in the schematic view are always aligned with the positive direction.

2. In the schematic view, force flow into a node represents force acting on the node from the rest of the system. Conversely, force flow out of a node represents force acting from the node on the rest of system. In summary: an arrow tail in the schematic view indicates that the node provides force. An arrowhead indicates that the node receives force.

These principles lead to the following rules.

1. f > 0 in 2-port elements means the block is in a compression state

The logged force f in 2-port elements is the internal force acting from port B on port F. The internal force is positive when it aligns with the positive direction. A positive internal force indicates that port B drives port F in the positive direction, acting to separate the ports. Conversely, a negative logged force f indicates that the part is in a state of tension.

2. f > 0 in a mass block means the mass accelerates in the positive direction

The logged force f in the mass block is the force flowing into the mass. Force flowing into a mass accelerates it in the positive direction, $\mathit{f}=\mathit{m}\stackrel{¨}{\mathit{x}}$. Conversely, a negative logged force f is force flowing out of a mass and indicates that the mass is accelerating in the negative direction. Masses absorb and release force flow.

3. f > 0 in a source or constraint block means the block applies force in the positive direction

The logged force f in a source or constraint force is the force flowing out of the block and into the rest of the system. Force flowing out of a source block, such as an External Force Source, indicates that the source acts to accelerate mass in the positive direction. Force flowing out of a constraint block, such as a World block, indicates that the constraint acts to prevent mass from accelerating in the negative direction.

### Basic Example

Open the model InterpretingForceFlowBasicSystems to view two basic examples of the force flow conventions.

The schematic on the left represents pushing a mass in the positive direction. For the mass to accelerate in the positive direction, force flows out of the source and into the mass. The force through Spring1 from B to F indicates that the spring is in a state of compression. The spring's compression state matches our physical expectation for a force pushing a spring-mass system. The force flow for all three blocks aligns with the positive direction. The logged forces for all three blocks are positive.

The schematic on the right represents pulling a mass in the negative direction. For the mass to accelerate in the negative direction, force flows into Force Source2 and out of Mass2. Force flowing from F to B in Spring2 corresponds to the spring being in a state of tension. The force flow for all three blocks aligns with the negative direction. The logged forces for all three blocks are negative.

`open_system('InterpretingForceFlowBasicSystems');`

The simple script below plots the logged forces. The plots confirms that the force flow in the left system is positive. Force flow in the right system is negative.

`InterpretingForceFlowBasicSystemsPlot;`

### Spring States Example

Open the model InterpretingForceFlowSprings to view an example comparing four spring states.

This model includes springs in four different states and shows a physical view beside each schematic view. The two springs on the left are both in states of compression while the force is applied at different ends of the spring. According to the force flow convention, the force flows from B to F in both springs that are in states of compression. The logged force, f, is positive for both springs. In the top left system, force flows out of a force source applied at the spring B node. Force flow out of the source corresponds to driving the node in the positive direction. The logged force, f, is positive for the Force Source of the top left system. In the bottom left system, force flows into the force source applied at the spring F node. Force flow into the source corresponds to driving the node in the negative direction. The logged force, f, is negative for the Force Source of the bottom left system.

Conversely, the two springs on the right are both in states of tension, which corresponds to force flow from F to B in both springs. The logged force, f, is negative for both springs. In the top right system, force flows out of the force source applied at the F node (a positive logged force f). In the bottom right system, force flows into the force source applied at the B node of the spring under tension (a negative logged force f).

`open_system('InterpretingForceFlowSprings');`

The simple script below plots the logged forces. The plots confirm that logged forces in the spring are positive when the force source pushes the spring into a state of compression and negative when the force source pulls the spring into a state of tension. The logged force in the sources are positive when the source drives the node in the positive direction and negative when it drives the node in the negative direction.

`InterpretingForceFlowSpringsPlot;`

### Applying Force Example

Open the model InterpretingForceFlowActuation to view examples of an External Force Source and an Actuator. The model shows physical views on the left and schematic views on the right.

The top system has an External Force Source. The physical view shows that the external force drives the connected node in the positive direction. Physically, we expect that the left spring is in a state of tension and the right spring is in a state of compression. The schematic view shows that a Force Source with a positive signal emits outward force flow. Force flows from port F to port B in Spring1 and from port B to port F in Spring2, which correspond to negative and positive logged forces, or spring states of under tension and compression, respectively. The forces in a system with an External Force Source driving the system in the negative direction have the opposite signs.

The bottom system uses a Force Actuator. The physical view shows that this actuator acts in extension mode, generating compressive loads in the system. The schematic view shows that the compression states of the springs and actuator correspond to positive force flow through the springs and actuator.

`open_system('InterpretingForceFlowActuation');`

The script below plots the logged forces. The logged force plots confirm the expected force flow pattern illustrated in the schematic. Positive logged forces correspond to flow in the positive direction, and negative logged forces correspond to flow in the negative direction. Force flowing out of the External Force Source splits to flow through the springs on either side of it. Force flows equally through the springs and actuator in the system with a Force Actuator.

`InterpretingForceFlowActuationPlot;`

### Test Your Understanding: Force Flow in a Rod

Open the model InterpretingForceRod to view the model. The model consists of several mass-spring-dampers in series. One end of the rod is fixed while the other end is free. An External Force Source applies 1,000 N in the positive direction at the mid-point. The system contains three Force Sensors: one on either side of the External Force Source and one just before the tip mass.

```rodModel= 'InterpretingForceFlowRod'; open_system(rodModel);```

#### Question 1

The system starts at rest. What forces are sensed by the three sensors at t = 0 sec?

Hint: Force Sensors are 2-port elements. f > 0 in 2-port elements means the block is in a compression state.

To check your intuition, set the simulation Stop Time to 0 seconds, run the model, and view the outputs of the Display blocks connected to each sensor.

```set_param(rodModel, 'StopTime', '0'); sim(rodModel);```

#### Question 2

What forces are sensed by the sensors once the system has reached static equilibrium?

To check your intuition, set the simulation Stop Time to 2000 seconds, run the model, and view the outputs of the Display blocks.

```set_param(rodModel, 'StopTime', '2000'); sim(rodModel);```

### Summary

What are the rules for interpreting force?

1. Separate the schematic view from the physical view.

2. The direction of the flow arrow tells you what part of the system is acting on what other part.

3. The sign of the flow scalar tells you if the force is positive or negative with respect to the global positive direction.

4. Map forces in the schematic view to the physical view to interpret system behavior.