Introducing springs to a point/face as a boundary condition

Numerical methods and mathematical models of Elmer
Post Reply
MoTN
Posts: 16
Joined: 17 Mar 2020, 04:25
Antispam: Yes
Location: Canada

Introducing springs to a point/face as a boundary condition

Post by MoTN » 21 Mar 2020, 03:05

Dear all,

I hope this finds you in good health.
Now that I have self-isolated myself due to the COVID-19 situation, I decided to make the best use of my time and learn ELMER! :D
I would like to use ELMER for a part of my research in which I need to model a torsional and a translational spring at a point (node).
While I found the forum very helpful, I noticed that most of the posts concerning spring boundary condition have been left unanswered.

I would like to use the “spring” keyword in ELMER in a systematic way so that it makes it clearer for everyone and myself how to introduce a translational/rotational spring to a boundary or a node.
My goal is to obtain large-amplitude deflections of a cantilevered beam subjected to a distributed load, using different ways to model the clamped end:

1) Setting u(i=1,2,3)=0 at the clamped boundary
2) Introducing a spring with a large stiffness to the clamped boundary
3) Setting u(i=1,2,3)=0 at every nodes on the clamped boundary
4) Introducing springs with a large stiffness at every point (node) on the clamped boundary

As expected, (1), (2), and (3) yield almost identical results. However, once I define the following Bc, the solution does not converge.

!!!! Type 4: Spring at Nodes
Boundary Condition 4
Target nodes (12) = Integer 1 4 5 6 805 806 807 808 809 810 811 812 !nodes on one end of the beam
Name = "ClampedNodes"
Displacement 1 = 0 !logitudinal
Spring 2 = Real 1.0e3 !transverse
Displacement 3 = 0 !spanwise
End

It seems that the solver skips "Spring 2 = Real 1.0e3", and considers no constraint in direction 2.


Could someone have a look at the following .sif content and let me know if I'm doing something wrong especially with the "Type 4: Spring at Nodes" defined as "Boundary Condition 4"?

Thanks in advance,
Best wishes
Mo

Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End

Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping (3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtu
End

Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End

Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End


Solver 1
Equation = Nonlinear elasticity
Variable = -dofs 3 Displacement
Procedure = "ElasticSolve" "ElasticSolver"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 100
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = Umfpack
element=p:2
End

Equation 1
Name = "Nonlinear"
Active Solvers(1) = 1
End

Material 1
Name = "Plastic"
Poisson ratio = 0.3
Youngs modulus = 120
End

!!!! Type 1: Clamped BC
!Boundary Condition 1
!Target Boundaries (1) = 2
!Name = "Clamped"
!Displacement 3 = 0
!Displacement 2 = 0
!Displacement 1 = 0
!End

!!!! Type 2: Introducing a Spring with large stiffness
!Boundary Condition 2
!Target Boundaries(1) = 2
!Name = "SpringBC"
!Spring 2 = Real 1.0e3
!Displacement 3 = 0
!Displacement 1 = 0
!End

!!!! Type 3: Zero-deflection at Nodes
!Boundary Condition 3
!Target nodes (12) = Integer 1 4 5 6 805 806 807 808 809 810 811 812
!Name = "ClampedNodes"
!Displacement 1 = 0
!Displacement 2 = 0
!Displacement 3 = 0
!End

!!!! Type 4: Spring at Nodes
Boundary Condition 4
Target nodes (12) = Integer 1 4 5 6 805 806 807 808 809 810 811 812
Name = "ClampedNodes"
Displacement 1 = 0
Spring 2 = Real 1.0e3
Displacement 3 = 0
End


! Distributed load along the length of the beam
Boundary Condition 5
Target Boundaries (1) = 3
Name = "Load"
Force 2 = -1e-5
End
Attachments
case.sif
(2.23 KiB) Downloaded 22 times
2.JPG
2.JPG (36.38 KiB) Viewed 678 times
1.JPG
1.JPG (19.33 KiB) Viewed 678 times

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Introducing springs to a point/face as a boundary condition

Post by kevinarden » 21 Mar 2020, 12:58

My experience is the same. I tested different configurations, but the conclusion is that the Spring boundary condition does not work for target nodes. You should consider a bug report.

Kevin

mika
Posts: 155
Joined: 15 Sep 2009, 07:44

Re: Introducing springs to a point/face as a boundary condition

Post by mika » 21 Mar 2020, 15:05

Hi,

Unfortunately node-wise spring constraints (the case 4) are ignored by the large-displacement solver. I could try to make a fix so that node-wise springs would be assembled.

A spring constraint given directly over an edge or a face should nevertheless work.

-- Mika

MoTN
Posts: 16
Joined: 17 Mar 2020, 04:25
Antispam: Yes
Location: Canada

Re: Introducing springs to a point/face as a boundary condition

Post by MoTN » 21 Mar 2020, 19:35

Hi Mika and Kevin,

Thanks for your reply.
Yes, defining a spring constraint over an edge of a face works perfectly (although the log shows a warning saying that: Model Input: Unlisted keyword: [spring 2] in section: [boundary condition 2]).

I just tested "Linear elasticity" with much smaller forcing amplitude, yet case 4 does not converge.

So, there is no way to obtain, let's say, the natural frequency/time response of a rigid beam mounted on a flexible torsional spring?

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Introducing springs to a point/face as a boundary condition

Post by kevinarden » 22 Mar 2020, 12:03

It could be simulated with edge boundary conditions using spring like this
torque.png
torque.png (5.89 KiB) Viewed 654 times
Unlisted keyword just means the word is not in the list of standard declared words so you have to declare type, which you did, it won't work unless you declare it as Real. If the key word is in the list you don't have to declare type.

Spring 2 = Real 1000.

mika
Posts: 155
Joined: 15 Sep 2009, 07:44

Re: Introducing springs to a point/face as a boundary condition

Post by mika » 23 Mar 2020, 12:04

After checking the code quickly, I think the linear elasticity solver might assemble node-wise springs already if the target nodes were listed in the mesh.boundary file to define zero-dimensional parts of the boundary. Instead of using the keyword Target Nodes, the keyword Target Boundaries should then be used to list the identifiers of the zero-dimensional parts of the boundary.

Anyhow, I plan to revise the code such that all structural solvers would allow to have node-wise springs in the same way.

-- Mika

MoTN
Posts: 16
Joined: 17 Mar 2020, 04:25
Antispam: Yes
Location: Canada

Re: Introducing springs to a point/face as a boundary condition

Post by MoTN » 25 Mar 2020, 02:57

Thanks again Kevin and Mika,
Both are great ideas. I'm gonna test them and post the results here.

Meantime, I tried to define a spring on the edge of a shell, and obtain the natural frequencies.

Solver 1
Equation = Shell Equations
Eigen Analysis = True
Eigen System Select = Smallest magnitude
Eigen System Values = 5
Large Deflection = True
Displace mesh = True
Procedure = "ShellSolver" "ShellSolver"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = Umfpack
End


However, it seems that the solver ignores the spring. Here is how I defined the BC:

Boundary Condition 1
Target Boundaries(1) = 1
Name = "AllFixed"
U 1 = Real 0
U 3 = Real 0
Spring 2 = Real 1.0
DNU 1 = Real 0
DNU 3 = Real 0
DNU 2 = Real 0
End

I also tried the following BC which did not work either:
Resultant Force 2 = variable Displacement 2
Real
0.0 0.00
0.1 1.0e3
End

I really appreciate it if you could provide some insights into this, as well.

Note that if I set all U(i)=DNU(i)=0 (for i=1,2,3), the natural frequencies are fairly close to those which one can obtain using the characteristic equation of a cantilever beam: omega=betal.^2*sqrt(Youngs*MomentInertia/(Density * Area * length^4)). so, I think the model is working for that limiting case.

mika
Posts: 155
Joined: 15 Sep 2009, 07:44

Re: Introducing springs to a point/face as a boundary condition

Post by mika » 25 Mar 2020, 19:20

Hi,

The nonlinear elasticity solver has now been fixed so that point elements are no more skipped in the matrix assembly. Giving a spring constraint should thus work if the target nodes define entities in the mesh file mesh.boundary as mentioned earlier.

Specifying the places of springs using the keyword "Target Nodes" was not previously a supported option, but I just added a new utility ("SpringAssembler" in the module file SpringAssembly within the devel repository, so a fresh compilation is necessary) to cope with this case also. The same strategy should work with several structural models in the same way.

Short instructions for the new option: Let us suppose the primary solver which should have springs is associated with for example the variable name "Displacement". If one then adds Xth solver section into the sif file as

Solver X
Equation = "Assemble Springs"
Exec Solver = Never
Procedure = "SpringAssembly" "SpringAssembler"
Displacement Variable Name = "Displacement"
End

and adds into the solver section of the primary solver a line

Assembly Solvers(1) = X

then it should be possible to write spring specifications as

Boundary Condition Y
Target Nodes(1) = ...
Spring 1 = ...
Spring 2 = ...
Spring 3 = ...
...
End

For a complete example see a test case in the directory ../fem/tests/elasticity_with_springs of the code repository. This approach depends on adding a new solver section. However the same construction should work for several models:

- linear elasticity
- nonlinear elasticity
- shells (currently only with the linearized version, with "Large Deflection=False")
- plates (untested)
- beams (untested)

In the case of shells it should be even possible to add torsional springs (the values of "Spring k", with k=4,5,6). This was a quick implementation and I didn't test with all possible settings. If someone had time to make mores tests and met troubles, I could make a further look.

-- Mika

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Introducing springs to a point/face as a boundary condition

Post by kevinarden » 26 Mar 2020, 12:18

Mika,

Thanks for the work.

Boundary Condition 3
Target Nodes(1) = 541
! Target Boundaries(1) = 5
Spring 1 = 0.0d0
Spring 2 = 1e+8
End

Does the target boundaries also work so if there were many nodes each node would not have to be listed?

Kevin

raback
Site Admin
Posts: 3697
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Introducing springs to a point/face as a boundary condition

Post by raback » 26 Mar 2020, 12:48

Hi

As far as I understood Mika's economical implementation it is a special hack for "target nodes" (and "target coordinates"). For single nodes the integration reduces to unit weight. For higher dimensional elements I would think that the assembly would still be solver specific, unfortunately still lacking for some of them.

-Peter

Post Reply