Materials and sections
NuSA 0.5 introduces reusable physical-property objects. A structural element
references a nusa.material.Material and, where appropriate, a
nusa.section.Section, rather than accepting individual physical
parameters in its constructor.
Material
Material(E, nu=None, name=None) defines an isotropic linear-elastic
material. Young’s modulus E is required and must be finite and strictly
positive. Poisson’s ratio nu is optional; if provided, it must satisfy
-1 < nu < 0.5. A triangle requires a material with nu defined.
from nusa import Material
steel = Material(E=210e9, nu=0.3, name="Steel")
The material exposes read-only E, nu, and name properties.
Section
Section(A=None, I=None, name=None) stores geometric section properties:
A: cross-sectional area, required byBarandTruss.I: second moment of area, required byBeam.
At least one is required. Both must be finite and strictly positive when provided. A section may contain both properties, but each element validates only the property it needs.
from nusa import Section
section = Section(A=2.0e-3, I=8.0e-6, name="Main member")
Properties A, I, and name are read-only.
Element requirements
Element |
Construction |
|---|---|
|
|
|
|
|
|
|
|
|
|
All named physical-object arguments above are keyword-only, except the
Spring stiffness argument. Boolean values (including NumPy booleans)
are not valid physical scalars. Units are chosen consistently by the user;
NuSA does not perform unit conversions.
API reference
- class nusa.material.Material(E, nu=None, name=None)[source]
Linear-elastic isotropic material properties.
- Parameters:
- Efloat
Young modulus. Must be finite and strictly positive.
- nufloat, optional
Poisson ratio. When provided, must satisfy -1 < nu < 0.5.
- namestr, optional
Descriptive metadata for the material.
- property E
Young modulus.
- property name
Optional descriptive name.
- property nu
Poisson ratio, or None when unspecified.
- class nusa.section.Section(A=None, I=None, name=None)[source]
Cross-section properties used by structural elements.
- Parameters:
- Afloat, optional
Cross-sectional area.
- Ifloat, optional
Second moment of area.
- namestr, optional
Descriptive metadata for the section.
- property A
Cross-sectional area, or None when unspecified.
- property I
Second moment of area, or None when unspecified.
- property name
Optional descriptive name.