Skip to content

Commit f250248

Browse files
committed
cmp
1 parent 02281ca commit f250248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+3148
-1871
lines changed

content/en/benchmarks/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Benchmarks
3+
description: Benchmarks
4+
---
5+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Transverse loading
3+
description: >-
4+
In this case the cantilever beam is subjected only to a transverse force
5+
of $\boldsymbol{F} = 10 \, \mathbf{E}_2$ in a single step.
6+
---
7+
8+
## End Force
9+
10+
In this case the cantilever beam is subjected only to a transverse force
11+
of $\boldsymbol{F} = 10 \, \mathbf{E}_2$ in a single step. The
12+
simulation uses the following geometric and material properties from the
13+
literature:
14+
15+
$$
16+
\begin{array}{lr}
17+
L =& 1 \\
18+
E =& 10 \\
19+
\hphantom{.}
20+
% G = GAv/A
21+
\end{array}
22+
\qquad
23+
\begin{array}{lr}
24+
A =& 10^7 \\
25+
I =& 1 \\
26+
J =& 10^7 \\
27+
\end{array}
28+
$$
29+
30+
Two values for the shear modulus $G$ are used with a shear
31+
stiffness $GA$ of $500$ and $10$, respectively, the latter representing
32+
the case with significant shear deformations.
33+
Table (#tab:transv) presents the numerical tip displacements and the
34+
analytic solution from <cite key="batista2016closedform"></cite> using Jacobi elliptic
35+
functions and accounting for flexural and shear deformations. The
36+
analysis uses both 2-node and 4-node elements. For the sake of brevity,
37+
the results are reported only for the variants using the same
38+
parameterization as the wrapped element's interpolation.
39+
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Rigid Offsets
3+
meta:
4+
title: "A verification example for frame element offset handling in OpenSees"
5+
tags: ["Frame", "Offset"]
6+
weight: 30
7+
draft: false
8+
description: >-
9+
This example tests the effect of rigid joint offsets in a diamond-shaped frame.
10+
The analytical solution is known, and the test is used to verify the correct
11+
treatment of offset geometry in a 3D frame element.
12+
downloads:
13+
Tcl: ["test-linear.tcl"]
14+
---
15+
16+
17+
This test case consists of a simple two-node frame element arranged in a diamond pattern.
18+
Rigid offsets at both ends rotate the element relative to the applied force direction.
19+
This configuration is highly sensitive to geometric assumptions, making it ideal
20+
for verifying the implementation of joint offsets in 3D frame elements.
21+
22+
23+
A vertical unit load is applied at the free end, and a single analysis step is performed:
24+
25+
{{< tabs tabTotal="2" >}}
26+
{{% tab name="Python" %}}
27+
```python
28+
m.pattern("Plain", 1, "Linear", loads={2: (0, 1, 0, 0, 0, 0)})
29+
30+
P = -4 * L**2 / (E * I)
31+
m.integrator("LoadControl", P)
32+
m.analysis("Static")
33+
m.test("NormDispIncr", 1e-8, 2)
34+
m.analyze(1)
35+
36+
print(P / diamond_solution(E*I, E*A, L, off=off) / L)
37+
print(m.nodeDisp(1))
38+
print(m.nodeDisp(2))
39+
print(m.nodeDisp(2, 2) / L)
40+
return m
41+
```
42+
{{% /tab %}}
43+
{{< /tabs >}}
44+
45+
## Validation
46+
47+
Recall the stiffness $\boldsymbol{K}_e$ of a linear 2D Euler-Bernoulli beam:
48+
49+
$$
50+
\boldsymbol{K}_e = \begin{bmatrix}
51+
EA/L_e & 0 & 0 \\
52+
0 & 4 EI/L_e & 2 EI/L_e \\
53+
0 & 2 EI/L_e & 4 EI/L_e \\
54+
\end{bmatrix}
55+
$$
56+
57+
This is transformed into the angled configuration using the transformation:
58+
59+
$$
60+
\boldsymbol{A}_v = \begin{bmatrix}
61+
-dX/L_e & dY/L_e & 0 & dX/L_e \\
62+
-dY/L_e^2 & -dX/L_e^2 & 0 & dY/L_e^2 \\
63+
-dY/L_e^2 & -dX/L_e^2 & 1 & dY/L_e^2 \\
64+
\end{bmatrix}
65+
$$
66+
67+
and joint offsets are similarly applied with:
68+
69+
$$
70+
\boldsymbol{A}_o =
71+
\begin{bmatrix}
72+
0 & 1 & 0 \\
73+
1 & 0 & -L_o/\sqrt{2} \\
74+
0 & 0 & 1 \\
75+
0 & 0 & L_o/\sqrt{2} \\
76+
\end{bmatrix}
77+
$$
78+
79+
```python
80+
import numpy as np
81+
def diamond_solution(EI, EA, L, off=0):
82+
Le = L - 2*off
83+
dX = dY = Le/np.sqrt(2)
84+
Ag = np.array([[-dX/Le , dY/Le , 0, dX/Le ],
85+
[-dY/Le**2, -dX/Le**2, 0, dY/Le**2],
86+
[-dY/Le**2, -dX/Le**2, 1, dY/Le**2]])
87+
Ao = np.array([[0, 1, 0],
88+
[1, 0,-off/np.sqrt(2)],
89+
[0, 0, 1],
90+
[0, 0, off/np.sqrt(2)]])
91+
A = Ag @ Ao
92+
Ke = np.array([[EA/Le, 0, 0],
93+
[ 0, 4*EI/Le, 2*EI/Le],
94+
[ 0, 2*EI/Le, 4*EI/Le]])
95+
K = A.T @ Ke @ A
96+
return 1 / np.linalg.solve(K, [1, 0, 0])
97+
```
98+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
pragma openseespy
3+
4+
model -ndm 3 -ndf 6
5+
6+
set off [expr 0.1*5/sqrt(2)]
7+
8+
node 1 0 0 0
9+
node 2 3.5355339059327373 3.5355339059327373 0
10+
fix 1 0 1 1 1 1 1
11+
fix 2 1 0 1 1 0 0
12+
geomTransf Linear 1 0 0 1 -jntOffset $off $off 0.0 -$off -$off 0.0
13+
14+
section Elastic 1 30 500 -Iy 1 -Iz 1 -G 1 -J 1.5
15+
element forceBeamColumn 1 1 2 -transform 1 -section 1 -shear 0
16+
17+
pattern Plain 1 Linear {load 2 0 1 0 0 0 0}
18+
integrator LoadControl -3.3333333333333335
19+
analysis Static
20+
analyze 1
21+
22+
verify value "[expr [nodeDisp 2 2]/5]" -0.3371259258188718
23+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Frame element loading
3+
---
4+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#
2+
# Simply supported beam with distributed loads
3+
#
4+
5+
verify about "2D Frame element loads"
6+
set E 30000.0
7+
set A 20.0
8+
set I 1400.0
9+
10+
set L 100.0
11+
set beta 0.2
12+
set lp [expr $beta*$L]
13+
14+
# Point loads
15+
set P 200.0
16+
set N 150.0
17+
set aL 0.4
18+
set a [expr $aL*$L]
19+
20+
# Distributed loads
21+
set wt 3.0
22+
set wa 2.0
23+
24+
set nIP 5
25+
26+
set elements {1 2 3 5}
27+
28+
foreach element $elements {
29+
30+
model basic -ndm 2 -ndf 3
31+
32+
node 1 0.0 0.0
33+
node 2 $L 0.0
34+
35+
fix 1 1 1 0
36+
fix 2 0 1 0
37+
38+
section Elastic 1 $E $A $I
39+
40+
geomTransf Linear 1
41+
42+
switch $element {
43+
1 {
44+
puts " ElasticBeamColumn"
45+
element elasticBeamColumn 1 1 2 $A $E $I 1
46+
}
47+
2 {
48+
puts " DispBeamColumn"
49+
element dispBeamColumn 1 1 2 $nIP 1 1
50+
}
51+
3 {
52+
puts " NonlinearBeamColumn"
53+
element nonlinearBeamColumn 1 1 2 $nIP 1 1
54+
}
55+
4 {
56+
puts " BeamWithHinges"
57+
element beamWithHinges 1 1 2 1 $lp 1 $lp $E $A $I 1
58+
}
59+
5 {
60+
puts " PrismFrame"
61+
element PrismFrame 1 1 2 $A $E $I 1
62+
}
63+
}
64+
65+
pattern Plain 1 "Constant" {
66+
set P2 [expr $P/2]
67+
set N2 [expr $N/2]
68+
69+
eleLoad -ele 1 -type -beamPoint $P2 $aL $N2
70+
eleLoad -ele 1 -type -beamPoint $P2 $aL $N2
71+
72+
set wt2 [expr $wt/2]
73+
set wa2 [expr $wa/2]
74+
75+
eleLoad -ele 1 -type -beamUniform $wt2 $wa2
76+
eleLoad -ele 1 -type -beamUniform $wt2 $wa2
77+
}
78+
79+
test NormUnbalance 1.0e-10 10 0
80+
algorithm Newton
81+
integrator LoadControl 1.0
82+
constraints Plain
83+
system ProfileSPD
84+
numberer Plain
85+
analysis Static
86+
87+
verify value [analyze 2] 0
88+
89+
90+
set d1 [expr $aL*$N*$L/($E*$A)]
91+
set d2 [expr $wa*pow($L,2)/(2*$E*$A)]
92+
verify value [nodeDisp 2 1] [expr $d1+$d2] 1e-6 "axial displacement"
93+
94+
set V1 [expr $P*(1-$aL)]
95+
set d1 [expr -$V1/(6*$E*$I*$L)*($a*$a*$L-2*$a*$L*$L)]
96+
set d2 [expr $wt*pow($L,3)/(24*$E*$I)]
97+
verify value [nodeDisp 1 3] [expr $d1+$d2] 1e-6 "rotation (node 1)"
98+
99+
set d1 [expr -$V1/(6*$E*$I*$L)*($a*$a*$L+$a*$L*$L)]
100+
verify value [nodeDisp 2 3] [expr $d1-$d2] 1e-6 "rotation (node 2)"
101+
102+
wipe
103+
}

0 commit comments

Comments
 (0)