In principle, we can analyze mechanical devices with gears by explicitly including the contact interactions between gears as part of the simulation, but this method is computationally time-consuming when performing a multibody dynamics analysis. Instead, we can implement a mathematical formulation to model the contact interactions between the gears.

With this formulation, we can include a realistic gear geometry, which provides accurate inertial properties when used in transient and frequency-domain studies. Realistic gear geometries from the Part Library can also be used to evaluate gear mesh stiffness in a static contact analysis and for multiphysics simulations. Note that the gear mesh stiffness is not analyzed through finite element analysis, but the stiffness of pairs of gear teeth are still in contact. Another benefit of having realistic gear geometries in a multibody dynamics analysis is that this provides better visualization when either setting up the physics or when postprocessing.

*Geometry of a helical gear pair built using the Part Library.*

We could manually build the geometry, but using built-in parts is both easier and faster. These parts are parametric in nature, which means that we can change their shape by readjusting the geometric parameters, and they come with optional features that can be added, such as shafts and fillets. The parts also have extensive checks to validate the input data as well as selections for the gear, shaft, and contact boundaries, therefore ensuring realistic physical entities and behavior. With the Part Library, it’s easy to specify the position and orientation of the gears as well as to align the gear mesh with their counterpart. These parts also contain robust geometric operations when creating complex gear geometries and the ability to manually change geometric operations.

The gear parts in the Part Library are divided into three categories based on whether they are gears with an external mesh, a gear with an internal mesh, or a rack. To learn more about the gear parts available in the Part Library, please read the previous blog post in our Gear Modeling series.

While the gear geometries in the Part Library are for individual gears or racks, gears are always used in pairs. Due to this, we need to build a gear train using individual gear parts. To illustrate the steps involved, we use a 2D spur gear pair example. The known quantities are as follows:

- Position of the first gear (x_1,y_1)
- Pitch radius of the first gear (r_1)
- Pitch radius of the second gear (r_2)
- Angular position of the second gear (\theta)

*A spur gear pair showing the center distance of the two gears and the angular position of the second gear.*

To place the second gear correctly, the first step is to compute the center distance (d):

d = r_1+r_2

The position of the second gear (x_2,y_2) can be defined as:

x_2 = x_1 +d \cos{\theta}

y_2 = y_1 +d \sin{\theta}

Once the second gear is placed at the correct location, the next step is to align the teeth, or in this case mesh, of both gears. To accomplish this task, rotate the second gear with a mesh alignment angle (\theta_a) defined as:

\theta_a = \frac{\pi}{n_2}+\mod \left(\frac{\theta}{\theta_{m1}}\right)\frac{n_1}{n_2}+\mod \left(\frac{\theta}{\theta_{m2}}\right)

where \theta_{m1} and \theta_{m2} are the mesh cycle of both gears, and they are defined as:

\theta_{m1}=\frac{2\pi}{n1};\,\,\,\,\,\,\,\,\,\,\,\,\,\,\theta_{m2}=\frac{2\pi}{n2}

where n_1 and n_2 are the number of teeth of the first and second gear, respectively.

After computing the position of the second gear as well as the mesh alignment angle, we enter them as either expressions or numbers in the input parameter fields of the second gear, as shown below:

*The input parameters of a 2D spur gear part with the gear center and mesh alignment angle highlighted.*

For the gear tooth, we define the profile using an involute curve. The tooth shape and size are specific to the gear’s application, so a different application would require another type of gear tooth. Here is a list of input parameters through which we can control the shape and size of a gear tooth:

- Number of teeth (n)
- Pitch diameter (dp)
- Pressure angle (\alpha)
- Helix angle (\beta)
- Addendum-to-module ratio (adr)
- Tooth-height-to-addendum ratio (htr)
- Backlash-to-pitch-diameter ratio (blr)
- Tip-fillet-radius-to-pitch-diameter ratio (tfr)
- Root-fillet-radius-to-pitch-diameter ratio (rfr)

In the case that the fillet is not required in these places, we can set the tip or root fillet radius to zero.

*An external gear tooth showing various input parameters.*

The input parameters are mostly relative quantities for better scalability. We can compute different tooth profile parameters in terms of these input parameters:

- Normal module: m = dp/n*cos\beta
- Addendum: ad = adr*m
- Tooth height: ht = htr*m
- Dedendum: dd = ht-ad
- Base diameter: db = dp*\cos\alpha
- Tip fillet radius: tf = tfr*dp
- Root fillet radius: rf = rfr*dp
- Tooth thickness at the pitch circle: t = \pi *m/2 -blr*dp

Some applications require a specific type of gear tooth. High-pressure angle gears are better for high-speed applications as their wear rate is less than that of a standard tooth profile. Similarly, backlash is needed in high-speed applications because it provides space for a film of lubricating oil between the teeth, which prevents overheating and tooth damage. On the other hand, backlash is not desirable in precision equipment, such as instruments, machine tools, and robots. Backlash in these devices causes lost motion between input and output shafts, making it difficult to achieve accurate positioning.

*Gears for different pressure angles and modules. Left: Gear with a standard tooth profile. Middle: High-pressure angle gear. Right: High-module gear. *

After exploring the details of a gear tooth, we look at other parameters that influence the shape and size of a gear. The gear geometry is divided into three components: the gear teeth, gear blank, and shaft. For the gear shaft, the parameters are as follows:

- Gear-width-to-pitch-diameter ratio (wgr)
- Ring-width-to-gear-width ratio (wrr)
- Ring-outer-diameter-to-root-diameter ratio (dorr)
- Ring-inner-diameter-to-hole-diameter ratio (dirr)

Although the shaft is not an integral part of a gear, we can create one at the gear center with built-in gear parts. It is also possible to set the axial position of the gear on the shaft.

- Shaft-length-to-pitch-diameter ratio (lsr)
- Relative axial position of shaft center (zs)

By default, a gear is placed at the origin and its axis is set to the *z*-axis, but it’s possible to control the position and orientation of the gear using the following parameters:

- Gear center (\{xc, yc, zc\})
- Gear axis (\{egx, egy, egz\})

In order to align the gear mesh with the mating gear, we use a mesh alignment angle parameter to rotate the gear around its own axis.

- Mesh alignment angle (th)

*A helical gear geometry showing different input parameters.*

These input parameters, like the ones for the gear tooth, are relative quantities that we can use to calculate the gear parameters. They are as follows:

- Gear width: wg = wgr*dp
- Ring width: wr = wrr*wg
- Ring outer diameter: dor = dorr*dr
- Ring inner diameter: dir = dirr*dh
- Shaft length: ls = lsr*dp

By default, a gear geometry comes with a set of features. Some of these are optional, and we can remove them by setting the appropriate input parameter to zero. It is possible, for example, to build a gear geometry without a shaft, gear blank ring, center hole, and fillets at the root and tip.

*Geometry of spur gears where optional features are removed sequentially from (A) to (F). (A) Default geometry; (B) Without shaft; (C) Without gear blank ring; (D) Without center hole; (E) Without tip fillet; (F) Without root fillet.*

While the gear blank shape is rather standard in all of the built-in gear parts, we can create a ring by removing the material in the gear blank. To customize the gear blank shape, we need to perform various manual geometric operations on the built-in parts.

*Gears with customized gear blanks.*

The built-in gear parts provide selections that we can use when setting up the physics or postprocessing. The available selections are for different components of the gear as well as for the gear teeth boundaries. We can use these boundaries to model contact between the two gears.

*A spur gear where the geometry of the gear body, excluding the shaft, (left) and the gear teeth boundaries (right) are highlighted.*

Since the gear parts are highly parametric, it is important to have an extensive set of checks to validate the input data. These checks ensure that the input parameters are correct independently as well as when combined with other parameters. We perform these checks before proceeding to build the geometry.

In the case that the set of input parameters is invalid, an appropriate error message is displayed. A few examples of nontrivial geometry checks, an external gear for instance, are as follows:

- Addendum check: ad<=(dp-db)/2
- Dedendum check: (2*dd/dp)<=0.9
- Hole diameter check: dh<(dp-2*dd)

Next, we’ll look at some examples of gear geometries created using built-in parts.

The first example is a differential gear mechanism used in automobiles. This gear allows the left and right axles to rotate at different speeds. A differential gear uses five pairs of bevel gears, six bevel gears in total, to perform its operation.

*Geometry of a differential gear mechanism.*

The next example is a three-stage wind turbine gearbox. The first stage is a planetary gear train, which has three planet gears, one sun gear, and one ring gear. The second and the third stages are parallel gear trains that each have a pair of gears. This gearbox uses eight pairs of helical gears, nine in total, to perform its operation. The typical gear ratio of this gearbox varies from 50 to 100.

*Geometry of a wind turbine gearbox with the top and front view showing.*

Designed to transfer rotary motion from one shaft to another, gears are important devices in a variety of machines, from automobiles to wind turbines. New functionality in COMSOL Multiphysics provides you with several possibilities for quickly building gear geometries. With these robust and highly parametric built-in parts, you can change the shape of a gear to create an application-specific gear geometry.

In the next blog post in our Gear Modeling series, we’ll show you how to simulate gearbox noise and vibration. Stay tuned! We encourage you to browse the additional resources below in the meantime.

- Check out other blog posts in the Gear Modeling series
- Interested in multibody dynamics modeling? Read related posts on the COMSOL Blog
- Learn more about the new gear modeling features and functionality in COMSOL Multiphysics version 5.2a® by visiting the Release Highlights page

Let’s begin with a simple definition. A *gear* is a rotating machine part that is comprised of a set of toothed wheels, with the purpose of transmitting power from one part of a machine to another.

*Model of a gear.*

Gears can be connected to one another and they can also vary in size. Transferring power from one gear to another gear enables you to do one of the following things:

*Increase the speed*: Say you are connecting two gears to one another, with the first gear featuring more teeth than the second gear. If this is the case, the second gear needs to turn faster than the first gear. As a result, the torque in the second gear decreases, keeping the power the same in both gears.*An animation illustrating the gear configuration that is needed to increase the speed of the second gear.**Increase the torque*: Say you are connecting two gears to one another, with the first gear featuring fewer teeth than the second gear. In this case, the second gear needs to turn slower than the first gear. As a result, the torque in the second gear increases.*An animation illustrating the gear configuration that is needed to increase the torque in the second gear.**Change the direction of rotation*: Now consider the situation in which two external gears are meshed together. Here, the second gear will always turn in the opposite direction. Therefore, if the first gear turns clockwise, the second gear must then turn counterclockwise. Specially shaped gears can also be used to transfer the power at an angle.

Because they reduce the torque and create a mechanical advantage through their gear ratio, gears can be considered a simple machine. A *gear train* or a *transmission* refers to two or more meshing gears that work together in a sequence, while a *rack* is the term used to describe a linear toothed part. In the latter case, the gear’s rotary motion is converted into the translational motion of the rack.

Now that we’ve looked at some of the dynamics behind how gears work, let’s explore some of their applications.

Just as the mechanical devices that gears are used in vary, so do the tasks that they are designed to perform. Of these tasks, the most important is gear reduction. Take the example of an electric screwdriver. It needs very high torque while in operation, whereas the electric motor generates very little torque at a high speed. With gears, it is possible to increase the torque at the expense of a reduced speed.

Now consider the example of an automobile. The engine of an automobile generates power at a fairly high speed. This same speed cannot be directly transferred to the wheels of the vehicle. Why? The reason is two-fold: The speed is very high compared to the required vehicle speed and the amount of torque required to move a vehicle, from an idle position, is much higher than the torque generated by the engine. So we need a device that converts high-speed, low-torque power into low-speed, high-torque power. A gearbox, placed between the crankshaft and the driveshaft, is the solution. By reducing its speed, the gearbox increases the torque in the driveshaft. In other words, it changes the form of power, matching the total power of that generated in the engine.

One question that may come to mind is why should you numerically model devices that include gears when you can do analytical calculations with certain assumptions. While analytical calculations serve the purpose at the preliminary design stage of a transmission system, there is a greater emphasis today on optimizing these systems to make them smaller, lighter, quieter, more durable, and more reliable. Numerical modeling provides a path for accomplishing this, as it accounts for all of the realistic situations that create nonlinearity in the system. Such factors include the flexibility of shafts, bearing stiffness, gear mesh stiffness, gear mesh damping, backlash, transmission errors, and friction, among others.

The numerical modeling of gears is designed to address the following elements:

- Transmission efficiency
- Loads on the other parts of the system (e.g., bearings)
- Stresses in the shafts
- Vibratory motion of the system
- Natural frequencies of the system
- Radiated noise
- Stability regions
- Whirling of rotors
- Reliability and life

COMSOL Multiphysics version 5.2a provides new functionality to easily model a pair of gears. The functionality, included in the *Multibody Dynamics* interface, allows you to design a transmission system that consists of a number of gears and shafts. Several types of gears and racks can be modeled, such as the following:

*Bevel Gear**Helical Gear**Spur Gear**Worm Gear**Helical Rack**Spur Rack*

Additionally, you can model spur and helical gears as *internal gears*.

*Schematic of a Helical Gear (left) and Spur Rack (right), depicting various gear parameters.*

Gears are always used in pairs, which creates a need for a pair feature in COMSOL Multiphysics that connects two gears that satisfy the compatibility criteria. The following modeling nodes are available for connecting various types of gears:

*Gear Pair**Rack and Pinion**Worm and Wheel*

*Schematic of a Gear Pair (left) and Rack and Pinion (right), depicting various coordinate systems and other important parameters.*

An ideal gear pair is both rigid and frictionless, without any static transmission error or backlash. To make the gear pair more realistic, you can add the following effects via subnodes:

*Gear Elasticity*: Defines the elastic properties of the gear mesh (i.e., mesh stiffness)*Transmission Error*: Specifies the static transmission error, which can result from geometrical errors and geometrical modifications*Backlash*: Defines the backlash in a gear pair, which impacts the dynamics of gears that are unloaded or lightly loaded*Friction*: Accounts for frictional forces that occur at the contact point

The series of images below highlight some of the gear pairs you can model with the new functionality.

*From left to right: Spur Gears (External), Spur Gears (Internal), and Helical Gears (Cross).*

*From left to right: Bevel Gears, Worm and Wheel, and Rack and Pinion.*

In addition to this functionality, new parameterized gear geometry parts are also available. These gear parts are available for 2D and 3D models, with the option to customize the gear tooth and gear blank shape via input parameters. You can use these parts to build a range of items, from an individual gear to a pair of gears.

*A helical gear geometry created with new gear parts included in the Parts Library.*

You learn more about these upgrades in the Multibody Dynamics Module on the COMSOL Multiphysics version 5.2a Release Highlights page.

To showcase the new gear modeling capabilities, we’ve introduced several new tutorial models, each highlighting a different application.

Take the vibrations in a compound gear train tutorial model, for instance. In this case, we use spur gears, which are mounted on rigid shafts, to model the gear train. By performing a transient analysis, we can study the dynamics of not only the gears but also the vibrations within the elastic housing. The gear mesh stiffness is also calculated as a function of gear rotation via a parametric analysis.

*Normal acceleration in the elastic housing due to vibrations.*

*Von Mises stress distribution in the gears while analyzing the gear pair’s mesh stiffness.*

Our differential gear mechanism example, meanwhile, models a differential gear that is used within automobiles. With a differential gear, the outer drive wheel can rotate faster than the inner drive wheel — a necessary capability for a car to turn. Here, we compute the spider gears’ motion for two cases: when a car moves along a straight and a curved path. In both scenarios, the velocity magnitude of the components and the wheels’ angular velocity are calculated.

*Differential gear mechanism that enables two of the vehicle’s axles to rotate at different speeds.*

Also included in the mix is a tutorial model that computes the forces and moments that occur on bevel gears, as well as a tutorial that analyzes the dynamics behind helical gears. Both of these examples are highlighted below.

*Bevel gear motion as an incremental rotation is prescribed.*

*Helical pair eigenfrequency analysis.*

Modeling gears, a common element in mechanical devices, is now easy with new features and functionality available in the Multibody Dynamics Module. You have the ability to model various types of gears as well as include advanced effects, from the flexibility of shafts and backlash to gear mesh stiffness and damping. You can easily couple these gear dynamics with other physics to further extend the scope of your simulation analyses. The fatigue analysis of a gear tooth or the acoustic analysis of radiated noise from a gearbox are just some relevant examples.

Stay tuned for additional blog posts relating to gear modeling, where we’ll share more details on additions to the Parts Library, implementing features, and case studies. In the meantime, browse the resources highlighted below.

- Visit the COMSOL Multiphysics version 5.2a Release Highlights page to learn more about the new gear modeling features and functionality as well as additional upgrades
- Read another blog post that discusses the modeling of gears: “Modeling Magnetic Gears in COMSOL Multiphysics“

The outcome of your golf stroke is basically determined by the movement of the club head just prior to impact with the ball. Considering this, we should be able to see how your golf swing could be improved based on a multibody analysis.

Here, I will show you how I went about modeling various body parts, a golf club, and the connections among them using the Multibody Dynamics Module.

A simple way to simulate a golf swing is by using a *two-link model*, where the arm and club are the two links connected together by a hinge joint. In this model, the arm rotates about a fixed point, located at the base of the neck, and the club rotates about the wrist joint relative to the arm. The two-link model does not allow a sufficiently long backswing and is not actually a true representation of a real-life golf swing.

A better representation is the *three-link model*, which also includes the shoulder as a separate link. Adding one more link eliminates the problem related to the backswing. Hence, we will use this three-link model in our analysis.

*Diagram of the two-link and three-link swing models.*

This analysis focuses on maximizing the club head speed just prior to impact with the ball, by understanding the mechanics of a golf swing. The torque profile, applied by different body parts (shoulder, arms, and wrist) is assumed. It is limited by the maximum torque capacity of the respective parts. Among all applied torques, the wrist torque has quite an important role to play in getting the strike right.

*Modeled geometry of the three-link swing model.*

While simulating the downswing of the club, the entire swing can be divided into two phases. In the first phase, arm and club rotate about the fixed point as a rigid assembly. In this phase, the arm and club are folded to minimize the inertia about the center of rotation, which allows the development of maximum angular velocity for the given arm-torque capacity. Here, the wrist is cocked to the maximum possible angle (the amount it can be cocked before you become uncomfortable or the angle is detrimental to your swing) and the applied wrist torque tries to hold back the club in this position against the other two torques.

In the second phase, the wrist torque starts helping the shoulder and the arm torque by pushing the club forward to increase the club head speed to its maximum. The instance when the wrist torque changes its role is a crucial parameter in determining the stroke quality. To see its effect on the club head speed, we vary the wrist torque parametrically.

*Time history of torque applied by the shoulder, arm, and wrist for (t_w = 0.19 s).*

The driving torque, applied by the shoulder, arm, and wrist, has a maximum capacity and can vary within the defined range. The applied shoulder torque is assumed to start at its maximum positive value, after a short build-up time. The applied arm torque, which acts on the arm and reacts on the shoulder, builds linearly with time to its maximum positive value with the specified rate. The applied wrist torque, which acts on the club and reacts on the arm, is fully negative to start and switches to its maximum positive value at the specified time (t_w).

On the arm and wrist joint, the rotation is not fully free. It is limited in the forward and backward directions by the ligaments, muscles, joint shape, or a combination of all these. In our golf-swing analysis, rotation limit in the backward direction is more important and this limiting value may vary from person to person.

In the beginning of the downswing, due to inertial forces on the body parts, these rotations try to go below the limiting value. Hence, additional torque is applied by the equivalent stiffness and damping of the stop. This makes the *effective* torque applied by the arm and wrist more than what is actually *applied*.

*Golf club head speed during the downswing for different wrist torque switch times (t_w).*

Above, I have plotted the club head speed for various wrist torque switch times (t_w) for the entire duration of approximately 0.25 seconds. It can be observed that for t_w = 0.15 s, we reach the maximum speed before impact — this leads to early hitting. On the other hand, for t_w = 0.23 s, the club head speed couldn’t even reach its maximum value.

For t_w = 0.19 s, the club head speed is higher than the other two cases and close to the optimum value for the given geometrical parameters and muscle strength.

*Comparison of the golf club trajectory for different values of t_w (results are displayed in the increasing values of t_w).*

*Motion of links and the trajectory of arm joint, wrist joint, and the golf club head.*

Maximum arm torque throughout the swing and very high arm speed in the beginning of the downswing can cause an early release, with the club head reaching its maximum speed before actually hitting the ball.

We can also deduce that for the given torque capacity, it’s potentially advantageous to have a long arm swing as well as a large wrist-cock limit angle. Furthermore, the extent to which the wrist can *hold back* the release is limited by its torque capacity. Therefore, your golfing skills are also strongly associated with the delayed release and the late hit.

In the downloadable model, we also consider the shaft flexibility by dividing the club into two parts: the grip and the shaft. These are connected through a hinge joint with finite stiffness and damping. You can see that the effect of the shaft flexibility to the swing is negligible compared to other parameters.

- Check out our Golf Swing model in the Model Gallery for more information. If you log into your COMSOL Access account, you can download the MPH-file and documentation for this model.
- Check out our archived webinar on Multibody Dynamics Simulation
- Explore the Multibody Dynamics Module and Structural Mechanics Module
- Want to learn more about the physics behind other sports? You can find a number of related blog posts here.

A swashplate is a device that is used to transmit the pilot’s commands from the *non-rotating* fuselage to the *rotating* rotor hub and blades. The fact that the rotor blades are rotating at a very high speed makes the swashplate mechanism’s task more challenging. The mechanism consists of two main parts: a stationary and a rotating swashplate. The stationary swashplate is able to tilt in all directions and move vertically. The rotating swashplate is mounted on the stationary swashplate by means of a bearing, and is allowed to rotate with the main rotor mast.

A swashplate mechanism controls the *cyclic* and *collective* pitch of the rotor blades. The cyclic pitch of the rotor blades is used to change a helicopter’s roll and pitch. To tilt the helicopter forward, the difference of lift around the blades should be at a maximum along the left-right plane, creating a torque that, due to the gyroscopic effect, will tilt the helicopter forward instead of sideways. This is accomplished by tilting the swashplate assembly through pushrods. Collective pitch of the rotor blades, responsible for the average lift force, can be changed by moving the swashplate assembly vertically without tilting it.

The Multibody Dynamics Module provides pre-defined features to establish various types of joints between components. In this model, different components of a swashplate mechanism are connected together using *Ball*, *Hinge*, *Prismatic*, *Cylindrical*, *Planar*, and *Reduced Slot* joints. The connections in a swashplate mechanism are positioned in such a way that components form a closed loop — the swashplate mechanism is thereby a good example of a closed loop multibody system. If you were to model all the components as rigid, the mechanism would become overly constrained and difficult to simulate. This is not the case if you model it in COMSOL Multiphysics; the constraint elimination process removes the redundant constraints from the system.

*The animation above shows the workings of a helicopter swashplate mechanism.
Here, von Mises stresses are plotted on the surfaces of flexible rotor blades (the deformation is
magnified for better visualization).*

A transient analysis is performed to analyze the workings of the swashplate mechanism. Our specific interest in this case is finding out the effect of cyclic and collective pitch, given through the swashplate mechanism to the rotor blades, on the angle of attacks of rotor blades that in turn affects the generation of lift force. In terms of flexible rotor blades, *lead-lag* and *flapping* phenomena are also demonstrated. An eigenfrequency analysis is performed to find the rigid body modes and eigenmodes of a swashplate mechanism with flexible rotor blades.

*The torsional mode of flexible rotor blades of a helicopter swashplate assembly. The eigenfrequency
corresponding to this mode is close to 185 Hz.*

- Upcoming webinar:
*Multibody Dynamics Simulation with COMSOL Multiphysics*, July 2, 2013 - Check out our Helicopter Swashplate Mechanism model for more information. If you log into your COMSOL Access account you can download the documentation for this model as well.
- Explore the Multibody Dynamics Module

A double pendulum is a simple physical system comprised of two arms that are connected to each other through a hinge joint. In spite of being a simple system, a double pendulum also exhibits rich dynamic behavior with a strong sensitivity to initial conditions, making it an example of a chaotic system. A double pendulum is also a highly nonlinear, under-actuated mechanical system.

A double pendulum model is used in control systems to measure the effectiveness of stabilizing algorithms. Many real-life physical structures can be approximated with a double pendulum to gain more insight about the system behavior. Some typical applications include analyzing the sway motion of a payload in an overhead crane, or optimizing a tennis stroke, where the two arms of the double pendulum are the racquet and forearm.

A hinge joint, also known as a pin joint, is a type of joint that connects two components in such a way that they are only allowed to rotate about each other. This allowed rotation is in a specified direction, known as the *axis of rotation*, and at a specified location, known as the *center of rotation*. The axis of rotation and the center of rotation are, in general, attached to one of the components, and move in space with that component in transient simulations. All other types of possible motion, namely translation, or rotation between the two components, are constrained by this type of joint. As a consequence of constraining these other possible motions, forces, and moments corresponding to the constrained degrees of freedom are transferred from one component to another component though this joint.

The Multibody Dynamics Module provides a pre-defined feature to establish a hinge joint between two components. This *Hinge Joint* feature is used in the double pendulum model to connect both the pendulum arms in our example model.

The aim of this video is to demonstrate how to use a *Hinge Joint* feature in COMSOL Multiphyics to model a double pendulum and perform a transient analysis. Here, pendulum arms are subjected to a gravity load and their resultant oscillatory motion is studied. Our specific interest is in computing the forces experienced by the hinge joint, and tracking the locus of the bottom tip of the pendulum. Here both the pendulum arms are assumed to be flexible components that give us the freedom to evaluate the stresses generated in the arms.

*This video will demonstrate the modeling of a double pendulum using the Multibody Dynamics Module available for use with the Structural Mechanics Module.*

The primary aim of this model is to perform a flexible multibody analysis. Here, we demonstrate features available in the Multibody Dynamics Module to model interactions between mechanical components, such as joint forces and motion tracking. We will perform a transient analysis of the double pendulum motion, and track the locus of the double pendulum’s bottom tip, as it oscillates under gravity load.

Choose 3D as the spatial dimension, and select Multibody Dynamics from the Structural Mechanics branch. Choose the ‘Time Dependent’ study type, and click the Finish button.

Right-click the geometry node, and select the “Insert sequence from file” option. Browse to the model’s Model Library folder and Import the geometry sequence from the double pendulum file.

For the Finalization method, make sure to form an “Assembly” and right-click the Geometry node to build the sequence. To help with the joint definition later on, create explicit selections on the hinge pin and the barrel hinge. For better visualization of the pin boundaries, we can hide the barrel hinge. Choose boundary as the geometric entity level and select a boundary on the pin surface. Then check the “group by continuous tangent” option to add the pin’s other boundaries. Un-hide the barrel hinge and create a second explicit to repeat the selection and creation process for the inner boundaries of the barrel hinge. Hide the hinge pin this time, select boundary and click on one interior boundary of the hinge barrel. Check the “group by continuous tangent” option to select all the interior boundaries.

A third explicit is created, and the same boundary selection process is used to create a group of boundaries around which the pendulum will rotate. Under the Materials node, open the Material Browser and from the Built-In library, add Aluminum to the model for both components of the pendulum.

We now begin the physics setup for the Flexible Multibody problem. From the Multibody Dynamics node, create an attachment using the group of boundaries from the first explicit. Create a second attachment with the second explicit’s boundaries. Now these two attachments can be used to create and define a hinge joint found under the Multibody Dynamics node in the joint menu. In the joint setting window, you can view the joint sketch by expanding the Sketch tab. In the Attachment Selection window, choose Attachment 1 as the source and Attachment 2 as the destination attachments respectively. We keep the centroid of source as the center of the joint and specify the joint axis to be along the y axis.

Create a rigid connector boundary condition using the explicit three boundaries for the pendulum to rotate around. Prescribe displacements in all x, y, and z directions, then constrain the rotation around the x and z axes, limiting rotation to the y direction. From the Multibody dynamics node, add a body load and add both domains to the selection. The force of the body load is equal to the weight of both components. Keep the default mesh settings for this model, and build the mesh.

Go to the Step 1 time dependent node and in the “times” edit field, define a range to solve for 20 seconds, with a step size of 0.025 seconds. Right click Study1 and click compute.

*Required analysis can now be performed on the solved model. The default plots are created to view the displacement and the component velocity. You can view the results at any of the 800 results solved in this model. Right click ‘Results’ and add a ’1D plot group’, then right click 1D plot group and add a ‘global’ plot. Click replace expression and go to Multibody Dynamics, hinge joints, hinge joint 1, joint force, and choose the x component. You can now copy this expression and paste it in the fields below, replacing the suffix x with y and z respectively. Click plot to view the joint forces at the different times. Create another ’1D plot group’, with a ‘point’ plot this time and add any point on the bottom face to the selection. In the expression field type ‘z’. In the expression field for the x-axis of this plot, type ‘x’. Click plot to view the bottom tip displacement.Here is an animation showing the bottom tip displacement over the twenty second interval.*

- Check out our Dynamics of Double Pendulum model for more information. If you log into your COMSOL Access account you can download the documentation for this model as well. In this tutorial model, the additional features available on
*Hinge Joint*, e.g., constraints, locking, spring and damper, and prescribed motion are also demonstrated. - Explore the Multibody Dynamics Module

The objective of multibody analysis is to find critical areas of a system to perform more detailed component-level structural analysis. Multibody analysis also gives insight into the system dynamics, forces experienced by segments of the structure, and stresses generated in flexible components leading to failure due to large deformation or fatigue.

In mechanical systems, components are interconnected in such a way that only a certain type of motion is allowed between them. One way to model such types of connections is to establish physical contact, or unilateral contact, between the two components. The benefit of using the unilateral contact approach lies in the fact that it is very generic and can model any type of connection. However, this approach only works if you use actual physical geometry of the components and fails to work with the abstract form of the system. Moreover, this approach, in spite of being generic, is computationally difficult to solve in general and the difficulty level increases significantly in cases where friction needs to be accounted for on the contact surfaces.

When it comes to complex mechanical systems, a computationally-efficient technique is needed to model the connections. Here comes the mathematical representation of different types of connections known as *Joints*. An approximation is taken in cases of flexible components where the connecting surfaces are assumed rigid.

These *Joints* provide an efficient way to connect two or more components by constraining their motion without solving for the physical contact between them. A *Joint* feature of the Multibody Dynamics Module requires the center of the joint and the axis of the joint as an input. These inputs can be either extracted from the physical geometry or can be given directly.

A multibody analysis, using rigid body dynamics approach, is used to find motion and stability of mechanical systems. The stresses and deformation in a component can be estimated later using the forces experienced by the component. This approach works for small elastic deformations. However, in the presence of large deformations and material nonlinearities, a *Flexible Multibody Analysis* is the only way to get accurate results, and hence optimize the design. In a *Flexible Multibody Analysis*, components of a system that are likely to have large deformations are modeled as flexible and other components are assumed rigid.

*In the righter-most section of the above picture you can see the deformation and von-Mises stress distribution
in the rotor blades of a helicopter swashplate mechanism. In the bottom-left you can see the time variation of the
lift force applied on each rotor blade. (Note: In this model, the rotor blades are the only flexible parts in the
entire mechanism.)*

Establishing connections using *Joints* and performing a *Flexible Multibody Analysis* is easy through the new Multibody Dynamics Module that was released on May 3^{rd} with COMSOL Version 4.3b.

A library with eight different types of *Joints*, namely, Prismatic, Hinge, Cylindrical, Screw, Planar, Ball, Slot, and Reduced Slot are included in this module. Transient, frequency-domain, eigenfrequency, and stationary multibody dynamics analyses can be performed.

Sometimes the allowed motion between two components is not free due to the restrictions imposed by other physical objects. Here, the ability to limit and conditionally lock the motion is something that helps in modeling complex systems. In the field of robotics, the motion between two components is in general a known function of time. Many times, *Joints* are spring-loaded instead of being free to improve the system stability. All this is possible to model with this new module.

The Multibody Dynamic Module expands on previous capabilities of COMSOL Multiphysics and the Structural Mechanics Module, and it is the first dedicated product we have released that deals with the modeling of a mechanical assembly. Tune into our free Multibody Dynamics Simulations webinar on June 13^{th} to learn more.