# Force Flow in the Position-Based Translational Domain

This example describes how to interpret forces in 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 physical world are always aligned with the positive direction. The positive direction points from port B to port F for blocks with 2 ports.

2. Force flows through translational networks. In the schematic view, force flowing into a node represents force acting on the node from the rest of the system. Conversely, force flowing out of a node represents force acting from the node on the rest of system. At each node in the schematic, the sum of forces flowing into the node equals the sum of forces flowing out of the node. The balanced flow of forces in the schematic represents balanced forces in the physical world. In summary: When indicating a force in the schematic view, an arrow tail indicates that a node provides force. An arrowhead indicates that a 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.

3. f > 0 in a 1-port 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 translational networks that illustrate the logged force 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 flows through Spring1 from node B to node F, indicating that the spring is in a state of compression. The spring compression state matches our physical expectation for a force pushing a spring-mass system. The force flows in the positive direction for all three blocks. 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 out of Mass2 and into Force Source2. The force flows from node F to node B in Spring2, indicating that the spring is in a state of tension. The force flows in the negative direction for all three blocks. 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 flows in the positive direction in the left system and in the negative direction in the right system.

`InterpretingForceFlowBasicSystemsPlot;`

### Spring States Example

Open the model `InterpretingForceFlowSprings`.

This model shows the Simscape schematic and physical view for springs in four different states. The two springs on the left are both in states of compression but have the force applied at different ends. Matching the force 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 flowing 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 flowing 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 flowing from node F to node 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, which corresponds to a positive logged force f. In the bottom right system, force flows into the force source applied at the B node, which corresponds to 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 each source is 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 a translational network with an External Force Source and a translational network with a Force Actuator. The model shows physical views of each network 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, Spring1, is in a state of tension and the right spring, Spring2, is in a state of compression. The schematic view shows that a positive input signal is applied to the External Force Source and force flows out of the source. Force flows from port F to port B in Spring1, which corresponds to negative logged force, f, and a spring under tension. Force flows from port B to port F in Spring2, which corresponds positive logged force, f, and spring under compression. If a negative input signal is applied to the External Force Source, then the source would drives the connected node in the negative direction instead of the positive direction. Force would flow from both springs into the External Force Source, and forces logged in the springs would 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 providing a positive input signal to the actuator corresponds to force flowing in the positive direction through the actuator and springs. Positive force flowing through the 2-element blocks corresponds to compression states for all three blocks.

`open_system('InterpretingForceFlowActuation');`

The script below plots the logged forces. The 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. Equal force flows through the system with the springs and actuator in series.

`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. In the schematic view, the direction of the force 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.