Computer Simulation in Mechanical Engineering
Computer Simulation in Mechanical Engineering
What computer simulation does
Computer simulation uses a mathematical model and a computer to predict how a physical system will behave. In mechanical engineering, a model describes the system’s components, their physical properties, and the forces or interactions acting on them. The computer then solves the model’s equations to estimate how the system changes over time.
Simulation is especially useful when a system is too complex for a person to calculate by hand. A model of a mechanical system may generate millions—or even billions—of equations. The computer can assemble and solve those equations according to specified initial conditions, material properties, and external influences.
A simulation’s results are predictions, not direct observations of reality. Their usefulness depends on whether the model represents the physical system accurately and whether the results have been checked against experimental evidence.
Modeling mechanical systems
Equations of motion
The motion of mechanical bodies is governed by Newton’s second law: the total force acting on a body determines its acceleration. In a simplified form,
where m is mass, a is acceleration, and ∑F is the sum of forces acting on the body.
For a complex mechanical system, the force balance may include:
External forces, such as gravity or forces applied by an actuator.
Joint or constraint forces, which arise from connections between parts and restrict their relative motion.
Contact forces, which arise when bodies touch.
Friction forces, which resist relative sliding between surfaces.
The equations of motion describe how the system’s state—such as positions and velocities—evolves over time.
Constraints, contact, and friction
Mechanical systems often contain joints that constrain how components move relative to one another. These constraints can be represented by algebraic equations, while the equations of motion are generally differential equations because they describe change over time. A full simulation may therefore combine differential equations of motion with algebraic equations for constraints and interactions.
When two bodies come into contact, the contact force includes a component normal to the contact surface. If the surfaces have a nonzero friction coefficient, a tangential friction force can also develop. Modeling these interactions is important for predicting such outcomes as slipping, rolling, collision, or getting stuck.
A simulation must account for the relevant interactions rather than treating every component as if it moved freely. In systems with many bodies and contacts, these interactions contribute substantially to the size and complexity of the calculation.
Rigid and flexible bodies
A rigid-body model treats a component as maintaining its shape while moving. A flexible-body model allows a component to deform under forces. The choice matters when deformation affects performance—for example, when a rubber tire changes shape as it rolls over an obstacle.
Flexible-body simulations can be computationally demanding, particularly when they include nonlinear material behavior, contact with other objects, or many deformable elements.
Modeling fluid motion
Fluid motion is governed by conservation laws that differ in form from the equations used to model solid-body motion. Two central principles are conservation of mass and conservation of momentum.
Conservation of mass
The continuity equation expresses conservation of mass. In a general fluid, it can be written as
where ρ is fluid density, u is velocity, t is time, and ∇⋅ represents the divergence of a flow. The equation states that mass does not simply appear or disappear: changes in mass within a region are related to mass flowing into or out of it.
Conservation of momentum and the Navier–Stokes equations
The Navier–Stokes equations describe fluid momentum balance. They account for fluid acceleration, pressure, viscosity, and applied forces. A common form for a Newtonian fluid is
where p is pressure, τ represents viscous stresses, and b represents applied force per unit mass, such as gravity. In an incompressible Newtonian fluid with constant viscosity, the momentum equation is often expressed as
where μ is dynamic viscosity.
These equations can be understood as a fluid version of force-and-motion balance: fluid mass multiplied by acceleration is balanced by pressure forces, viscous effects, and applied forces.
Spatial discretization and smooth particle hydrodynamics
A computer generally cannot solve fluid equations at every point in a continuous fluid. It must represent the fluid using a finite computational model, a process known as spatial discretization.
One method used for this purpose is smooth particle hydrodynamics (SPH). SPH represents fluid behavior through computational particles and estimates fluid properties from nearby particles. It is one approach to discretizing fluid motion, particularly useful in simulations that involve fluid interacting with moving mechanical systems.
Multiphysics and interacting materials
Many engineering problems involve more than one kind of physical behavior. A rover, for example, may combine rigid-body movement, flexible tires, contact with granular soil, and fluid interaction. A simulation that models multiple coupled physical processes is often called multiphysics simulation.
In these problems, the physical effects influence one another. A vehicle’s movement changes the soil beneath its wheels; the resulting soil deformation affects the forces on the vehicle. Similarly, a vehicle moving through water creates fluid motion, while pressure and drag from the water affect the vehicle’s movement.
Granular materials
Granular material consists of collections of discrete particles, such as sand, soil, grains, or powders. Its behavior can be important in transportation, agriculture, pharmaceuticals, and other industries. Granular materials may flow, compact, resist motion, or shift under load, so predicting their interaction with equipment and vehicles can be challenging.
Granular simulation can also be used to study large-scale events. For example, a landslide model can represent a moving mass of material and its impact on objects such as buildings or rocks. The motion of the material and its interaction with those objects determine the resulting damage and displacement.
Why engineers use simulation
Testing when physical experiments are impractical
Simulation can make testing possible when building or operating a physical prototype is impractical, expensive, or impossible. This is particularly important for systems designed to operate in remote or unusual environments.
For instance, a rover intended for a moon with very low gravity cannot be tested in that exact environment on Earth. Simulation can help engineers examine how gravity and granular terrain affect rover movement, the likelihood of becoming stuck, and the performance of different designs.
Simulation can also support preparation for planetary missions. A rover model can be tested in simulated terrain to assess sensor designs intended to help it avoid getting trapped in sand or other loose material.
Reducing the cost of design changes
Once a computer model exists, engineers can modify design parameters without building a new physical prototype for every variation. They can change properties such as vehicle mass, run the simulation, and observe how the predicted behavior changes—for example, how far a heavier vehicle sinks into soft ground.
This makes simulation valuable during design exploration. It allows teams to study many possible configurations before committing time and materials to physical construction.
Exploring many designs efficiently
Simulations can run in parallel on multiple processors or in cloud computing environments. Large numbers of design variations can therefore be evaluated at once. Comparing their results can reveal:
Trends: how behavior changes as design parameters change.
Sensitivities: which parameters have the greatest influence on performance.
Trade-offs: how improving one property may affect another.
For high-risk systems, repeated simulation can help engineers examine a wide range of possible outcomes. For example, entry, descent, and landing sequences for a Mars mission can be simulated many times to understand risks and improve the design before an actual mission.
Limitations and responsible use
Model quality determines result quality
A simulation is only as useful as the model behind it. If the model omits important physical effects, uses inaccurate material properties, or represents interactions poorly, its predictions may not match reality.
A model can produce precise-looking results without being predictive. Accuracy must be established, not assumed: simulation output should be interpreted in light of the model’s assumptions and limitations.
Validation against physical testing
Validation is the process of checking whether a model’s predictions agree sufficiently with observations of the real system. It generally requires comparing significant simulation results with physical tests in at least a selection of relevant cases.
Simulation does not eliminate the need for experiments. Physical testing provides evidence about whether the model represents reality well enough for the intended purpose. Without that evidence, engineers have limited grounds for trusting the predictions.
Time, cost, and expertise
Developing a useful simulation capability can require substantial time, money, and specialized knowledge. Building a good model is not usually a task that can be completed in a brief session. Engineers need to understand both the physical system and the modeling and computational methods being used.
Simulation is therefore most effective when users know what the model represents, how it was constructed, and how to assess its predictions.
Computational limits
Modern processors and graphics hardware can perform enormous numbers of calculations and support many parallel tasks. Even so, available computing power is not unlimited. Large or detailed simulations can still require significant computational resources and time.
Efficient simulation depends not only on powerful hardware but also on numerical methods and software designed to make effective use of that hardware.
Simulation software and its capabilities
A simulation engine provides the computational foundation for building and solving models. A multiphysics engine can support different kinds of systems and physical processes within a shared software framework, including bodies, vehicles, fluids, flexible structures, and granular materials.
Chrono is an open-source multiphysics simulation engine. Its capabilities include core mechanical simulation and additional modules for different modeling needs.
Core mechanical simulation
The core engine handles mechanical systems and provides the underlying functionality for modeling their motion and interactions. It supports the construction and solution of models involving mechanical bodies and their dynamics.
Parallel simulation
Parallel-computing tools distribute work across multiple processing cores. This can accelerate certain classes of simulations, especially problems that would otherwise take a long time to run on a single core.
For example, a simulation of particles sliding and interacting in a bowl can model the bowl and particles together. If the computational task is suitable for parallelization, multiple cores can help calculate the system’s evolution more efficiently.
Vehicle dynamics
Vehicle simulation can examine how vehicles move over rigid or deformable terrain. Combining vehicle dynamics with terrain interaction allows engineers to study more than a vehicle’s motion in isolation: it can also reveal how the terrain responds to the vehicle and how that response changes vehicle performance.
Fluid–solid interaction
Fluid–solid interaction models the coupled behavior of a moving solid system and a surrounding fluid. A vehicle moving through water, for example, affects the water’s motion, while water pressure and flow affect the vehicle.
Such simulations can be used to study whether a vehicle can operate under particular water conditions, including how the depth and speed of flowing water influence its movement.
Finite element analysis
Finite element analysis (FEA) is used to represent how structures deform by dividing them into computational elements and calculating their responses. It can model flexible components such as rubber tires.
A demanding example combines nonlinear tire deformation, a vehicle moving over an obstacle, and granular terrain made up of a large number of elements. This kind of coupled simulation can require several days of computation because it must resolve multiple interacting physical effects.
Granular dynamics
A granular-dynamics module models the movement and interaction of particles in materials such as sand or soil. Its applications include equipment operating in granular media, vehicles crossing loose terrain, and large-scale flows such as landslides.
Simulation for autonomy and robotics
Autonomous vehicles and robots require simulations that can represent more than mechanical movement. Their development may also involve sensor simulation, connections to programming tools, and the coordination of many simulated agents.
Sensor simulation represents what sensors would perceive in a modeled environment.
Interfaces to languages such as Python can make simulation tools accessible through broader programming workflows.
Machine-learning and artificial-intelligence tools can be combined with simulation for developing and studying autonomous systems.
Multi-node simulation can allow teams of vehicles or robots to operate together in large scenarios. Distributing the work across computing nodes can speed up simulations involving many agents without imposing the full computational load on one machine.
These capabilities make it possible to study interactions among autonomous vehicles or robots while also modeling the physical world in which they operate.
Engineering questions simulation can answer
Simulation supports several kinds of engineering decisions:
Design: Will the mechanical system break, and how will design changes affect its behavior?
Control: Can the system be made to behave in a desired way?
Optimization: Can it be made lighter, faster, less expensive, or otherwise more effective?
Uncertainty assessment: How much confidence should be placed in the design, and is it likely to meet its intended goals?
The appropriate use of simulation combines a well-constructed model, computational methods suited to the problem, and validation against physical evidence. Together, these allow engineers to explore designs and operating conditions that would be difficult, costly, or impossible to investigate through physical testing alone.

Ask anything
We've read this whole study set, so questions about it get the best answers.