PDF

Loaded Spring — Using Global Equations to Satisfy Constraints
Introduction
In this tutorial model, which demonstrates a more generally applicable method, a structural mechanics model of a spring is augmented by a global equation that solves for the load required to achieve a desired total extension of the spring.
Figure 1: A 4.5-turn steel spring is fixed at one end, and has a load applied at the other. The load is a variable which is solved for to achieve a total displacement.
Model Definition
Figure 1 shows the modeled 4.5-turn steel spring. One end of the spring is fixed rigidly, and the other end has a distributed load applied to it, acting in the axial direction of the spring. Rather than an input to the model, this load is a variable being solved for; it is implicitly specified via a global equation in such a way as to give a total spring extension of 2 cm. The extension of the spring is computed by using an average operator on the moving end of the spring. The average operator evaluates the average z-displacement over the boundary at which the load is applied.
The global equation adds one additional degree of freedom to the model, the unknown load. Not all available equations solvers are suited for such problems, but the direct solver used as default for structural mechanics can handle it. Because the structure has a uniform cross section, use a swept mesh.
Results and Discussion
Figure 2 shows the deformed shape of the spring. The average displacement of the end of the spring is 2 cm, as specified by the global equation. The force required to get this displacement is 471 N. Although this problem uses a linear elastic material model, this approach would work equally well if the material model was nonlinear or if geometric nonlinearity was taken into account.
Global equations do have certain restrictions upon their usage. The global equation must be continuous and differentiable with respect to all of the unknowns, and it must not overconstrain, nor underconstrain, the problem. Each global equation should add one constraint and one degree of freedom to the model. Under these conditions, the global equations can be used in a variety of ways beyond what is shown here.
Figure 2: The deformed shape of the spring.
Application Library path: COMSOL_Multiphysics/Structural_Mechanics/loaded_spring
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  3D.
2
In the Select Physics tree, select Structural Mechanics>Solid Mechanics (solid).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select General Studies>Stationary.
6
Global Definitions
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Geometry 1
1
In the Model Builder window, under Component 1 (comp1) click Geometry 1.
2
In the Settings window for Geometry, locate the Units section.
3
From the Length unit list, choose dm.
Helix 1 (hel1)
Create a helix for the spring (Figure 1).
1
In the Geometry toolbar, click  Helix.
2
In the Settings window for Helix, locate the Size and Shape section.
3
In the Number of turns text field, type 4.5.
4
Locate the Rotation Angle section. In the Rotation text field, type 180.
5
Click  Build All Objects.
Definitions
Next, add an Average operator that you will later use to average the z-directional displacement field on the end of the spring.
Average 1 (aveop1)
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Average.
Choose wireframe rendering to get a better view on some boundaries where you will assign boundary conditions.
2
Click the  Wireframe Rendering button in the Graphics toolbar.
3
In the Settings window for Average, locate the Source Selection section.
4
From the Geometric entity level list, choose Boundary.
5
Solid Mechanics (solid)
Next, set up the physics. Add a global equation to compute the appropriate load for the prescribed extension. As an advanced feature, the Global Equations entry is not available by default in the context menu.
1
Click the  Show More Options button in the Model Builder toolbar.
2
In the Show More Options dialog box, in the tree, select the check box for the node Physics>Equation-Based Contributions.
3
Global Equations 1
1
In the Model Builder window, under Component 1 (comp1) right-click Solid Mechanics (solid) and choose Global>Global Equations.
2
In the Settings window for Global Equations, locate the Global Equations section.
3
4
Locate the Units section. Click  Select Dependent Variable Quantity.
5
In the Physical Quantity dialog box, type force in the text field.
6
Click  Filter.
7
In the tree, select General>Force (N).
8
9
In the Settings window for Global Equations, locate the Units section.
10
Click  Select Source Term Quantity.
11
In the Physical Quantity dialog box, type displacement in the text field.
12
Click  Filter.
13
In the tree, select General>Displacement (m).
14
Boundary Load 1
1
In the Physics toolbar, click  Boundaries and choose Boundary Load.
2
3
In the Settings window for Boundary Load, locate the Force section.
4
From the Load type list, choose Total force.
5
Specify the Ftot vector as
Fixed Constraint 1
1
In the Physics toolbar, click  Boundaries and choose Fixed Constraint.
2
Materials
Assign material properties. Use Steel AISI 4340 for all domains.
Add Material
1
In the Home toolbar, click  Add Material to open the Add Material window.
2
Go to the Add Material window.
3
In the tree, select Built-in>Steel AISI 4340.
4
Click Add to Component in the window toolbar.
5
In the Home toolbar, click  Add Material to close the Add Material window.
Mesh 1
Use swept mesh to generate a uniform mesh over the spring domain. Start by specifying the mesh on one end face of the spring.
Free Quad 1
1
In the Mesh toolbar, click  Boundary and choose Free Quad.
2
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Predefined list, choose Normal.
Swept 1
In the Mesh toolbar, click  Swept.
Distribution 1
1
Right-click Swept 1 and choose Distribution.
2
In the Settings window for Distribution, locate the Distribution section.
3
In the Number of elements text field, type 200.
4
Click  Build All.
Study 1
In the Home toolbar, click  Compute.
Results
Stress (solid)
The default plot shows the von Mises stress on the surface of the spring. Compare the plot with Figure 2.
Evaluate the force required to get the displacement specified in the global equations.
Global Evaluation 1
1
In the Results toolbar, click  Global Evaluation.
2
In the Settings window for Global Evaluation, locate the Expressions section.
3
4
Click  Evaluate.
Finish the result analysis by evaluating the average displacement of the end of the spring.
Global Evaluation 2
1
In the Results toolbar, click  Global Evaluation.
2
In the Settings window for Global Evaluation, locate the Expressions section.
3
4
Click  Evaluate.