Skip to content
Charan Kumar Reddy
AI & AgentsComplete

DesignIQ

ML surrogate for CAD/CAE design optimization with DFM checks

Parametric CAD and automated FEA of an automotive mounting bracket (FreeCAD, Gmsh, CalculiX) over a Latin hypercube design of experiments, a Gaussian-process surrogate for stress and displacement, rule-based DFM checks and Pareto ranking in a Streamlit explorer.

Free-tier hosting; the first request after idle can take 30 to 60 seconds.

Gaussian-process stress surrogate R², 5-fold CV
0.994
reports/metrics.json
FEA variants simulated with FreeCAD, Gmsh and CalculiX
121
reports/metrics.json

The problem

Every finite-element evaluation of a bracket design needs CAD, meshing and a solver pass, so engineers explore few variants and check manufacturability late, after the geometry is fixed.

The approach

A headless FreeCAD, Gmsh and CalculiX pipeline simulates 121 Latin-hypercube variants; a Gaussian-process surrogate trained on them predicts stress and displacement in milliseconds, and 8 rule-based DFM checks and a weighted Pareto ranking run on every candidate.

Architecture

  1. 01

    Design of experiments

    Latin hypercube sampling over thickness, width, flange lengths, hole diameter, bend radius and load, defined in configs/design_space.yaml.

  2. 02

    Headless CAD and meshing

    FreeCAD builds each L-bracket with constructive solid geometry (fillet and fastener holes); Gmsh meshes it with second-order tetrahedra after a mesh-size study.

  3. 03

    CalculiX solver

    Linear static analysis of Al 6061-T6 with a fixed base and a transverse load writes peak von Mises stress and displacement to data/fea_results.csv.

  4. 04

    Surrogate training

    Physics features (analytical beam stress, hole-edge and radius ratios) feed Gaussian-process, XGBoost, random-forest and polynomial-ridge models compared with 5-fold cross-validation.

  5. 05

    DFM rules and ranking

    8 rules from configs/dfm_rules.yaml (bend radius, hole size and edge distance, flange length, standard fastener sizes, tool access, safety factor, unit cost) plus a weighted, Pareto-aware design ranking.

  6. 06

    Streamlit explorer

    Sliders, a 3D stress view, a safety-factor gauge and a DFM checklist, served from committed models without any CAE dependencies.

Key decisions

  • Separates the offline CAE pipeline from the online app, so the deployed service needs no FreeCAD or solver and answers in milliseconds.
  • Chooses a Gaussian process for 121 samples: it beat tree ensembles on R² and MAPE and is a natural fit for small, smooth design spaces.
  • Adds the analytical beam-theory stress as an input feature so models learn the correction from simple theory rather than the full physics.
  • Keeps DFM thresholds in a YAML config with cited sources, so manufacturing rules can change without code changes.
  • Warns in the UI when a slider leaves the sampled design domain instead of extrapolating silently.

Results

  • Stress surrogate: Gaussian process R² 0.994 ± 0.003 and MAPE 4.1% in 5-fold CV, against 0.979 and 6.1% for XGBoost.
  • Displacement surrogate: Gaussian process R² 0.990 ± 0.005 and MAPE 4.1%.
Measured results and the files they come from
MetricValueSource
Stress surrogate R², 5-fold CV (Gaussian process)0.994 ± 0.003reports/metrics.json
Stress surrogate MAPE vs XGBoost4.1% vs 6.1%reports/metrics.json
FEA variants in the training set121reports/metrics.json

How it is tested

  • pytest tests for all 8 DFM rules and an app smoke test, run in a GitHub Actions CI pipeline.
  • A mesh-size study (6.0 mm down to 1.2 mm elements) and a comparison with 1D beam theory validate the FEA setup.

Limits, stated plainly

  • Linear static analysis only: no plasticity, fatigue, vibration or thermal loads, and the base is treated as rigidly clamped.
  • Peak stress keeps rising as the mesh is refined, consistent with a stress concentration at the fillet, so absolute peak values need careful interpretation.
  • 121 samples bound the surrogate's valid domain; predictions outside the sampled ranges are not trustworthy.

Stack

PythonFreeCADGmshCalculiXscikit-learnXGBoostStreamlitPlotly