GitHunt
GE

GeoCd/gear-stress-simulator

MATLAB App Designer simulator for gear stress calculations, with 3D stress visualization with five fatigue failure theories (Goodman, Soderberg, Gerber, Langer, Elliptic).

Gear Stress Graphical & Mathematical Simulator

A MATLAB App Designer application that automates gear stress calculations and generates 3D visualizations of stress distributions, supporting five fatigue failure theories. Built as an academic project at UPIITA, IPN around September - December 2023

What it does

Given a set of gear parameters, the app automatically computes the stress equations, evaluates safety factors and maximum loads, and renders interactive 3D plots of the stress distribution across the gear geometry. Results can be inspected from multiple viewing planes and compared against five fatigue failure criteria.

Key features:

  • Dual gear analysis: Pinion and Crown (Corona) parameters entered independently; results computed for both simultaneously
  • 3D stress visualization: Interactive plots with selectable view planes (XZ, YZ, XY, 3D) and diagram overlays (Fx, Fy, Fz totals and per-gear)
  • Five fatigue failure theories: Langer, Goodman, Soderberg, Elíptica, Gerber, they are switchable from the UI with live plot update
  • Force distribution tables: Tabulated x/y/z force components and load values per node exported to the UI tables
  • Parameter validation: Results verified against manual reference calculations during developmentwith minimal error attributed to floating point precision differences

Screenshots

Full interface - 1

Simulator - 1

Full interface - 2

Simulator - 2


Repository contents

gear-stress-simulator/
├── SimuladorEngranesFinal.mlapp   # Main App Designer application
├── ContornoEngrane.m              # Involute gear profile generator
├── Vector3D.m                     # 3D force/moment vector renderer (x, y, z axes)
├── Vector3DMom.m                  # Moment vector surface geometry
├── Vector3DDis.m                  # Distributed load vector geometry (fixed radius)
├── Vector3DDisenoA.m              # Design vector geometry with axis rotation support
├── images/
│   ├── simulator_stress_view.png
│   └── simulator_gear_diagram.png
└── README.md

Helper functions

ContornoEngrane.m: Generates the full involute gear tooth profile from scratch.

Vector3D.m: Builds the 3D surface geometry for a force or moment vector arrow. Handles x, y, and z axis orientations and both head (H) and tail (A) directions via rotation matrices. Called by the app to render load vectors on the gear diagrams.

Vector3DMom.m: Generates the toroidal sweep surface used to represent moment vectors. Applies two rotation sweeps to produce the curved arrow body, then rotates the result to the correct axis orientation.

Vector3DDis.m: Similar to Vector3DDisenoA but with a fixed small radius, used for distributed load arrow rendering.

Vector3DDisenoA.m: Generates the arrow geometry for design load vectors with a configurable radius. Supports z, y, and x orientations via rotation matrices applied to the base arrow surface.


How to run

Requirements: MATLAB R2020a or later with App Designer support (included in base MATLAB with no additional toolboxes required for the UI; plots may use basic surf/mesh calls).

  1. Clone or download the repository
  2. Open SimuladorEngranesFinal.mlapp in MATLAB (double-click or open('SimuladorEngranesFinal.mlapp') from the command window)
  3. Click Run in the App Designer toolbar, or run it directly from the MATLAB editor
  4. Enter gear parameters in the Tabla 1 (Piñón) and Tabla 2 (Corona) input fields
  5. Select the desired view plane and failure theory from the radio button panels
  6. Press Actualizar to regenerate plots and recalculate

Parameters and outputs

Inputs (per gear - Piñón / Corona)

Parameter Description
N Number of teeth
Coro. Module / correction factor
Param Gear parameter
Piñón Pinion reference value

Outputs

Output Description
3D stress plot Surface/mesh plot of stress distribution across gear face
Force tables x, y, z force components per node (Tabla 1 / Tabla 2)
Esf (stress value) Computed stress at selected point, shown on plot
Safety factor Evaluated against selected fatigue failure theory
N(x,y), q(x,y) Coordinate-tagged stress annotations on the 3D plot

Failure theories

  • Langer — Static yield line
  • Goodman — Linear fatigue criterion (most common in practice)
  • Soderberg — Conservative linear criterion
  • Elíptica — Elliptic (ASME) criterion
  • Gerber — Parabolic criterion

Validation

Simulator outputs were verified by contrasting computed results against manual reference calculations for known gear design cases. The minimal errors observed were consistent with floating point precision differences between hand calculations and computational processing with no functional impact on design results.


Notes

  • The .mlapp file contains both the UI layout and the application code. Open it in App Designer to inspect or modify either.
  • The app was developed and tested on MATLAB R2023a. If you encounter rendering issues on older versions, the underlying calculation functions can be extracted and run as standalone scripts.