System

Creates an instance of a truss model

System class methods

method

input

returns

description

__init__(…)

constructor.

addNode(newNode)

Node(…) object

add one Node() object to your list of elements (the model)

addElement(newElem)

Element(…) object

add one Element() object to your list of elements (the model)

solve()

assemble \([K_t]\) and \(\{P\}\), solve for \(\{u\} = [K_t]^{-1}\{P\}\), loop through nodes and update nodal displacement, compute unbalanced force \(\{R\} = \{P\} - \{F\}\)

plot(factor=1.0)

collect node info and send it to the plotter. Request the plot.

report()

print a summary report: list of nodal position, load, displacement, unbalanced force.

System class variables

name

type

description

nodes

List of Node() objects

holds all the nodes in the model

elements

List of Element() objects

holds all the elements in the model

solver

Solver()

pointer to Solver() object to handle plotting

plotter

Plotter()

pointer to Plotter() object to handle plotting