Hello! Welcome to your next lesson.
In our last session, we focused on the static analysis of a single joint, calculating the forces and stresses in an interference fit. Today, we're shifting our perspective from individual components to the dynamic behavior of entire systems. We will move from statics to kinematics.
This lesson covers the learning outcome: Analyze velocity and acceleration in linkage mechanisms using software tools.
We'll explore how to use Onshape to build and simulate the motion of mechanisms like the piston and crankshaft assembly you might find in an engine. You won't just be watching an animation; you'll learn how to extract quantitative data, like velocity and acceleration plots, directly from your CAD model. This is a powerful skill in a modern engineering workflow, allowing you to validate a mechanism's performance long before manufacturing.
1. The Engineering Workflow for Kinematic Analysis
Before diving into the specifics of Onshape, it's essential to understand the general process that engineers follow when simulating mechanisms. A structured approach ensures you don't miss critical steps and that your results are reliable.
How to simulate linkages in CAD: A step-by-step guide
This article by Yogesh Sahu on LinkedIn provides an excellent, concise 12-step guide for simulating linkages in any CAD system. It perfectly captures the professional workflow you're looking to master.
Please read the entire article. Pay attention to the overall sequence, from the initial sketch to post-processing and validation. We will be using this sequence as a road map for our lesson.
As you can see, the process moves from conceptualization (kinematic sketch) to detailed setup (mates, drivers), execution (running the simulation), and finally, analysis (post-processing results). We will now explore how to execute these steps within Onshape.
2. Defining Motion: Mates and Relations in Onshape
The heart of any kinematic simulation is correctly defining how parts can move relative to one another. This corresponds to Step 4: "Assemble with joints/mates" from the workflow article.
Your experience with other CAD systems might involve applying multiple low-level constraints (e.g., concentric, coincident) to create a single joint. Onshape streamlines this by using higher-level "Mates" that directly represent real-world kinematic pairs.
Onshape Assemblies, Mates, and Simulation
To understand Onshape's approach, let's review the core concepts of Mates and Mate Connectors. This blog post from Onshape explains the philosophy and provides a library of the available mate types.
Please read the sections titled 'High-Level Mates vs. Low-Level Constraints' and 'The Library of Motion: Mate Types Explained'. As you read, think about which mates you would use to model a simple door hinge or a piston in a cylinder.
The key takeaway is that you choose a mate based on the desired motion. For linkages, the most common mates are:
- Revolute Mate: Allows rotation about a single axis (a pin joint).
- Slider Mate: Allows linear translation along a single axis (a sliding block).
- Cylindrical Mate: Allows both rotation and translation along an axis.

3. Practical Application: Simulating a Boxer Engine
Now let's apply this theory to a practical example. We'll walk through a video that demonstrates the assembly and animation of a boxer engine. This will cover steps 2 (Model parts), 4 (Assemble with mates), and 6 (Define drivers) from our workflow.
How to Build a Boxer Engine in Onshape (Part 1: Modeling & Motion)
This official Onshape tutorial demonstrates how to build and animate a boxer engine. It's an excellent case study for seeing how Revolute and Slider mates work together to create a complex linkage.
Please watch the following segments: Assembly and Mating (13:33 - 21:28): Pay close attention to how the Revolute mate is used for the crankshaft and connecting rods, and how the Slider mate is used for the pistons. This is where the kinematic chain is defined. Animation (21:28 - 22:34): This section shows the result of the mating strategy. The 'Animate' command on the crankshaft's revolute mate acts as a temporary motion driver, allowing for a visual check of the kinematics.
The video shows how a single rotational input on the crankshaft drives the complex, oscillating linear motion of the four pistons. The "Animate" function is a fantastic tool for a quick qualitative check to ensure the mechanism moves as expected and doesn't bind.
4. From Animation to Analysis: Plotting Velocity and Acceleration
Visual animation is a good first step, but for true engineering analysis (Step 10: "Post-process results"), we need quantitative data. How fast is the piston moving at a specific crank angle? What is its peak acceleration? Answering these questions requires plotting these values over time.
In Onshape, the "Animate" feature is for visualization. To generate plots, you need to use the Motion study tool.
Here is the general procedure to create a velocity or acceleration plot in Onshape:
- Define Mates: Assemble your mechanism with the appropriate mates (Revolute, Slider, etc.), as shown in the video.
- Open Motion Study: In the assembly tab, click the "Motion study" icon on the right-side vertical toolbar. This opens the Motion study panel at the bottom of the screen.
- Add a Driver: In the Motion study panel, add a form of actuation. For a rotating input, you would add a Motor to a Revolute mate (e.g., the crankshaft mate). You can define the motor's speed, for example, 3000 rpm.
- Add a Result: Click the "Add result" button. A dialog will appear.
- Select Measurement:
- Choose the part or mate connector you want to measure (e.g., click on the piston part).
- Select the quantity you want to plot (e.g., "Linear velocity" or "Linear acceleration").
- Specify the direction of measurement (e.g., along the axis of the slider mate).
- Run the Study: Click the "Play" button in the Motion study panel. Onshape will calculate the motion and generate a graph of your selected result versus time.
This plot gives you the quantitative data needed to evaluate the mechanism's performance, check for excessive accelerations that could lead to high inertial forces, or ensure a velocity profile meets a specific requirement.
Test your understanding!
Imagine you are analyzing the boxer engine from the video. You have set up a Motion Study with the crankshaft rotating at a constant 2000 RPM. You plot the linear acceleration of one of the pistons along its axis of travel. What shape would you expect the acceleration vs. time graph to have? Will the peak acceleration occur when the piston is moving fastest or slowest?
Show answer
The acceleration vs. time graph would also be sinusoidal (or nearly so). Peak acceleration will occur when the piston is at the very top and very bottom of its stroke (Top and Bottom Dead Center). At these points, the piston's velocity is momentarily zero as it changes direction. The acceleration is highest at these points of reversal, while the velocity is zero. Conversely, acceleration is near zero when the piston is moving at its fastest speed (near the middle of the stroke).
Conclusion
Today you've learned how to bridge the gap between a 3D model and a functional kinematic analysis. By using a structured workflow, you can confidently set up, simulate, and extract meaningful performance data from linkage mechanisms in Onshape.
Key Takeaways:
- Kinematic analysis follows a structured workflow: define geometry, assemble with mates, add motion drivers, run the simulation, and analyze the results.
- Onshape uses high-level Mates (like Revolute and Slider) to define the degrees of freedom in a mechanism.
- The "Animate" command on a mate is a quick tool for visual, qualitative checks of motion.
- The "Motion study" tool is used for quantitative analysis, allowing you to add motors and generate plots of displacement, velocity, and acceleration.
Preview of the Next Lesson:
With this lesson, we conclude our module on advanced components and powertrains. The analysis skills you've just acquired are the perfect foundation for our next major task. In the upcoming module, we will begin Project 2: Rotary Mechanism Design, starting with the lesson "Define requirements for a rotary indexing or positioning mechanism." You will be using motion analysis throughout that project to design and validate your mechanism's performance.