Wrench: Stationary Solid Mechanics

A steel ring wrench grips a hexagonal bolt head while a 150 N hand force pushes down on the end of the handle. You compute the stress and deflection, mark the regions where the stress exceeds 200 MPa, and refine the mesh in a parametric sweep to see which results converge and which do not.

What you will learn
  • Build a 3D part from a parametric 2D sketch (circle, rectangle, polygon, Booleans) and an extrusion.

  • Apply a fixed constraint and a load given as a total force.

  • Plot von Mises stress and a "safety" plot made from a logical expression.

  • Find a maximum and its location with a Volume Maximum and a Maximum coupling operator.

  • Run a mesh convergence study by sweeping a parameter that controls the element size.

Table 1. Model at a glance

Space dimension

3D

Physics

Solid Mechanics (solid), linear elastic

Study

Stationary, with a Parametric Sweep over the mesh divider hd (4 meshes)

Mesh

Quadratic tetrahedra, from about 2 300 nodes (hd = 1) to 12 200 nodes (hd = 4)

Solve time

About 20 seconds for all four meshes (one recorded run: 19.9 s)

COMSOL users know this model as the wrench from Introduction to COMSOL Multiphysics. COMSOL imports the wrench from its own geometry file, which is not public, so this tutorial builds a comparable hex-socket wrench from parameters. Loads, materials, plots and the convergence study follow the same workflow. Elmer Studio is an independent project and is not affiliated with COMSOL.

Start a new model

  1. Click File  New (Ctrl+N) and choose Model Wizard.

  2. On Select Space Dimension, choose 3D.

  3. On Select Physics, expand Structural Mechanics, select Solid Mechanics (solid) and click Add.

  4. Click Study, select General Studies › Stationary and click Done.

Solid Mechanics (solid) comes with Linear Elastic Material 1, Initial Values 1 and Free 1: every boundary is free until you add a constraint or a load.

Parameters

  1. Click Home  Parameters.

  2. In the Settings window, enter the following rows in the table:

    Name Expression Description

    F

    150[N]

    Applied load

    hd

    1

    Element size divider

    h0

    1[cm]

    Starting element size

    R

    18[mm]

    Head outer radius

    AF

    17[mm]

    Hex across flats

    Rc

    AF/sqrt(3)

    Hex circumradius

    Lh

    150[mm]

    Handle length

    W

    12[mm]

    Handle width

    T

    6[mm]

    Wrench thickness

The Value column shows each value in SI units, for example 0.00981495 for Rc. hd has no unit: it only divides the element size later on.

Geometry

The wrench is sketched in the xy-plane: a round head of radius R, a straight handle reaching to x = Lh, and a hexagonal hole for the bolt. The sketch is then extruded by the thickness T. See Geometry and Geometry features for the feature settings.

  1. Click Geometry 1, then click Geometry  Work Plane. Keep Plane type Quick and Plane xy-plane.

  2. Right-click Work Plane 1 and choose Primitives › Circle. Set Radius to R.

  3. Right-click Work Plane 1 and choose Primitives › Rectangle. Set Width Lh, Height W, x 0 and y -W/2.

  4. Right-click Work Plane 1 and choose Booleans and Partitions › Union. In Union 1 check c1 and r1 under Input objects and clear Keep interior boundaries.

  5. Right-click Work Plane 1 and choose Primitives › Polygon. Keep Type Solid and enter the six corners of the hexagon. The coordinates are separated by spaces, so do not put spaces inside an expression:

    • x: Rc*cos(0*pi/3) Rc*cos(1*pi/3) Rc*cos(2*pi/3) Rc*cos(3*pi/3) Rc*cos(4*pi/3) Rc*cos(5*pi/3)

    • y: Rc*sin(0*pi/3) Rc*sin(1*pi/3) Rc*sin(2*pi/3) Rc*sin(3*pi/3) Rc*sin(4*pi/3) Rc*sin(5*pi/3)

  6. Right-click Work Plane 1 and choose Booleans and Partitions › Difference. In Difference 1 check uni1 under Objects to add and pol1 under Objects to subtract.

  7. Click Difference 1, then click Geometry  Extrude. Extrude 1 takes wp1 as input. Set Distance from work plane to T.

  8. Click Geometry 1 and press F8 (Build All Objects).

The Geometry Statistics in the Settings window report 1 domain and 12 boundaries. Boundaries 4 to 9 are the six flats of the hexagonal hole; boundary 12 is the end face of the handle at x = 150 mm.

Settings of Geometry 1 with 1 domain and 12 boundaries; the Graphics window shows the wrench with its hexagonal hole
Figure 1. The finished wrench geometry: a 150 mm handle, 6 mm thick

Materials

  1. Click Home  Add Material.

  2. In the Add Material window, select Built-in › Structural steel and click Add to Component.

Being the first material, Structural steel covers the whole wrench. Its Young’s modulus is 200 GPa and its Poisson’s ratio 0.3.

Physics

The bolt holds the socket in place; the hand pushes the handle end down, perpendicular to the wrench.

  1. Click Solid Mechanics (solid) and click Physics  Boundaries  Fixed Constraint.

  2. In Fixed Constraint 1, click the six flats of the hexagonal hole, boundaries 4, 5, 6, 7, 8 and 9. Zoom in with the mouse wheel to reach them.

    Settings of Fixed Constraint 1 with boundaries 4 to 9; the flats of the hexagonal hole are highlighted in blue
    Figure 2. Fixed Constraint 1 on the six hexagon flats
  3. Click Solid Mechanics (solid) again and click Physics  Boundaries  Boundary Load.

  4. In Boundary Load 1, click the end face of the handle, boundary 12.

  5. Set Load type to Total force and F_tot z to -F. Leave F_tot x and F_tot y at 0.

    Settings of Boundary Load 1 with boundary 12, Load type Total force and F_tot z equal to -F
    Figure 3. Boundary Load 1: a total force of −F in z on the handle end
With Load type Total force, Elmer Studio divides the force by the area of the selected faces, so the 150 N are spread evenly over the 72 mm² end face. Elmer itself only knows forces per unit area; the conversion happens when the input file is written.

All other boundaries stay free (Free 1). The settings are listed in Solid Mechanics (solid).

Mesh

The element size is tied to the parameters, so that sweeping hd refines the mesh.

  1. On the Mesh ribbon, click Mesh  Free Tetrahedral. Mesh 1 switches to a user-controlled sequence with Size 1 and Free Tetrahedral 1.

  2. Click Size 1. Set Element size to Custom, then set:

    • Maximum element size: h0/hd

    • Minimum element size: h0/(4*hd)

    • Curvature factor: 0.1

    • Resolution of narrow regions: 0.2

  3. Click Mesh  Build Mesh.

With hd = 1 the maximum element size is 1 cm and the mesh is coarse: about 1 000 elements. Resolution of narrow regions uses COMSOL’s definition, the approximate number of element layers across a narrow region.

Settings of Size 1 with Custom element size, maximum h0/hd, minimum h0/(4*hd), curvature factor 0.1 and resolution of narrow regions 0.2
Figure 4. Size 1 with the element size tied to h0 and hd

See Mesh.

Study

  1. Click Study 1 and click Home  Compute (Ctrl+=).

The solution takes a few seconds. Results gets a Stress (solid) plot group.

Results

Von Mises stress

  1. Click Stress (solid). The plot shows the von Mises stress on the deformed shape of the wrench (the deformation is scaled up so you can see it).

The stress is highest in the handle next to the head, where the bending moment is largest and the cross-section changes.

Safety plot

Show where the von Mises stress exceeds 200 MPa:

  1. Click Results  3D Plot Group. A new plot group with a Surface plot is added.

  2. In the plot group, change Label to Safety.

  3. Click its Surface 1 and set Expression to solid.mises > 200[MPa].

  4. Click Plot.

A comparison returns 1 where it is true and 0 elsewhere: red marks the region above 200 MPa, blue the rest.

Safety plot group with a Surface of solid.mises greater than 200 MPa; the red region is on the handle next to the head
Figure 5. Safety plot: red where the von Mises stress exceeds 200 MPa

Maximum stress and its location

  1. Click Results  Volume Maximum. In Volume Maximum 1, enter solid.mises in the Expression column of the Expressions table and MPa in Unit.

  2. Click Evaluate. The Table window shows the maximum von Mises stress and its location (x, y, z).

  3. Right-click Definitions under Component 1 and choose Maximum. In Maximum 1 set Operator name to maxop1.

  4. Click Results  Global Evaluation, enter maxop1(solid.mises) as expression and click Evaluate. The value equals the Volume Maximum.

Like COMSOL’s component couplings, maxop1(...) can be used in any result expression, for example in an Annotation or a Global plot.

Mesh convergence study

A single mesh does not tell you how accurate a result is. Refine the mesh by sweeping hd.

  1. Click Study 1 and click Study  Parametric Sweep.

  2. In Parametric Sweep 1 set Parameter name to hd, Parameter value list to range(1,1,4) and leave Parameter unit empty.

  3. Click Home  Compute. The mesh is rebuilt for each value of hd; the maximum element size goes from 10 mm down to 2.5 mm.

  4. Click Stress (solid) to see the finest solution.

    Stress (solid) plot group with a Volume plot of the von Mises stress on the deformed wrench, peaking where the handle meets the head
    Figure 6. Von Mises stress on the finest mesh (hd = 4); the messages list the four meshes and the solution time
  5. Click Volume Maximum 1, set Time/parameter selection to All and click Evaluate. The table now has one row per value of hd.

    Settings of Volume Maximum 1 with expression solid.mises in MPa; the table lists hd, the maximum von Mises stress and its location
    Figure 7. Volume Maximum of the von Mises stress for each mesh, with its location
  6. Plot the tip deflection against hd: click Results  Global. In Global 1, set Expression (global, e.g. aveop1(T), or a field to reduce) to w and Reduction to Minimum, then click Plot.

    w is the z-displacement; its minimum is the downward deflection of the handle tip.

    1D Plot Group with a Global plot of the minimum of w against hd, levelling off near -3.117 mm
    Figure 8. Tip deflection against the mesh divider hd

Check the results

These are the checks in tests/test_tutorial_wrench.py, which builds this model and runs the convergence sweep. The numbers in brackets are from one recorded run.

  • The mesh refines with every step of hd: the node count increases strictly (2 319, 5 206, 7 881 and 12 200 nodes).

  • maxop1(solid.mises) equals the Volume Maximum of solid.mises for every mesh (to a relative 1e-12).

  • The tip deflection agrees with beam theory: it lies between 0.85 and 1.05 times the cantilever value F·L³/(3·E·I), with L = 150 mm − 17 mm/√3 measured from the socket corners and I = W·T³/12. Beam theory gives 3.19 mm; the model gives 3.100 mm at hd = 1 and 3.117 mm at hd = 4 (0.97 to 0.98 of the beam value; the head is stiffer than a slender beam).

  • The tip deflection converges: it grows with every refinement and each change is smaller than the first (3.100, 3.112, 3.116, 3.117 mm).

  • A small region exceeds 200 MPa: between 0 and 20 % of the volume (7.9 % on the coarsest mesh, 4.9 % on the finest).

  • The peak stress sits at the corner where the handle meets the head (about x = 17.4 mm, y = 6 mm).

The maximum von Mises stress does not converge (348, 410, 409 and 384 MPa in the recorded run). This stand-in wrench has a sharp re-entrant corner between handle and head, where the elastic stress is singular: refining the mesh does not settle it. COMSOL’s wrench has fillets there, which is why its maximum stress converges. Judge convergence on quantities such as the deflection, or round the corner with a fillet.

What next

  • Round the handle/head corner: add a Geometry  Fillet on the two vertical edges where the handle meets the head, compute the sweep again, and compare the maximum stress per mesh with the sharp-corner values above.

  • Change F and compute again; in this linear model all stresses and displacements scale with the load.

  • Try the Busbar: Joule Heating tutorial for a coupled electric and thermal model with a parametric sweep.

  • Keyboard shortcuts are listed in Keyboard and mouse.