NuSA documentation
NuSA is a small Python finite-element library for teaching, experimentation, and structural-analysis workflows.
The public analysis workflow introduced in NuSA 0.4 remains explicit in 0.5:
define a Model -> solve the analysis -> work with a StaticResult
If you are new to NuSA, start with Getting started. If you already know the basic API and want to understand the design and ownership of solved state, read How NuSA works.
Quick example
from nusa import Bar, BarModel, Material, Node, Section
n1 = Node((0.0, 0.0))
n2 = Node((1.0, 0.0))
steel = Material(E=200e9)
section = Section(A=1e-4)
model = BarModel("Simple bar")
model.add_nodes([n1, n2])
model.add_element(
Bar((n1, n2), material=steel, section=section)
)
model.add_constraint(n1, ux=0.0)
model.add_force(n2, (1000.0,))
result = model.solve()
print(result.displacement(n2))
print(result.reaction(n1))
Getting started
Getting started