trusspy.model module#

title: TrussPy - Truss Solver for Python author: Andreas Dutzler year: 2023

class trusspy.model.Model(log=2, logfile=False, logfile_name='analysis')[source]#

Bases: object

Model Class with Nodes, Elements, Boundaries, etc.

stdout#

get current stdout

Type:

sys.stdout

log#

Level of collecting logging informations during analysis. Higher numbers will collect more informations (default is 2).

Type:

int

logfile#

flag for logfile creation (default is True)

Type:

boolean

Nodes#

Handles all nodes inside the model

Type:

NodeHandler

Elements#

Handles all elements inside the model

Type:

ElementHandler

Boundaries#

Handles all boundaries inside the model

Type:

BoundaryHandler

ExtForces#

Handles all external forces inside the model

Type:

ExternalForceHandler

Analysis#

Handles all data for one increment

Type:

AnalysisHandler

Results#

Handles all result data inside the model. A collection of all converged analysis solutions.

Type:

ResultHandler

Settings#

Handles all model parameters inside the model

Type:

SettingsHandler

build()[source]#

Build Model (r,U,K,…) with Model data and dimensions.

equilibrium(Ured, U0red, stage='G', analysis=None, statev_write=False)[source]#

Method to generate equilibrium for given displacements and external forces.

plot_history(nodes=[1, 1], X='Displacement X', Y='LPF', fig=None, ax=None)[source]#
plot_model(view='xz', contour=None, lim_scale=1.2, force_scale=1.0, nodesize=10, cbar_limits='auto', inc=-1)[source]#
plot_movie(view='xz', contour=None, lim_scale=1.2, force_scale=0.5, nodesize=10, cbar_limits='auto', incs='all', **kwargs)[source]#
plot_path(nodepath=[1], increment=-1, Y='Displacement X', fig=None, ax=None)[source]#
plot_show()[source]#
plt_elements(config='undeformed')[source]#
plt_extforces(config='undeformed')[source]#
plt_nodes(config='undeformed')[source]#
run()[source]#

Run job.

stiffness(Ured, analysis=None)[source]#

Method for evaluating the stiffness matrix. It re-shapes the stiffness matrix to K(nnodes,nnodes,ndim,ndim) --> K(nnodes*ndim,nnodes*nim) and returns a view on the reduced (active part of the) matrix K(nnodes*ndim,nnodes*nim)[active DOF rows][:,active DOF columns].