pystran package#
Submodules#
- pystran.assemble module
- pystran.beam module
assemble_mass()
assemble_stiffness()
beam_2d_3d_axial_stiffness()
beam_2d_3rd_deriv_displ_matrix()
beam_2d_axial_force()
beam_2d_bending_stiffness()
beam_2d_curv_displ_matrix()
beam_2d_end_forces()
beam_2d_mass()
beam_2d_moment()
beam_2d_shear_force()
beam_3d_axial_force()
beam_3d_bending_stiffness()
beam_3d_end_forces()
beam_3d_mass()
beam_3d_moment()
beam_3d_shear_force()
beam_3d_stretch_displ_matrix()
beam_3d_torsion_displ_matrix()
beam_3d_torsion_moment()
beam_3d_torsion_stiffness()
beam_3d_xy_3rd_deriv_displ_matrix()
beam_3d_xy_curv_displ_matrix()
beam_3d_xy_shape_fun()
beam_3d_xy_shape_fun_xi2()
beam_3d_xy_shape_fun_xi3()
beam_3d_xz_3rd_deriv_displ_matrix()
beam_3d_xz_curv_displ_matrix()
beam_3d_xz_shape_fun()
beam_3d_xz_shape_fun_xi2()
beam_3d_xz_shape_fun_xi3()
- pystran.freedoms module
- pystran.gauss module
- pystran.geometry module
- pystran.model module
add_beam_member()
add_dof_links()
add_joint()
add_load()
add_mass()
add_rigid_link_member()
add_spring_member()
add_support()
add_truss_member()
bounding_box()
characteristic_dimension()
create()
free_body_check()
ndof_per_joint()
number_dofs()
refine_member()
remove_loads()
remove_supports()
set_solution()
solve_free_vibration()
solve_statics()
statics_reactions()
- pystran.plots module
plot_applied_forces()
plot_applied_moments()
plot_axial_forces()
plot_bending_moments()
plot_deformations()
plot_joint_ids()
plot_member_ids()
plot_member_orientation()
plot_members()
plot_reaction_forces()
plot_reaction_moments()
plot_rotation_supports()
plot_shear_forces()
plot_torsion_moments()
plot_translation_supports()
setup()
show()
- pystran.rigid module
- pystran.rotation module
- pystran.section module
- pystran.spring module
- pystran.truss module
Module contents#
pystran - Python package for structural analysis with trusses and beams
2025, Petr Krysl
This package is intended for educational purposes.
## Approach
The approach is based on classical weighted residual formulation (Galerkin). The formulations are derived in the “Finite element modeling with shells and beams” [book](http://hogwarts.ucsd.edu/~pkrysl/femstructures-book/).
The approach here is modern as opposed to classic.
Classically, the geometrical transformations are developed explicitly to push the stiffness and mass matrices from special orientations to the real orientation in space. This requires multiplication of the stiffness and mass matrices by large transformation matrices on the left and right. The matrices in special orientations are usually derived analytically, and these explicit expressions become the starting point for developing computations. So for instance for spatial beams, the starting point are 12x12 matrices.
The modern approach develops an expression for the strains in a basic element, for instance curvature in beams. This leads to a small basic stiffness matrix, 4x4 matrix in the case of a 2D beam. The geometrical transformation is then introduced implicitly by projecting displacements in the real space onto the local basis vectors of the element. The Galerkin weighted residual method then naturally completes the development of the matrices.
The three dimensional beam is in such a modern framework treated as a superposition of four stiffness mechanisms, each with its own strain-displacement matrix. The stiffness and mass matrices are obtained readily using numerical integration.
## Features and limitations
The package analyzes two-dimensional and three-dimensional structures made up of truss (axial) members and beams (even in combination), rigid links, and general springs. Concentrated masses can be added at joints.
Linear statics and dynamics (free vibration) solvers are included.
Only elastic models can be solved.
For beams, only the Bernoulli-Euler model is implemented, so no shear deformation is taken into account.
Only straight members are treated.
It is assumed that there is no coupling between the bending actions in the two orthogonal planes.
Coupling of axial and bending action is not implemented. This means that the neutral axis must pass through the centroid.
Warping of the cross sections is not modelled, hence only free torsion effects are included.
Member loading is not considered. All member loading needs to be converted to nodal forces.
Internal hinges can be modelled with linked joints. No member end releases are implemented.
Degrees of freedom are only along the global Cartesian axes. Skew supports are not included (except with a penalty method based on springs)
Offsets of the beams from the joints are currently not implemented.
Rigid links between pairs of joints can be modeled with a penalty approach.