Skip to content
AIMODELRACE

Module 1 of 5 · Intermediate · 11 min read

Engineering: calculations, CAD scripting and verification

Use AI for mechanical, electrical and civil engineering work, with calculations you can audit and verification at every step.

Key takeaways
  • 1Have AI write calculations as code with explicit units, never as mental arithmetic.
  • 2Verify against hand calculations, reference tables, standards and simulation.
  • 3Script CAD with AI (parametric models in code) and inspect every result.
  • 4Safety-critical designs need review and sign-off by a qualified, licensed engineer.

01Read this first

AI can make engineers much faster, and it can also produce confident, wrong numbers. In engineering, a wrong number can hurt people. Use AI to draft, explain, script and check, and treat every output as unverified until you or a qualified colleague have confirmed it.

Watch out
Not professional engineering advice. Designs affecting safety, structures, pressure systems, electrical installations or regulated products must be checked against the applicable codes and standards and approved by a qualified, licensed professional.

02Where AI helps

Mechanical, electrical and civil work all follow the same principle: AI drafts, verification decides.

  • Explaining concepts, standards and methods, and how to approach a problem.
  • Writing calculation scripts (for example Python with a units library) that show every step.
  • Parametric CAD in code, for example OpenSCAD, CadQuery or FreeCAD's Python console.
  • Scripting tools such as spreadsheet calculators, PCB tool scripts and data processing for test results.
  • Drafting reports, test plans, design reviews and documentation.
  • Reviewing a design or calculation for missed load cases and failure modes.

03The workflow

Make the AI show its work so a reviewer can follow every step.

  • State the problem, the governing standards or codes, the units and the safety factors you use.
  • Ask for the method first: equations, assumptions and limits of validity.
  • Have AI implement the calculation as code with units and print intermediate values.
  • Check with an independent method: hand calculation, reference tables, a second tool or simulation.
  • Use AI-written CAD scripts for geometry; inspect and measure the result.
  • Document assumptions and have the design reviewed before it is built.

04Prompt: method before numbers

Agreeing the method catches wrong assumptions before they become wrong numbers.

Example
Problem: {{e.g. size a steel shaft transmitting a given power at a given speed, with a bending moment from a pulley}}. Units: {{SI or imperial}}. Our safety factor: {{value}}. Material: {{material and grade}}. Before calculating anything, give me: the governing equations, every assumption, the failure modes to check, the material properties needed (marked 'to be confirmed from a datasheet'), and the limits of validity of this method. Tell me which standards or codes typically govern this in {{country or industry}}, so I can check them myself.

05Prompt: calculations as code

Code with units makes the calculation auditable and repeatable.

Example
Implement the agreed method as a Python script using a units library so every quantity carries units. Put inputs at the top with comments and sources. Print each intermediate result with units, then the final result and the utilisation against the allowable value. Add assertions that fail if units are inconsistent. Then do a quick order-of-magnitude sanity check by hand in a comment and say whether the result passes it.

06Prompt: parametric CAD

Code-based CAD lets AI produce geometry you can change by editing parameters.

Example
Write a {{OpenSCAD, CadQuery or FreeCAD Python}} script for a wall-mounting bracket: base plate {{dimensions}}, two countersunk holes for {{screw size}}, a support arm at 90° with a fillet of {{radius}}, and thickness {{t}}. All dimensions as named parameters at the top, in millimetres. Comment each feature. After the script, list the measurements I should check in the model to confirm it matches the parameters.

07Prompt: design review

Use AI as an extra reviewer that never gets bored of checklists.

Example
Review the design summary and calculations in <design>. List: load cases or operating conditions that may be missing, failure modes not checked, assumptions that look optimistic, unit or sign errors, and tolerances or manufacturing issues. For each, say how serious it could be and how to check it. Don't approve the design; your job is to find problems.

08Pitfalls

The rule is simple: if you couldn't defend the number in a design review without the AI, you haven't verified it.

  • Arithmetic errors: never accept a number the model computed without code.
  • Wrong or outdated standards: models may cite clauses incorrectly. Read the actual standard.
  • Invented material properties: take values from datasheets and recognised references.
  • Unit mix-ups: require units on every quantity.
  • Over-trust in clean output: a neat report can hide a wrong assumption. Review the method.
Watch out
AI cannot stamp or certify a design. Responsibility stays with the engineer of record and with the codes that apply where the design will be built or used.

Finished reading?

Mark it complete to track your progress, then test yourself with the AI at Work: Business & Professional quiz.