Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The release covers these domains:
- Helical compression spring design.
- Shaft torsion and first critical speed.
- Bearing rating life to ISO 281.
- Interference fit analysis by Lamé thick-cylinder theory.
- von Mises equivalent stress.
- Cross-section properties.
- Dimension-safe unit conversion.
Expand Down Expand Up @@ -52,6 +53,7 @@ Warnings surface when a method uses an approximation.
| `spring_design` | Spring rate, shear stress, and safety factor of a compression spring. |
| `shaft_analysis` | Torsion stress, twist, and critical speed. |
| `bearing_life` | ISO 281 rating life in revolutions and hours. |
| `press_fit` | Contact pressure, stresses, and torque capacity of an interference fit. |
| `von_mises` | Equivalent stress and yield safety factor. |
| `unit_convert` | Conversion between compatible units. |
| `material_lookup` | Curated mechanical properties of materials. |
Expand Down Expand Up @@ -147,6 +149,26 @@ References:
- Machinery's Handbook (Thirty-first edition)
```

A call to `press_fit` for a hardened-steel hub pressed onto a solid shaft with 0.05 mm of diametral interference:

```text
Interface contact pressure 157.5 MPa
Hub tangential stress 262.5 MPa
Shaft tangential stress -157.5 MPa
Radial stress at interface -157.5 MPa
Hub von Mises stress 367.5 MPa
Shaft von Mises stress 157.5 MPa
Press-in force 55.67 kN
Torque capacity 695.8 N·m

Method: Interference fit by Lamé thick-cylinder theory
Formula: p = u / (r ((1/Eh)((ro^2+r^2)/(ro^2-r^2)+nh) + (1/Es)((r^2+ri^2)/(r^2-ri^2)-ns))), u = I/2, ...
References:
- Shigley's Mechanical Engineering Design (Tenth edition, 2015)
- Machinery's Handbook (Thirty-first edition)
- Roark's Formulas for Stress and Strain (Eighth edition, 2011)
```

A call to `unit_convert` with a torque-to-energy request fails safely:

```text
Expand All @@ -169,7 +191,7 @@ Use a unit of the same quantity.
The test suite is deterministic and offline.
It covers the engines, the unit layer, the database, and the tools.

- 98 tests across 10 files.
- 115 tests across 11 files.
- All tests pass on Node 22 and Node 24.
- The CI workflow runs typecheck, tests, build, demo, and a package check.

Expand All @@ -184,6 +206,8 @@ Run `npm test` to reproduce the results.
- The critical speed is a first-mode approximation.
- The spring design covers static round-wire springs only.
It does not estimate fatigue life for cyclic loads.
- The press fit uses plane stress and assumes a uniform friction coefficient.
It ignores rotation, temperature, and surface roughness effects.
- The built-in SQLite module of Node.js is still experimental.

Check the cited sources for exact values.
Expand All @@ -197,11 +221,12 @@ Each release stays useful on its own.

- Helical compression spring design.
The `spring_design` tool reports the spring rate, the shear stress, and the safety factor.
- Press-fit and interference-fit analysis.
The `press_fit` tool reports the contact pressure, the stresses, the press-in force, and the torque capacity.

### Remaining

- Add fatigue analysis for cyclic loads.
- Add press-fit and interference-fit calculators.
- Add more unit categories, including viscosity and thermal conductivity.
- Add HTTP transport.
- Add a catalog of ISO and DIN standard sections.
Expand Down
2 changes: 1 addition & 1 deletion docs/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Engineer MCP grows in independent releases. Each release stays useful on its own
### Complete

- Helical compression spring design. The `spring_design` tool computes the spring rate, the shear stress, and the safety factor.
- Press-fit and interference-fit analysis. The `press_fit` tool computes the contact pressure, the stresses, the press-in force, and the torque capacity.

### Remaining

- Add fatigue analysis for cyclic loads.
- Add press-fit and interference-fit calculators.
- Add more unit categories, including viscosity and thermal conductivity.
- Add HTTP transport in addition to stdio.
- Add a catalog of ISO and DIN standard sections.
Expand Down
38 changes: 38 additions & 0 deletions docs/mcp-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,44 @@ Inputs:
- `speedRpm`: enables life in hours.
- `requiredLifeHours`: enables the life margin.

## press_fit

Compute the contact pressure and stresses of an interference fit.

The tool uses the Lamé thick-cylinder solution in plane stress. The hub carries tensile hoop stress. The shaft carries compressive hoop stress. A solid shaft sees biaxial compression equal to the contact pressure.

Inputs:

- `hubOuterDiameter`: hub outer diameter in metres.
- `interfaceDiameter`: diameter where the hub bore meets the shaft outside in metres.
- `shaftInnerDiameter`: shaft inner diameter in metres. Omit or use zero for a solid shaft.
- `hubLength`: hub engagement length in metres.
- `diametralInterference`: total diametral interference in metres.
- `hubMaterial` and `shaftMaterial`: material names from the database.
- `hubElasticModulus` and `shaftElasticModulus`: elastic moduli in pascals. Use these instead of materials.
- `hubPoissonRatio` and `shaftPoissonRatio`: Poisson ratios. The default is `0.3`.
- `hubYieldStrength` and `shaftYieldStrength`: yield strengths in pascals. They enable the safety factors.
- `frictionCoefficient`: friction at the interface. The default is `0.15`.
- `appliedAxialForce`: applied axial force in newtons. It enables the axial joint safety factor.

The tool reports the contact pressure, the hoop stresses, the von Mises stresses, the press-in force, and the torque capacity. The hub safety factor is the primary safety factor. The shaft and axial joint factors appear as quantities.

The tool warns on a thin hub. It warns when an applied axial force exceeds the press-in force.

Example:

```json
{
"hubOuterDiameter": 0.05,
"interfaceDiameter": 0.025,
"hubLength": 0.03,
"diametralInterference": 0.00005,
"hubMaterial": "Alloy steel 42CrMo4",
"shaftMaterial": "Alloy steel 42CrMo4",
"outputUnits": { "contactPressure": "MPa", "pressForce": "kN" }
}
```

## von_mises

Compute the von Mises equivalent stress and yield safety factor of a stress state.
Expand Down
22 changes: 22 additions & 0 deletions examples/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type ToolHandlers = {
spring_design: Handler;
shaft_analysis: Handler;
bearing_life: Handler;
press_fit: Handler;
von_mises: Handler;
unit_convert: Handler;
material_lookup: Handler;
Expand All @@ -87,6 +88,7 @@ const tools: NamedHandler[] = [
["spring_design", toolHandlers.spring_design],
["shaft_analysis", toolHandlers.shaft_analysis],
["bearing_life", toolHandlers.bearing_life],
["press_fit", toolHandlers.press_fit],
["von_mises", toolHandlers.von_mises],
["unit_convert", toolHandlers.unit_convert],
["unit_convert (torque to energy)", toolHandlers.unit_convert],
Expand Down Expand Up @@ -137,6 +139,26 @@ const inputs: Array<Record<string, unknown>> = [
speedRpm: 1500,
requiredLifeHours: 20000,
},
{
hubOuterDiameter: 0.05,
interfaceDiameter: 0.025,
hubLength: 0.03,
diametralInterference: 0.00005,
hubMaterial: "Alloy steel 42CrMo4",
shaftMaterial: "Alloy steel 42CrMo4",
frictionCoefficient: 0.15,
appliedAxialForce: 20000,
outputUnits: {
contactPressure: "MPa",
hubTangentialStress: "MPa",
shaftTangentialStress: "MPa",
radialStress: "MPa",
hubVonMisesStress: "MPa",
shaftVonMisesStress: "MPa",
pressForce: "kN",
torqueCapacity: "N·m",
},
},
{
mode: "cartesian",
sigmaX: 120e6,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@engineerkit/engineer-mcp",
"version": "0.2.0",
"version": "0.3.0",
"description": "MCP server for verified mechanical-engineering calculations, references, and material data.",
"type": "module",
"license": "MIT",
Expand Down
Loading
Loading