Rack-and-pinion gear
![]() |
![]() |
| C | |
| in the palette | on the schematic |
The block is designed to simulate a rack-and-pinion gear with a constant gear ratio and friction in bearings and with gear meshing.
The calculation of the gear ratio U, rad/m, is carried out in two ways:
- using the effective radius of the gear RP, m, according to the formula:

- using the number of gear teeth NP and the distance between the teeth of the rack XP, m, according to the formula:

The block is described by the following formulas:








where:
- sR – linear position of the body at the port "C", m
- φP – turn angle at the port "P", rad
- vR – linear speed at the port "R", m/s
- ωP – angular speed of the port "P", rad/s
- aR – linear acceleration at the port "R", m/s2
- εP – angular acceleration at the port "P", rad/s2
- FR – force at the port "R", N
- TP – torque at the port "P", Nm
- BP and BR – coefficients of bearing friction on the gear and the rack, Nm·s/rad and N·s/m
- dir – the value indicating the matching of the directions of rotation of the gear shaft and the movement of the rack, has a value of 1 or -1. If the motion directions match, an increase in the gear turn angle will correspond to an increase in the linear position of the rack
- ν – transmission efficiency, depending on the direction of power transmission: gear-to-rack or vice versa
A detailed description of the calculation methods for the variable efficiency in the gear meshing is given on page Gearbox efficiency simulation.
The block allows you to change the direction of the "P" and "R" ports for easy connection to other blocks of the model. If the block has both input ports, then the coupling equation is solved. A detailed description of the simulation approach for the gear ratios is given on the page Simulating transmission.
The gear ratio value U is displayed next to the block.
Ports
| Name | Description | Connection line type |
|---|---|---|
| P | Port for connecting the pinion. The port is input if specified in the "Input port" property, otherwise this port is output | Rotary mechanics |
| R | Port for connecting the translatory moving rack. The port is input if specified in the "Input port" property, otherwise this port is output | Rotary mechanics |
Outputs
| Name | Description | Connection line type |
|---|---|---|
| Q | Power losses due to bearing friction and gear meshing (efficiency) | Mathematical |
Properties
| Title | Parameter | Description | By default | Data type |
|---|---|---|---|---|
| Input port | mod_type | Allows you to specify the input ports. The possible values are: "P", "R", "P and R" | P and R | Перечисление |
| Time constant for solving the nonlinear algebraic equation, s | Tau | The time constant for solving the nonlinear algebraic equation. Used to solve the coupling equation. The property is available when selecting the input ports "P and R" | 0.1 | Вещественное |
| Kinematics | A group of properties that set the kinematic parameters of motion | |||
| Way to set the gear ratio | UType | Allows you to select the method of setting the gear ratio. The possible values are: "Gear radius", "Gearing parameters" | Gear radius | Перечисление |
| Gear effective radius, m | Rp | Gear effective radius. The property is available when selecting the method of setting the gear ratio as "Gear radius" | 0.1 | Вещественное |
| Number of gear teeth | Np | Number of gear teeth. The property is available when selecting the method of setting the gear ratio as "Gearing parameters" | 20 | Целое |
| Distance between the teeth of the rack, m | Xr | Distance between the teeth of the rack. The property is available when selecting the method of setting the gear ratio as "Gearing parameters" | 0.005 | Вещественное |
| Direction of movement of the rack and pinion | Dir | Allows you to define the mutual motion direction of the rack and the gear. The possible values are: "Same direction", "Opposite direction" | In the same direction | Перечисление |
| Gear ratio (Wp/Vr), rad/m | U | Gear ratio. The property is displayed in the "read-only" mode and is for reference only | 10 | Вещественное |
| Losses | A group of properties that define loss parameters | |||
| Coefficient of the gear bearing friction, Nm·s/rad | B_P | Coefficient of the gear bearing friction | 0 | Вещественное |
| Coefficient of sliding friction of the rack, N·s/m | B_R | Coefficient of sliding friction of the rack | 0 | Вещественное |
| Friction model | FrType | Allows you to define the friction model. The possible values are: "No loss", "Set efficiency manually", "Table data efficiency on load", "Table data efficiency on temperature" | No loss | Перечисление |
| Power threshold, W | Q_th | The value of the power transmitted through the block, below which the efficiency is increased to achieve the stability of the numerical solution. The property is available when selecting the following friction models: "Set efficiency manually", "Table data efficiency on load", "Table data efficiency on temperature" | 0.01 | Вещественное |
| Gear-to-rack transmission efficiency | Nu_pr_m | Gear-to-rack transmission efficiency. The property is available when selecting the friction model "Set efficiency manually" | 0.74 | Вещественное |
| Rack-to-gear transmission efficiency | Nu_rp_m | Rack-to-gear transmission efficiency. The property is available when selecting the friction model "Set efficiency manually" | 0.65 | Вещественное |
| Temperature,°С | Temp | Temperature. The property is available when selecting the friction model "Table data efficiency on temperature" | 20 | Вещественное |
| Array of temperatures, °С | Temp_Arr | Array of temperatures The property is available when selecting the friction model "Table data efficiency on temperature" | [1 , 2 , 3] | Массив |
| Array of forces on the rack, N | F_Arr | Array of forces on the rack. The property is available when selecting the friction model "Table data efficiency on load" | [1 , 2 , 3] | Массив |
| Array of the gear-to-rack transmission efficiency values | Nu_pr_Arr | Array of the gear-to-rack transmission efficiency values. Efficiency values are calculated by linear interpolation depending on the load or temperature values. The property is available when selecting the following friction models: "Table data efficiency on load" or "Table data efficiency on temperature" | [0.75 , 0.7 , 0.65] | Массив |
| Array of the rack-to-gear transmission efficiency values | Nu_rp_Arr | Array of the rack-to-gear transmission efficiency values. Efficiency values are calculated by linear interpolation depending on the load or temperature values. The property is available when selecting the following friction models: "Table data efficiency on load" or "Table data efficiency on temperature" | [0.333, 0.667, 1] | Массив |
Parameters
| Name | Parameter | Description | Data type |
|---|---|---|---|
| Power losses, W | Q | Power losses due to bearing friction and gear meshing (efficiency) | Вещественное |
| Gear | A group of parameters displaying the parameters of the gear | ||
| Angular speed, rad/s | Wp | Angular speed value at the port "P" | Вещественное |
| Torque, Nm | Tp | Torque taken from the gear shaft | Вещественное |
| Power, W | Qp | Power taken from the gear shaft | Вещественное |
| Rack | A group of parameters displaying the parameters of the rack | ||
| Speed,m/s | Vr | Speed value at the port "R" | Вещественное |
| Force, N | Fr | Force transmitted to the rack | Вещественное |
| Power, W | Qr | Power transmitted to the rack | Вещественное |
Examples
Examples of block application:

