trusspy.core.analysis module#
title: TrussPy - Truss Solver for Python author: Andreas Dutzler year: 2023
- class trusspy.core.analysis.Analysis[source]#
Bases:
objectAnalysis class containing all data for one increment.
- U#
placeholder for 2d-array with total displacement vector at the end of the inc. U.shape = (nnodes, ndim). To get Ux,Uy,Uz of node i type: U[i]
- Type:
None
- U0#
placeholder for 2d-array with total displacement vector at the beginning of the inc. U0.shape = (nnodes, ndim). To get U0x,U0y,U0z of node i type: U0[i]
- Type:
None
- r#
placeholder for 2d-array with internal force vector r.shape = (nnodes, ndim). To get rx,ry,rz of node i type: r[i]
- Type:
None
- g#
placeholder for 2d-array with equilibrium vector g.shape = (nnodes, ndim). To get gx,gy,gz of node i type: g[i]
- Type:
None
- K#
placeholder for 4d-array with stiffness matrix K.shape = (nnodes,nnodes,ndim,ndim). To get K with shape (ndim,ndim) between force of node i w.r.t. displacement of node j type K[i,j].
- Type:
None
- stretch#
placeholder for 2d-array with stretch vector stretch.shape = (nelems, 1). To get stretch of element i type: stretch[i]
- Type:
None
- element_force#
placeholder for 2d-array with element force vector element_force.shape = (nelems, 1). To get element_force of element i type: element_force[i]
- Type:
None
- element_stress#
placeholder for 2d-array with element stress vector element_stress.shape = (nelems, 1). To get element_stress of element i type: element_stress[i]
- Type:
None
- element_stress0#
placeholder for 2d-array with element stress vector at the beginning of the increment
element_stress0.shape = (nelems, 1). To get element_stress0 of elementitype:element_stress0[i].- Type:
None
- DOF0#
placeholder for indices of inactive (locked) degree of freedoms
- Type:
None
- DOF1#
placeholder for indices of active (free) degree of freedoms
- Type:
None
- Ured#
placeholder for reduced dispaclement vector (only active components of U)
- Type:
None
- Vred#
placeholder for reduced dispaclement vector (only active components of V)
- Type:
None
- state_v#
placeholder for state variable vector
- Type:
None
- build(nnodes, nelems, ndim, DOF0, DOF1, nstatev=0)[source]#
Build/initialize analysis class with given dimensions regarding nodes and dimension.
Parameter#
- nnodesint
Number of nodes
- nelemsint
Number of elements
- ndimint
Dimension of analysis
- DOF0int
indices of inactive (locked) degree of freedoms (generated with flattened degree of freedoms)
- DOF1int
indices of active (free) degree of freedoms (generated with flattened degree of freedoms)
:raises ValueError : Result is not empty and can’t be built.: Dimensions already set.