CAD, Simulation and Digital Prototypes

Models that answer questions before anything is built: hand checks, finite elements, tolerance and motion simulation.

What digital prototypes are for

A digital prototype is a model in the computer: CAD geometry, a finite-element model, a motion study, a circuit simulation or a control model. It costs no material, can be changed in minutes and can be tested in ways a physical one cannot (a thousand tolerance combinations, a hundred load cases). It cannot replace a physical test, but it makes the physical prototype better and fewer.

  • Fit and interference: do the parts go together, and can a hand or a tool reach them?
  • Strength and stiffness: will it carry the load; where is the weak point?
  • Motion: does the linkage reach the positions and avoid collisions?
  • Tolerances: what happens to the gap when every part is a little off?
  • Behavior: will the control loop, filter or circuit do what it should?
  • Appearance: how does it look from every side, in the right colors (a rendering)?

CAD models: parametric, checked, shared

A parametric CAD model is built from dimensions and constraints, so changing a number (the wall thickness, the board size) updates the whole design. Build the model the way it will be made, and check it before anything is built.

  • Model the real parts at full size, including connectors, boards, batteries and fasteners (import the manufacturers’ models) and check them against the case.
  • Run an interference check on the assembly: parts overlapping by even 0.2 mm will not go together.
  • Check the clearances for the process: printed parts need 0.2 to 0.4 mm gaps, laser-cut 0.1 mm plus kerf (see Mechanisms, Fasteners and Snap-Fits).
  • Section the model to look inside; explode it to check the assembly order; animate the motion.
  • Use a skeleton or master sketch for key dimensions, so that parts follow when the layout changes.
  • Name and version the files; keep them in a repository or a shared drive, with a note of what changed.
  • Run the manufacturing checks your process offers: wall thickness, overhangs and draft angles for printing and molding (see Designing for 3D Printing).

Worked example: the value of a 20-minute CAD check

  • Suppose each failed physical build costs 5 hours (print, assemble, find the clash) and a 20-minute interference and clearance check in CAD catches the problems before the first build. If it avoids 3 of 4 builds, it saves about 18 hours and the material.
  • It does not catch everything: a CAD model has no warping, no sagging bridges, no brittle snap hooks. It catches the geometric mistakes, which are the commonest.

Hand calculation first

Before building a simulation, estimate the answer by hand with the formulas of beams, columns and shafts (see Structures and Strength of Materials). A hand calculation takes minutes, shows which quantities matter and gives a number to check the simulation against.

Worked example: a cantilever bracket in aluminum and in PLA

  • A bracket of 20 mm width and 3 mm thickness projects 60 mm and carries 50 N at its tip. I = b h³ ÷ 12 = 45 mm⁴.
  • Deflection δ = P L³ ÷ (3 E I): in aluminum (E = 69 000 MPa) 50 × 60³ ÷ (3 × 69 000 × 45) = 1.16 mm; in PLA (E = 3 500 MPa) 22.86 mm.
  • Stress at the root σ = M c ÷ I = 3 000 N·mm × 1.5 ÷ 45 = 100 MPa. Against the yield of 6061-T6 (about 240 MPa) the safety factor is 2.4; against a typical 40 MPa for printed PLA (layer direction matters) it is 0.40: the PLA bracket fails.
  • In minutes, the hand check shows the printed version needs a thicker or shorter bracket, or ribs: a simulation would give the same answer but would take longer to set up.

Finite-element analysis: what to trust

Finite-element analysis (FEA) divides the part into many small elements and solves the stresses and deflections numerically. It handles shapes that no formula can. It is only as good as its inputs: the geometry, the loads and constraints, the material and the mesh.

Worked example: mesh convergence in one dimension

A tapered bar (area falling from 100 to 50 mm² along 100 mm) is pulled with 10 000 N. The exact elongation is 0.0693 mm. A finite-element model with n equal elements, each using the area at its midpoint, gives:

ElementsElongationError
10.0667 mm3.82 %
20.0686 mm1.07 %
40.0691 mm0.28 %
80.0693 mm0.07 %
160.0693 mm0.02 %
320.0693 mm0.00 %

The error falls as the mesh is refined (here as 1 ÷ n²). This is a convergence study: refine until the answer stops changing. A result that changes with the mesh is not yet an answer.

  • Check the simple cases first: run a model whose answer you know (the cantilever above) and compare.
  • Constraints matter most: a fixed support is stiffer than a bolted one; a point load makes a singularity (stress rises without limit as the mesh is refined): use a pressure over an area.
  • Use symmetry to cut the model and the time.
  • Stress at a sharp corner is meaningless (it depends on the mesh); put a fillet and read the stress away from the corner.
  • Look at the deformed shape: exaggerate it and check that it looks right.
  • Printed parts are not isotropic: use lower strength across the layers (see Strength, Accuracy and Fits).
  • Treat results as ±20 % for a first model and validate with a test (below).

Tolerance simulation

When parts are stacked their errors add. The worst case adds all of them (guaranteed, but pessimistic); the root-sum-square (RSS) adds them as independent random variables. A Monte Carlo simulation draws thousands of random assemblies and counts how many fit (see Statistical Tolerancing and Process Capability).

Worked example: four parts of ±0.2 mm

  • Worst case: 4 × 0.2 = ±0.8 mm. RSS: √(4 × 0.2²) = ±0.4 mm.
  • Monte Carlo of 100 000 assemblies with each error uniform between −0.2 and +0.2 mm: standard deviation 0.231 mm (theory 0.231 mm). 91.7 % of assemblies fall within ±0.4 mm (a normal curve with the same σ gives 91.7 %), and 59.8 % within ±0.2 mm.
  • If the assembly works only within ±0.4 mm, about 8.3 % will not: decide whether that is acceptable, tighten the critical parts or add adjustment (see Mechanisms, Fasteners and Snap-Fits).

Motion and mechanism simulation

Mechanism software (or a few lines of geometry) shows how a linkage moves and where it clashes. A four-bar linkage (crank, coupler, rocker and frame) can be checked by hand with two rules:

  • Grashof’s rule: if the shortest plus the longest link is no more than the sum of the other two, the shortest link can rotate fully (a crank-rocker is possible).
  • Transmission angle: the angle between the coupler and the rocker should stay between about 40° and 140° so that the force is transmitted well and the mechanism does not jam.

Worked example: a four-bar linkage

  • Links: frame 100, crank 40, coupler 90 and rocker 80 mm. Shortest + longest = 40 + 100 = 140 mm; the other two sum to 170 mm: Grashof is satisfied, so the crank turns fully and the rocker oscillates.
  • Transmission angle μ from cos μ = (b² + c² − a² − d² + 2 a d cos θ) ÷ (2 b c): at θ = 0° it is 40.8°; at θ = 180° it is 110.7°. The minimum, 40.8°, is above 40°: acceptable.
  • The rocker swings through about 62°. A cardboard or laser-cut version of the linkage confirms it in minutes (see Low-Fidelity Prototyping: Mock-ups and Models).

Circuit and control simulation

  • SPICE simulation (LTspice, ngspice, Falstad in the browser) checks filters, regulators and amplifiers before building (see Electronics Fundamentals).
  • Control simulation (Python, Simulink, a spreadsheet) tests a PID loop on a model of the plant before it is connected to a real motor (see Programming Languages).
  • Firmware on a PC: write the logic so that it runs on a computer with simulated inputs (see Embedded Systems).
  • Hardware-in-the-loop: real controller, simulated machine, to test dangerous cases safely (see System Integration).
  • Simulate the worst cases: extreme temperature, tolerance on parts and the battery at low voltage.

Tools

NeedFree or low-cost toolsNote
CADFreeCAD, Onshape (free hobby plan), Fusion (personal use), OpenSCADParametric; export STEP and STL
FEACalculiX, Elmer, built-in simulation in Fusion and OnshapeLearn the basics on simple cases
MechanismsFreeCAD assembly, Fusion joints, linkage solvers onlineCheck clashes and ranges
RenderingBlender, built-in renderersFor presentations and appearance
CircuitsLTspice, ngspice, KiCad, FalstadVerify before you build
Slicing and process checksPrusaSlicer, Cura, OrcaSlicerPreview layers and supports

Validate against the real thing

  • Test a physical part and compare it with the simulation: if the deflection is twice the prediction, the model (or the material data) is wrong.
  • Fix the model, not the data: find what you assumed that is not true (a stiffer support, a different grade).
  • Keep the model and update it as the design changes; a validated model becomes a cheap way to try variants.
  • Do not trust a pretty picture: a colored stress plot looks authoritative whatever its quality.

Troubleshooting

ProblemLikely causeTry
Parts fit in CAD but not in realityProcess tolerance, warping, a model errorAdd the process clearance; measure the real part and update the model
FEA stress keeps rising as the mesh is refinedSingularity at a sharp corner or a point loadAdd a fillet; use a distributed load; read stress away from the corner
Simulation and test disagree by a factor of twoWrong constraints or materialCheck supports and stiffness; use measured properties
Mechanism jams in realityLow transmission angle, friction, clearancesCheck μ; add clearance; reduce friction
Model takes forever to changePoorly constrained sketchesRebuild with a skeleton and named parameters

Related

FAQ

Should I simulate or build?

Do a hand calculation first; simulate when the geometry is too complex for formulas; build when the answer depends on things a model cannot capture (feel, real materials, users).

How do I know my FEA result is right?

Check a simple case with a known answer, refine the mesh until the result stops changing, and compare with a physical test.

What is a Grashof linkage?

A four-bar linkage in which the shortest plus the longest link is no longer than the sum of the other two, so that the shortest link can turn through a full circle.

How accurate is a tolerance stack-up?

Worst case is guaranteed but pessimistic; RSS and Monte Carlo are realistic if the errors are independent and centered. Measure real parts to confirm.

Which CAD program should I use?

Any parametric CAD that exports STEP: FreeCAD or Onshape for free, Fusion for hobby and small business use. The skill matters more than the brand.

References

  • Shigley, J. E. and Mischke, C. R., Mechanical Engineering Design, McGraw-Hill; Norton, R. L., Design of Machinery, McGraw-Hill (linkages, transmission angle).
  • Cook, R. D., Malkus, D. S. and Plesha, M. E., Concepts and Applications of Finite Element Analysis, Wiley.
  • Creveling, C. M., Tolerance Design, Prentice Hall (Monte Carlo tolerance analysis).

Last reviewed: October 2026. Material values and rules of thumb here are typical: check your own materials and loads, and validate with a test.