The core
module
- class nusa.core.Element(etype)[source]
Bases:
object
Superclass for all Elements
- Attributes:
- fx
- fy
Methods
Returns a tuple with element forces: (fx, fy)
set_element_forces
([fx, fy])Set element forces
set_label
(label)Set the label property
get_nodes
- property fx
- property fy
- class nusa.core.Model(name, mtype)[source]
Bases:
object
Superclass for all Finite Element Analysis (FEA) models.
This class serves as a base container to manage nodes and elements, allowing derived models to build and manipulate FEA structures.
Methods
add_element
(element)Add an element to the model.
add_node
(node)Add a node to the model.
Return a list of element objects.
Return a list of node objects.
Return the number of elements in the model.
Return the number of nodes in the model.
simple_report
([report_type, fname])Placeholder for a future implementation of a simple report.
- add_element(element)[source]
Add an element to the model.
- Parameters:
- element
Element
Instance of an Element to be added.
- element
- Raises:
- ValueError
If the element type does not match the model type.
- add_node(node)[source]
Add a node to the model.
- Parameters:
- node
Node
Instance of a Node to be added.
- node
- Returns:
- None
- get_number_of_elements()[source]
Return the number of elements in the model.
- Returns:
- int
Total number of elements.
- class nusa.core.Node(coordinates)[source]
Bases:
object
Class for node object.
- coordinatestuple, list
Coordinates of node
- labelint
Label of node
n1 = Node((0,0)) n2 = Node((0,0))
- Attributes:
- ex
- exy
- ey
- fx
- fy
- label
- m
- seqv
- sx
- sxy
- sy
- ur
- ux
- uy
Methods
get_displacements
get_forces
get_label
set_displacements
set_forces
set_label
- property ex
- property exy
- property ey
- property fx
- property fy
- property label
- property m
- property seqv
- property sx
- property sxy
- property sy
- property ur
- property ux
- property uy