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 receives reusable material and section objects. Its formulation requires Young’s modulus E from the material and second moment of area I from the section:

material = Material(E=210e9)
section = Section(I=4e-4)

e1 = Beam(
    (n1, n2),
    material=material,
    section=section,
)

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, Material, Node, Section
 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    material = Material(E=E)
20    section = Section(I=I)
21
22    model = BeamModel("Beam Model")
23    n1 = Node((0.0, 0.0))
24    n2 = Node((L, 0.0))
25    n3 = Node((2.0 * L, 0.0))
26
27    e1 = Beam((n1, n2), material=material, section=section)
28    e2 = Beam((n2, n3), material=material, section=section)
29
30    model.add_nodes([n1, n2, n3])
31    model.add_elements([e1, e2])
32    model.add_force(n2, (-P,))
33    model.add_moment(n2, (M,))
34    model.add_constraint(n1, uy=0.0, ur=0.0)
35    model.add_constraint(n3, uy=0.0, ur=0.0)
36
37    result = model.solve()
38
39    print("Node 2 displacement:", result.displacement(n2))
40    print("Nodal forces:", result.nodal_forces)
41    print("Element 1 actions:", result.element_result(e1))
42    print("Element 2 actions:", result.element_result(e2))
43
44    return result
45
46
47if __name__ == "__main__":
48    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.