pystran.truss module#

Define truss mechanical quantities.

pystran.truss.assemble_mass(Mg, member, i, j)[source]#

Assemble truss mass matrix.

Parameters:
  • Mg – Global structural mass matrix.

  • member – Dictionary that defines the data of the member.

  • i – Dictionary that defines the data of the first joint of the member.

  • j – Dictionary that defines the data of the second joint of the member.

Returns:

Updated global matrix is returned.

Return type:

array

pystran.truss.assemble_stiffness(Kg, member, i, j)[source]#

Assemble truss stiffness matrix.

Parameters:
  • Kg – Global structural stiffness matrix.

  • member – Dictionary that defines the data of the member.

  • i – Dictionary that defines the data of the first joint of the member.

  • j – Dictionary that defines the data of the second joint of the member.

Returns:

Updated global matrix is returned.

Return type:

array

pystran.truss.truss_2d_mass(e_x, e_z, h, rho, A)[source]#

Compute 2d truss mass matrix.

The mass matrix is consistent, which means that it is computed from the discrete form of the kinetic energy of the element,

\[\int \rho A \left(\dot u \cdot \dot u + \dot w \cdot \dot w\right)dx\]

where \(\dot u\) and \(\dot w\) are the velocities in the \(x\) and \(z\) directions.

Parameters:
  • e_x – Unit vector of the local cartesian coordinate system in the direction of the axis of the beam.

  • e_z – Unit vector of the local cartesian coordinate system (orthogonal to the axis of the beam).

  • h – Length of the beam.

  • rho – Mass density of the material.

  • A – Area of the cross section.

Returns:

Member mass matrix.

Return type:

array

pystran.truss.truss_3d_mass(e_x, e_y, e_z, h, rho, A)[source]#

Compute 3d truss mass matrix.

The mass matrix is consistent, which means that it is computed from the discrete form of the kinetic energy of the element,

\[\int \rho A \left(\dot u \cdot \dot u + \dot v \cdot \dot v + \dot w \cdot \dot w\right)dx\]

where \(\dot u\), \(\dot v\), and \(\dot w\) are the velocities in the \(x\), \(y\), and \(z\) directions.

Parameters:
  • e_x – Unit vector of the local cartesian coordinate system in the direction of the axis of the beam.

  • e_y – Unit vector of the local cartesian coordinate system (orthogonal to the axis of the beam).

  • e_z – Unit vector of the local cartesian coordinate system (orthogonal to the axis of the beam).

  • h – Length of the beam.

  • rho – Mass density of the material.

  • A – Area of the cross section.

Returns:

Member mass matrix.

Return type:

array

pystran.truss.truss_axial_force(member, i, j, xi)[source]#

Compute truss axial force based on the displacements stored at the joints.

The force is computed as \(N = EA B U\), where \(B\) is the strain-displacement matrix (computed by truss_strain_displacement()), \(U\) is the displacement vector (so that \(\varepsilon = BU\) is the axial strain), and \(EA\) is the axial stiffness.

Parameters:
  • member – Dictionary that defines the data of the member.

  • i – Dictionary that defines the data of the first joint of the member.

  • j – Dictionary that defines the data of the second joint of the member.

  • xi – Location along the bar in terms of the parameter coordinate. Unused, as the force along the bar is constant.

Returns:

Axial force is returned.

Return type:

float

pystran.truss.truss_stiffness(e_x, h, E, A)[source]#

Compute truss stiffness matrix.

The axial stiffness matrix is computed as \(K = EA B^T B h\). Here \(B\) is the stretch-displacement matrix, computed by truss_strain_displacement().

Parameters:
  • e_x – Unit vector of the local cartesian coordinate system in the direction of the axis of the beam.

  • h – Length of the beam.

  • E – Young’s modulus of the material.

  • A – Area of the cross section.

Returns:

Member stiffness matrix.

Return type:

array

pystran.truss.truss_strain_displacement(e_x, h)[source]#

Compute truss strain-displacement matrix.

The axial strain is computed as \(\varepsilon = B u\), using the strain displacement matrix \(B\) and the displacement vector \(u\).

The dimension of the strain-displacement matrix depends on the number of space dimensions. The vector \(e_x\) is the unit vector along the truss member, and it could have two or three components.

Parameters:
  • e_x – Unit vector along the axis of the member.

  • h – Length of the member.

Returns:

Strain-displacement matrix.

Return type:

array