Beam elements
The current beam formulation is a two-node Euler-Bernoulli beam. Each node has
transverse displacement uy and rotation ur. The corresponding generalized
nodal actions are transverse force fy and bending moment m.
Use nusa.model.BeamModel with nusa.element.Beam.
Element properties
A beam element requires Young’s modulus E and second moment of area I:
e1 = Beam((n1, n2), E=210e9, I=4e-4)
Beam element results are reported as end actions:
shear_force_i
shear_force_j
bending_moment_i
bending_moment_j
Loads and moments
Transverse force and nodal moment are added separately:
model.add_force(n2, (-10e3,))
model.add_moment(n2, (20e3,))
Example: two-element beam
The following example contains two beam elements, a nodal force, a nodal moment, and fixed end conditions.
1# -*- coding: utf-8 -*-
2# ***********************************
3# Author: Pedro Jorge De Los Santos
4# E-mail: delossantosmfq@gmail.com
5# License: MIT License
6# ***********************************
7
8from nusa import Beam, BeamModel, Node
9
10
11def test2():
12 """Logan (2007), Example 4.4."""
13 E = 210e9
14 I = 4e-4
15 P = 10e3
16 M = 20e3
17 L = 3.0
18
19 model = BeamModel("Beam Model")
20 n1 = Node((0.0, 0.0))
21 n2 = Node((L, 0.0))
22 n3 = Node((2.0 * L, 0.0))
23
24 e1 = Beam((n1, n2), E, I)
25 e2 = Beam((n2, n3), E, I)
26
27 model.add_nodes([n1, n2, n3])
28 model.add_elements([e1, e2])
29 model.add_force(n2, (-P,))
30 model.add_moment(n2, (M,))
31 model.add_constraint(n1, uy=0.0, ur=0.0)
32 model.add_constraint(n3, uy=0.0, ur=0.0)
33
34 result = model.solve()
35
36 print("Node 2 displacement:", result.displacement(n2))
37 print("Nodal forces:", result.nodal_forces)
38 print("Element 1 actions:", result.element_result(e1))
39 print("Element 2 actions:", result.element_result(e2))
40
41 return result
42
43
44if __name__ == "__main__":
45 test2()
Important result queries
Displacement and rotation:
values = result.displacement(n2)
values["uy"]
values["ur"]
Support actions:
result.reaction(n1)
Element end actions:
result.element_result(e1)
Beam diagrams are result-owned visualizations:
result.plot_shear_diagram()
result.plot_moment_diagram()
This keeps the beam model as the problem definition while the diagrams are
derived from the frozen element actions stored in StaticResult.