You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added continuous example to FEM and fixed parametric interface docstrings (#118)
* added continuous example to FEM and fixed parametric interface docstrings
* a few changes in the FEM example (#119)
* editing FEM text
* temporarily disable tests
* more changes
* added more description on the continuum problem
* reactivate tests
* update title
Co-authored-by: lucaferranti <49938764+lucaferranti@users.noreply.github.com>
Co-authored-by: Jorge Pérez Zerpa <42485529+jorgepz@users.noreply.github.com>
# The Finite Element Method is widely used to solve PDEs in Engineering applications and particularly in Structural Analysis problems [[BAT14]](@ref). The procedure consists discretizing the domain into _elements_ and assembly a system of balance equations. For linear problems, this system can be usually written as
7
-
#
1
+
# # Application of Interval Linear Algebra to FEM analysis
2
+
# The Finite Element Method is widely used to solve PDEs in Engineering applications and particularly in Structural Analysis problems [[BAT14]](@ref). The procedure consists in discretizing the domain into _elements_ and constructing (_assembling_) a system of balance equations. For linear problems, this system can be usually written as
8
3
# ```math
9
4
# K \cdot d = f
10
5
# \qquad
11
-
# K = \sum_e K_e
6
+
# K = \sum_{e=1}^{n_e} K_e
12
7
# ```
13
-
# where $f$ is the vector of external loads, $K_e$ is the element stiffness matrix and $d$ is the vector of unknown displacements.
8
+
# where $n_e$ is the number of elements of the domain, $f$ is the vector of external loads, $K_e$ is the stiffness matrix of element $e$ in global coordinates, $K$ is the assembled stiffness matrix and $d$
9
+
# is the vector of unknown displacements. This tutorial shows how IntervalLinearAlgebra can
10
+
# be used to solve structural mechanics problems with uncertainty in the parameters. Particularly,
11
+
# it highlights the importance of parametric interval linear systems.
14
12
#
15
-
# ### FEM for truss structures
16
-
# A frequent and simple type of structures are _Truss structures_, which are formed by bars connected but not welded. Truss models are considered during the conceptual design of bridges or other structures.
13
+
# ## Simple truss structure
17
14
#
15
+
# A frequent and simple type of structures are _Truss structures_, which are formed by bars connected but not welded. Truss models are usually considered during the conceptual design of bridges or other structures.
16
+
#
17
+
# ### Stiffness equations
18
18
# The stiffness matrix of a truss element in the local coordinate system is given by
19
19
# ```math
20
20
# K_L = s
@@ -28,7 +28,7 @@
28
28
# \right),
29
29
# ```
30
30
#
31
-
# where $s =\frac{E A}{L}$, with $E$ being the Young modulus, $A$ the area of the cross-section and $L$ the length of that truss element.
31
+
# where $s =\frac{E A}{L}$ is the stiffness, $E$ is the Young modulus, $A$ is the area of the cross-section and $L$ is the length of that truss element.
32
32
#
33
33
# The change-of-basis matrix is given by
34
34
# ```math
@@ -40,17 +40,18 @@
40
40
# 0 & 0 & \cos(\alpha) & -\sin(\alpha) \\
41
41
# 0 & 0 & \sin(\alpha) & \cos(\alpha)
42
42
# \end{matrix}
43
-
# \right),
43
+
# \right).
44
44
# ```
45
45
#
46
46
# The system of equations for each element is written in local coordinates as
47
47
# ```math
48
48
# K_L d_L = f_L
49
49
# ```
50
-
# and using the change-of-basis we obtain
50
+
# and using the change-of-basis we obtain the equations for that element in the global systems of coordinates
51
51
# ```math
52
-
# K_G d_G = f_G \qquad K_G = Q K_L Q^T
52
+
# K_G d_G = f_G \qquad K_G = Q K_L Q^T.
53
53
# ```
54
+
# After the system of equations for each element is in global coordinates, the whole system is assembled.
54
55
#
55
56
# The unitary stiffness matrix (for $s=1$) can be computed using the following function.
#The reference (dashed blue line) and deformed (solid red) configurations of the structure are ploted. Since the displacements are very small, a `scaleFactor` is considered to amplify the deformation and ease the visualization.
135
+
#The reference (dashed blue line) and deformed (solid red) configurations of the structure are ploted.
136
+
# Since the displacements are very small, a `scaleFactor` is considered to amplify
# Let us now define the material parameters. Here we assume a 10% uncertainty on the Young modulus, while Poisson ratio and the density are fixed. This can be related to a steel plate problem with an unknown composition, thus unknown exact Young modulus value.
295
+
296
+
ν =0.25# Poisson
297
+
ρ =8e3# density
298
+
299
+
@affinevars E # Young modulus, defined as symbolic variable
300
+
En =200e9# nominal value of the young modulus
301
+
Erange = En ±0.1* En # uncertainty range of the young modulus
302
+
303
+
# We can now assemble the global stiffness matrix.
304
+
# We set the constitutive matrix for a plane stress state.
305
+
C = E / (1-ν^2) * [ 1 ν 0 ;
306
+
ν 10 ;
307
+
00 (1-ν)/2 ]
308
+
309
+
# We compute the free and fixed degrees of freedom
310
+
functionnodes2dofs(u)
311
+
v =Vector{Int64}(undef, 2*length(u))
312
+
for i in1:length(u)
313
+
v[2i-1] =2u[i] -1; v[2i] =2u[i]
314
+
end
315
+
return v
316
+
end
317
+
FixNodes =1:nnosx
318
+
FixDofs =nodes2dofs(FixNodes) # first add all dofs of the nodes
319
+
deleteat!(FixDofs, 3:2:(length(FixDofs)-2)) # then remove the free dofs of the nodes
320
+
LibDofs =Vector(1:2*nnostot) # free degrees of fredom
0 commit comments