Beam - Spring - Mass

In this example demonstrates modeling a beam with a finite element analysis and compute it's spring constant. This will be done by setting up a partial differential equation (PDE) model, through the solid mechanics model framework provided by SolidMechanicsPDEComponent. The spring constant will then be used in a simple mass-spring system model.

The general idea is the following: Create a geometry of a beam. Then set up a PDE model where the beam is constrained at one side and apply a downward force at the other side. For a specific force the displacement of the beam will be computed. This will be done for several forces and result in several displacements associated with the forces. This data allows for force/displacement plot and the the computation of the spring constant.

Load the finite element package and set the $HistoryLength to 0:

Beam Geometry

The first step for a finite element analysis is to generate the geometric model.

Create a beam geometry:

Mesh Generation

Create a mesh of the geometry:
Visualize the mesh:

FEM Model

Next, set up the PDE model. This will be done through the SolidMechanicsPDEComponent. For more information, please refer to the SolidMechanicsPDEComponent reference page or the solid mechanics monograph explaining the functionality available at great length.

Choose the material data of a vulcanized rubber. There are two dependent variables, also called field variables, and which represent the displacement of beam in the two spatial dimensions.

Two models are make: In the first model a linear elastic material model is made use of. Later, in the second case a hyperelastic material model is used.

Set up a solid mechanics component:

Next, boundary conditions are discussed.

Set beam to be fixed on the left:
Set up a downward parametric force on the right end of the beam:

Solver

To solve the PDE, set up a parametric solver. The force in the boundary load is the parameter that is varied.

Make a parametric solve for the downward force:
Evaluate the parametric function for various forces and store the associated displacements:
Visualize the full displacement of the spring for the largest force:

Force Displacement Plot

In order compute the spring constant a force/displacement plot is created.

Set a point in the geometry:

Compute the magnitude the the displacement and record that for the forces applied.

Evaluate the magnitude of displacement at this point for the various displacement solutions:

Since the material model is linear elastic, the force displacement relation is also linear. To compute the spring constant an interpolating function is created and the derivative is computed.

Create an interpolating function from the data:
Visualize the interpolation function:
Compute the derivative:
Plot the spring constant:

Note, that the result is curved. This, however, is a numerical artifact. The -axis are the same constant value and the plotting function tries to show even the smallest chance in value.

Inspect the actual values of the interpolating function:
Compute the spring constant as the mean of the data:

Spring-Mass System Model

In this section the just computed spring constant is used in a system mass-spring model. Since the model is simple it is create in the Wolfram language.

Compute the mass of the beam:
Collect spring-mass system model components:
Create a system model connection:
Connect the components and set initial values for the spring constant and mass and the initial displacement:
Show how the mass position oscillates:
Show the force on the beam at various times:

Hyperelastic Beam

Now, vulcanized rubber is better modeled throuh a hyperelastic material model, such as a neo-Hookean model. More information on this can be found in the Hyperelasticity monograph.

Set up a hyperelastic material model:
Setup the PDE operator:

The boundary conditions are the same as above.

Evaluate the parametric function for various forces and store the associated displacements:
Visualize the full displacement of the spring for the largest force:

Force Displacement Plot

For the force displacement plot the magnitude of the displacement is computed and recorded together with the forces.

Evaluate the magnitude of the displacement at this point for the various displacement solutions:

Now, the force-displacement relation is no longer linear.

Create an interpolating function from the data:
Visualize the interpolation function:
Compute the derivative:
Plot the spring constant:
Inspect the actual values of the interpolating function:

The spring 'constant' is now no longer constant.

Nonlinear Spring

To make use of the nonlinear spring data a different process then in the linear case is used. In this case a custom model is created in System Modeler and imported here.

Import the system model:

In this approach the linear force-displacement relationship of the default spring component is adjusted to reflect a nonlinear behavior. The linear spring constant is replaced with a forceDisplacement data that is added in this custom spring component.

Extract and inspect the nonlinear spring model:

This data is provided by using the table shown in the diagram view below, which contains the data characterizing the nonlinear force - displacement relationship specific to a vulcanized hyperelastic rubber beam.

Visualize the nonlinear spring as a diagram:
Inspect the available variables in model:

What remains to be done is to assign the nonlinear spring data to the system model. The data will be assigned the variable "SpringNonlinear.nonlinearSpring.forceDisplacement".

Assign the force-displacement curve of the nonlinear spring component:
Simulate the nonlinear spring model in System Modeler:
Extract the position of and the force on the spring:
Visualize the displacement versus the force:

There are two main things to keep in mind. First, note the negative forces and movements in the results. These didn't come from the original model of the rubber beam. This happens because System Modeler fills in these negative values by itself, using the closest positive values it has from the model. Second, notice that when the beam moves more (positive displacement), the force needed to move it also goes up. This means the beam gets harder to bend the more it is stretched.

Show how the mass position oscillates:
Show how the force on the beam:

Compare the hyperelastic spring to the linear elastic model of the spring

Compare the displacements of the spring computed with the linear and the nonlinear material model:
Compare the forces acting on the spring computed with the linear and the nonlinear material model:

Given that the nonlinear model, represented in red, is more rigid compared to the linear model, its eigenfrequencies are higher than those of the linear model. Consequently, the displacement period in the nonlinear model is shorter than in the linear model. Additionally, the nonlinear model can withstand greater forces than the linear spring at the same level of displacement, as illustrated above.

This example demonstrates how the complexity of nonlinear PDE dynamics can be effectively simplified and captured in system-level modeling through the combined use of System Modeler and Mathematica.