Elements
NuSA provides five finite-element formulations in nusa.element.
Elements own connectivity and geometry-dependent formulation and reference
reusable physical-property objects when required. Solved response is evaluated explicitly from the element
displacement vector and stored in analysis results.
Common element contract
Every element has an element type, a label assigned by the model, and a tuple of connected nodes.
The numerical analysis asks an element for its stiffness matrix and evaluates its solved response from an explicit local displacement vector.
Conceptually:
Ke = element.get_element_stiffness()
values = element.compute_results(u_e)
Elements do not read solved displacement attributes from nodes and do not cache solved forces, stresses, or strains on themselves.
Spring
Spring is a two-node, one-dimensional elastic element.
Required property:
kPositive spring stiffness.
Local displacement vector:
[ux_i, ux_j]
Canonical results:
force_i
force_j
Bar
Bar is a two-node axial element.
Requires material=Material(E=...) and section=Section(A=...).
Both references are read-only. The convenience properties E and A
are delegated to these objects.
Local displacement vector:
[ux_i, ux_j]
Canonical results:
force_i
force_j
axial_force
axial_stress
Positive axial force/stress denotes tension.
Truss
Truss is a two-dimensional, two-node axial element whose orientation maps
its axial response into the global coordinate system.
Requires material=Material(E=...) and section=Section(A=...).
Local/global element displacement vector used by the current formulation:
[ux_i, uy_i, ux_j, uy_j]
Canonical results:
axial_force
axial_stress
Beam
Beam is the current two-node Euler-Bernoulli beam formulation.
Requires material=Material(E=...) and section=Section(I=...).
Element displacement vector:
[uy_i, ur_i, uy_j, ur_j]
Canonical end actions:
shear_force_i
shear_force_j
bending_moment_i
bending_moment_j
LinearTriangle
LinearTriangle is a three-node constant-strain triangle (CST) for plane
stress.
Requires material=Material(E=..., nu=...) and a positive thickness
parameter. thickness and its alias t are read-only.
Element displacement vector:
[ux_1, uy_1, ux_2, uy_2, ux_3, uy_3]
The element additionally exposes explicit strain/stress evaluation:
strain = element.compute_strain(u_e)
stress = element.compute_stress(u_e)
values = element.compute_results(u_e)
Canonical results:
stress_xx
stress_yy
stress_xy
strain_xx
strain_yy
strain_xy
Validation
NuSA validates material and section parameters when their domain objects are
created and checks required properties at element construction. thickness
and spring stiffness must be finite, positive, and non-boolean.
Degenerate triangular geometry is also rejected.
For physical-property definitions see Materials and sections. For worked examples see Examples.
API reference
- class nusa.element.Bar(nodes, *, material, section)[source]
Bases:
ElementBar element for finite element analysis.
- Parameters:
- nodestuple of Node
Element connectivity.
- materialMaterial
Material providing Young’s modulus E.
- sectionSection
Section providing cross-sectional area A.
- property A
Cross-sectional area provided by the section.
- property E
Young’s modulus provided by the material.
- property L
Length of element.
- property material
Material associated with the element (read-only).
- property section
Section associated with the element (read-only).
- class nusa.element.Beam(nodes, *, material, section)[source]
Bases:
ElementEuler-Bernoulli beam element for finite element analysis.
- Parameters:
- nodestuple of Node
Element connectivity.
- materialMaterial
Material providing Young’s modulus E.
- sectionSection
Section providing second moment of area I.
- property E
Young’s modulus provided by the material.
- property I
Second moment of area provided by the section.
- property L
Length of element.
- property material
Material associated with the element (read-only).
- property section
Section associated with the element (read-only).
- class nusa.element.Element(etype)[source]
Bases:
objectBase class for finite elements.
Elements own formulation and connectivity and reference the physical properties required by that formulation. Solved response belongs to analysis results, not to the element instance.
- class nusa.element.LinearTriangle(nodes, *, material, thickness)[source]
Bases:
ElementThree-node constant-strain triangle (plane stress).
- Parameters:
- nodestuple of Node
Triangle connectivity.
- materialMaterial
Material defining E and nu (both required).
- thicknessfloat
Finite, strictly positive thickness.
- property A
- property B
- property D
Constitutive matrix
Currently only plane stress supported
- property E
- property material
- property nu
- property t
- property thickness
- class nusa.element.Spring(nodes, ke)[source]
Bases:
ElementSpring element for finite element analysis
- nodestuple
Connectivity for element given as tuple of
Nodeobjects- kefloat
Spring stiffness
Example
n1 = Node((0,0)) n2 = Node((0,0)) e1 = Spring((n1,n2), 1000)
- class nusa.element.Truss(nodes, *, material, section)[source]
Bases:
ElementTruss element for finite element analysis.
- Parameters:
- nodestuple of Node
Element connectivity.
- materialMaterial
Material providing Young’s modulus E.
- sectionSection
Section providing cross-sectional area A.
- property A
Cross-sectional area provided by the section.
- property E
Young’s modulus provided by the material.
- property L
Length of element
- property material
Material associated with the element (read-only).
- property section
Section associated with the element (read-only).
- property theta
Element angle, measure from X-positive axis counter-clockwise.