Fundamentals

The FEModel3D class does most of the work for you in Pynite. Below is a detailed reference of all the members available within the class. To begin modeling create a new instance of the FEModel3D class as follows:

from PyNite import FEModel3D
my_model = FEModel3D()

That’s it! now you have a finite element model named my_model. Usually you’ll want to give it a name that makes sense to you rather than my_model. For the purposes of this documentation anytime you see my_model remember that we’re just referring to a FEModel3D object that we have created.

The FEModel3D object has many “methods” built into it to help you create and work with your model. For example, to add a node to the model we can simply use the add_node method:

my_model.add_node('N1', 0, 0, 0)

The methods available through the FEModel3D object are documented below.

As you create your model, the FEModel3D object organizes and stores the information you give it. This information is stored primarily in Python dictionaries. You can access these dictionaries and retrieve information from them if you recall the name of the object stored in the dictionary. For example, to retrieve the X-coordinate for the node we just created we could access it in the Nodes dictionary as follows:

my_model.Nodes['N1'].X

This returns the X coordinate for the node. Notice the “dot” operator above. As you use the dictionaries a good code environment can prompt you to see what information is available when you use the “dot” operator.

Avaliable dictionaries are:

  • my_model.Nodes A dictionary containing all the nodes in the model

  • my_model.AuxNodes A dictionary containing all the auxiliary nodes in the model

  • my_model.Members A dictionary containing all the members in the model

  • my_model.Springs A dictionary containing all the springs in the model

  • my_model.Plates A dictionary containing all the rectangular plates in the model

  • my_model.Quads A dictionary containing all the quadrilaterals in the model

  • my_model.Materials A dictionary containing all the materials in the model

  • my_model.LoadCombos A dictionary containing all the load combinations in the model

  • my_model.Meshes A dictionary containing all the meshes in the model

FEModel3D Class Reference

class PyNite.FEModel3D

A 3D finite element model object. This object has methods and dictionaries to create, store, and retrieve results from a finite element model.

D(combo_name='Combo 1')

Returns the global displacement vector for the model.

Parameters:

combo_name (str, optional) – The name of the load combination to get the results for. Defaults to ‘Combo 1’.

Returns:

The global displacement vector for the model

Return type:

array

FER(combo_name='Combo 1')

Assembles and returns the global fixed end reaction vector for any given load combo.

Parameters:

combo_name (str, optional) – The name of the load combination to get the fixed end reaction vector for. Defaults to ‘Combo 1’.

Returns:

The fixed end reaction vector

Return type:

array

K(combo_name='Combo 1', log=False, check_stability=True, sparse=True)
Returns the model’s global stiffness matrix. The stiffness matrix will be returned in

scipy’s sparse lil format, which reduces memory usage and can be easily converted to other formats.

Parameters:
  • combo_name (str, optional) – The load combination to get the stiffness matrix for. Defaults to ‘Combo 1’.

  • log (bool, optional) – Prints updates to the console if set to True. Defaults to False.

  • check_stability (bool, optional) – Causes Pynite to check for instabilities if set to True. Defaults to True. Set to False if you want the model to run faster.

  • sparse (bool, optional) – Returns a sparse matrix if set to True, and a dense matrix otherwise. Defaults to True.

Returns:

The global stiffness matrix for the structure.

Return type:

ndarray or coo_matrix

Kg(combo_name='Combo 1', log=False, sparse=True, first_step=True)

Returns the model’s global geometric stiffness matrix. Geometric stiffness of plates is not considered.

Parameters:
  • combo_name (str, optional) – The name of the load combination to derive the matrix for. Defaults to ‘Combo 1’.

  • log (bool, optional) – Prints updates to the console if set to True. Defaults to False.

  • sparse (bool, optional) – Returns a sparse matrix if set to True, and a dense matrix otherwise. Defaults to True.

  • first_step (book, optional) – Used to indicate if the analysis is occuring at the first load step. Used in nonlinear analysis where the load is broken into multiple steps. Default is True.

Returns:

The global geometric stiffness matrix for the structure.

Return type:

ndarray or coo_matrix

Km(combo_name='Combo 1', push_combo='Push', step_num=1, log=False, sparse=True)

Calculates the structure’s global plastic reduction matrix, which is used for nonlinear inelastic analysis.

Parameters:
  • combo_name (str, optional) – The name of the load combination to get the plastic reduction matrix for. Defaults to ‘Combo 1’.

  • push_combo (str, optional) – The name of the load combination that contains the pushover load definition. Defaults to ‘Push’.

  • step_num (int, optional) – The load step used to generate the plastic reduction matrix. Defaults to 1.

  • log (bool, optional) – Determines whether this method writes output to the console as it runs. Defaults to False.

  • sparse (bool, optional) – Indicates whether the sparse solver should be used. Defaults to True.

Returns:

The gloabl plastic reduction matrix.

Return type:

array

property LoadCases

Returns a list of all the load cases in the model (in alphabetical order).

P(combo_name='Combo 1')

Assembles and returns the global nodal force vector.

Parameters:

combo_name (str, optional) – The name of the load combination to get the force vector for. Defaults to ‘Combo 1’.

Returns:

The global nodal force vector.

Return type:

array

add_annulus_mesh(name, mesh_size, outer_radius, inner_radius, thickness, material_name, kx_mod=1.0, ky_mod=1.0, origin=[0, 0, 0], axis='Y', start_node=None, start_element=None)

Adds a mesh of quadrilaterals forming an annulus (a donut).

Parameters:
  • name (str) – A unique name for the mesh.

  • mesh_size (float) – The target mesh size.

  • outer_radius (float) – The radius to the outside of the annulus.

  • inner_radius (float) – The radius to the inside of the annulus.

  • thickness (float) – Element thickness.

  • material_name (str) – The name of the element material.

  • kx_mod (float, optional) – Stiffness modification factor for radial stiffness in the element’s local x-direction. Default is 1.0 (no modification).

  • ky_mod (float, optional) – Stiffness modification factor for meridional stiffness in the element’s local y-direction. Default is 1.0 (no modification).

  • origin (list, optional) – The origin of the mesh. The default is [0, 0, 0].

  • axis (str, optional) – The global axis about which the mesh will be generated. The default is ‘Y’.

  • start_node (str, optional) – The name of the first node in the mesh. If set to None the program will use the next available node name. Default is None.

  • start_element (str, optional) – The name of the first element in the mesh. If set to None the program will use the next available element name. Default is None.

Raises:

NameError – Occurs if the specified name already exists in the model.

Returns:

The name of the mesh added to the model.

Return type:

str

add_auxnode(name, X, Y, Z)

Adds a new auxiliary node to the model. Together with a member’s i and j nodes, an auxiliary node defines the plane in which the member’s local z-axis lies, and the side of the member the z-axis points toward. If no auxiliary node is specified for a member, PyNite uses its own default configuration.

Parameters:
  • name (str) – A unique user-defined name for the node. If None or “”, a name will be automatically assigned.

  • X (number) – The global X-coordinate of the node.

  • Y (number) – The global Y-coordinate of the node.

  • Z (number) – The global Z-coordinate of the node.

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the auxiliary node that was added to the model.

Return type:

str

add_cylinder_mesh(name, mesh_size, radius, height, thickness, material_name, kx_mod=1, ky_mod=1, origin=[0, 0, 0], axis='Y', num_elements=None, start_node=None, start_element=None, element_type='Quad')

Adds a mesh of elements forming a cylinder.

Parameters:
  • name (str) – A unique name for the mesh.

  • mesh_size (float) – The target mesh size.

  • radius (float) – The radius of the cylinder.

  • height (float) – The height of the cylinder.

  • thickness (float) – Element thickness.

  • material_name (str) – The name of the element material.

  • kx_mod (int, optional) – Stiffness modification factor for hoop stiffness in each element’s local x-direction. Defaults to 1.0 (no modification).

  • ky_mod (int, optional) – Stiffness modification factor for meridional stiffness in each element’s local y-direction. Defaults to 1.0 (no modification).

  • origin (list, optional) – The origin [X, Y, Z] of the mesh. Defaults to [0, 0, 0].

  • axis (str, optional) – The global axis about which the mesh will be generated. Defaults to ‘Y’.

  • num_elements (int, optional) – The number of elements to use to form each course of elements. This is typically only used if you are trying to match the nodes to another mesh’s nodes. If set to None the program will automatically calculate the number of elements to use based on the mesh size. Defaults to None.

  • start_node (str, optional) – The name of the first node in the mesh. If set to None the program will use the next available node name. Defaults to None.

  • start_element (str, optional) – The name of the first element in the mesh. If set to None the program will use the next available element name. Defaults to None.

  • element_type (str, optional) – The type of element to make the mesh out of. Either ‘Quad’ or ‘Rect’. Defaults to ‘Quad’.

Raises:

NameError – Occurs when the specified mesh name is already being used in the model.

Returns:

The name of the mesh added to the model

Return type:

str

add_frustrum_mesh(name, mesh_size, large_radius, small_radius, height, thickness, material_name, kx_mod=1.0, ky_mod=1.0, origin=[0, 0, 0], axis='Y', start_node=None, start_element=None)

Adds a mesh of quadrilaterals forming a frustrum (a cone intersected by a horizontal plane).

Parameters:
  • name (str) – A unique name for the mesh.

  • mesh_size (number) – The target mesh size

  • large_radius (number) – The larger of the two end radii.

  • small_radius (number) – The smaller of the two end radii.

  • height (number) – The height of the frustrum.

  • thickness (number) – The thickness of the elements.

  • material_name (str) – The name of the element material.

  • kx_mod (number, optional) – Stiffness modification factor for radial stiffness in each element’s local x-direction, defaults to 1 (no modification).

  • ky_mod (number, optional) – Stiffness modification factor for meridional stiffness in each element’s local y-direction, defaults to 1 (no modification).

  • origin (list, optional) – The origin of the mesh, defaults to [0, 0, 0].

  • axis (str, optional) – The global axis about which the mesh will be generated, defaults to ‘Y’.

  • start_node (str, optional) – The name of the first node in the mesh. If set to None the program will use the next available node name, defaults to None.

  • start_element (str, optional) – The name of the first element in the mesh. If set to None the program will use the next available element name, defaults to None

Raises:

NameError – Occurs if the specified name already exists.

Returns:

The name of the mesh added to the model.

Return type:

str

add_load_combo(name, factors, combo_tags=None)

Adds a load combination to the model.

Parameters:
  • name (str) – A unique name for the load combination (e.g. ‘1.2D+1.6L+0.5S’ or ‘Gravity Combo’).

  • factors (dict) – A dictionary containing load cases and their corresponding factors (e.g. {‘D’:1.2, ‘L’:1.6, ‘S’:0.5}).

  • combo_tags (list, optional) – A list of tags used to categorize load combinations. Default is None. This can be useful for filtering results later on, or for limiting analysis to only those combinations with certain tags. This feature is provided for convenience. It is not necessary to use tags.

add_material(name, E, G, nu, rho, fy=None)

Adds a new material to the model.

Parameters:
  • name (str) – A unique user-defined name for the material.

  • E (number) – The modulus of elasticity of the material.

  • G (number) – The shear modulus of elasticity of the material.

  • nu (number) – Poisson’s ratio of the material.

  • rho (number) – The density of the material

Raises:

NameError – Occurs when the specified name already exists in the model.

add_member(name, i_node, j_node, material_name, Iy=None, Iz=None, J=None, A=None, aux_node=None, tension_only=False, comp_only=False, section_name=None)

Adds a new physical member to the model.

Parameters:
  • name (str) – A unique user-defined name for the member. If None or "", a name will be automatically assigned

  • i_node (str) – The name of the i-node (start node).

  • j_node (str) – The name of the j-node (end node).

  • material_name – The name of the material of the member.

  • Iy (number) – The moment of inertia of the member about its local y-axis.

  • Iz (number) – The moment of inertia of the member about its local z-axis.

  • J (number) – The polar moment of inertia of the member.

  • A (number) – The cross-sectional area of the member.

  • auxNode – The name of the auxiliary node used to define the local z-axis. The default is None, in which case the program defines the axis instead of using an auxiliary node.

  • tension_only (bool, optional) – Indicates if the member is tension-only, defaults to False

  • comp_only (bool, optional) – Indicates if the member is compression-only, defaults to False

  • section_name – The name of the cross section to use for section properties. If section is None the user must provide Iy, Iz, A, and J. If section is not None any values of Iy, Iz, A, and J will be ignored and the cross-section’s values will be used instead.

Raises:

NameError – Occurs if the specified name already exists.

Returns:

The name of the member added to the model.

Return type:

str

add_member_dist_load(member_name, Direction, w1, w2, x1=None, x2=None, case='Case 1')

Adds a member distributed load to the model.

Parameters:
  • member_name (str) – The name of the member the load is being appied to.

  • Direction (str) – The direction in which the load is to be applied. Valid values are ‘Fx’, ‘Fy’, ‘Fz’, ‘FX’, ‘FY’, or ‘FZ’. Note that lower-case notation indicates use of the beam’s local coordinate system, while upper-case indicates use of the model’s globl coordinate system.

  • w1 (float) – The starting value (magnitude) of the load.

  • w2 (float) – The ending value (magnitude) of the load.

  • x1 (float, optional) – The load’s start location along the member’s local x-axis. If this argument is not specified, the start of the member will be used. Defaults to None

  • x2 (float, optional) – The load’s end location along the member’s local x-axis. If this argument is not specified, the end of the member will be used. Defaults to None.

  • case (str, optional) – _description_, defaults to ‘Case 1’

Raises:

ValueError – Occurs when an invalid load direction has been specified.

add_member_pt_load(Member, Direction, P, x, case='Case 1')

Adds a member point load to the model.

Parameters:
  • Member (str) – The name of the member the load is being applied to.

  • Direction (str) – The direction in which the load is to be applied. Valid values are ‘Fx’, ‘Fy’, ‘Fz’, ‘Mx’, ‘My’, ‘Mz’, ‘FX’, ‘FY’, ‘FZ’, ‘MX’, ‘MY’, or ‘MZ’. Note that lower-case notation indicates use of the beam’s local coordinate system, while upper-case indicates use of the model’s globl coordinate system.

  • P (float) – The numeric value (magnitude) of the load.

  • x (float) – The load’s location along the member’s local x-axis.

  • case (str, optional) – The load case to categorize the load under. Defaults to ‘Case 1’.

Raises:

ValueError – Occurs when an invalid load direction has been specified.

add_member_self_weight(global_direction, factor, case='Case 1')

Adds self weight to all members in the model. Note that this only works for members. Plate and Quad elements will be ignored by this command.

Parameters:
  • global_direction (string) – The global direction to apply the member load in: ‘FX’, ‘FY’, or ‘FZ’.

  • factor (float) – A factor to apply to the member self-weight. Can be used to account for items like connections, or to switch the direction of the self-weight load.

  • case (str, optional) – The load case to apply the self-weight to. Defaults to ‘Case 1’

add_node(name, X, Y, Z)

Adds a new node to the model.

Parameters:
  • name (str) – A unique user-defined name for the node. If set to None or “” a name will be automatically assigned.

  • X (number) – The node’s global X-coordinate.

  • Y (number) – The node’s global Y-coordinate.

  • Z (number) – The node’s global Z-coordinate.

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the node added to the model.

Return type:

str

add_node_load(Node, Direction, P, case='Case 1')

Adds a nodal load to the model.

Parameters:
  • Node (str) – The name of the node where the load is being applied.

  • Direction (str) – The global direction the load is being applied in. Forces are ‘FX’, ‘FY’, and ‘FZ’. Moments are ‘MX’, ‘MY’, and ‘MZ’.

  • P (float) – The numeric value (magnitude) of the load.

  • case (str, optional) – The name of the load case the load belongs to. Defaults to ‘Case 1’.

Raises:

ValueError – Occurs when an invalid load direction was specified.

add_plate(name, i_node, j_node, m_node, n_node, t, material_name, kx_mod=1.0, ky_mod=1.0)

Adds a new rectangular plate to the model. The plate formulation for in-plane (membrane) stiffness is based on an isoparametric formulation. For bending, it is based on a 12-term polynomial formulation. This element must be rectangular, and must not be used where a thick plate formulation is needed. For a more versatile plate element that can handle distortion and thick plate conditions, consider using the add_quad method instead.

Parameters:
  • name (str) – A unique user-defined name for the plate. If None or “”, a name will be automatically assigned.

  • i_node (str) – The name of the i-node.

  • j_node (str) – The name of the j-node.

  • m_node (str) – The name of the m-node.

  • n_node (str) – The name of the n-node.

  • t (number) – The thickness of the element.

  • material_name (str) – The name of the material for the element.

  • kx_mod (number, optional) – Stiffness modification factor for in-plane stiffness in the element’s local x-direction, defaults to 1 (no modification).

  • ky_mod (number, optional) – Stiffness modification factor for in-plane stiffness in the element’s local y-direction, defaults to 1 (no modification).

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the element added to the model.

Return type:

str

add_plate_surface_pressure(plate_name, pressure, case='Case 1')

Adds a surface pressure to the rectangular plate element.

Parameters:
  • plate_name (str) – The name for the rectangular plate to add the surface pressure to.

  • pressure (float) – The value (magnitude) for the surface pressure.

  • case (str, optional) – The load case to add the surface pressure to. Defaults to ‘Case 1’.

Raises:

Exception – Occurs when an invalid plate name has been specified.

add_quad(name, i_node, j_node, m_node, n_node, t, material_name, kx_mod=1.0, ky_mod=1.0)

Adds a new quadrilateral to the model. The quad formulation for in-plane (membrane) stiffness is based on an isoparametric formulation. For bending, it is based on an MITC4 formulation. This element handles distortion relatively well, and is appropriate for thick and thin plates. One limitation with this element is that it does a poor job of reporting corner stresses. Corner forces, however are very accurate. Center stresses are very accurate as well. For cases where corner stress results are important, consider using the add_plate method instead.

Parameters:
  • name (str) – A unique user-defined name for the quadrilateral. If None or “”, a name will be automatically assigned.

  • i_node (str) – The name of the i-node.

  • j_node (str) – The name of the j-node.

  • m_node (str) – The name of the m-node.

  • n_node (str) – The name of the n-node.

  • t (number) – The thickness of the element.

  • material_name (str) – The name of the material for the element.

  • kx_mod (number, optional) – Stiffness modification factor for in-plane stiffness in the element’s local x-direction, defaults to 1 (no modification).

  • ky_mod (number, optional) – Stiffness modification factor for in-plane stiffness in the element’s local y-direction, defaults to 1 (no modification).

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the element added to the model.

Return type:

str

add_quad_surface_pressure(quad_name, pressure, case='Case 1')

Adds a surface pressure to the quadrilateral element.

Parameters:
  • quad_name (str) – The name for the quad to add the surface pressure to.

  • pressure (float) – The value (magnitude) for the surface pressure.

  • case (str, optional) – The load case to add the surface pressure to. Defaults to ‘Case 1’.

Raises:

Exception – Occurs when an invalid quad name has been specified.

add_rectangle_mesh(name, mesh_size, width, height, thickness, material_name, kx_mod=1.0, ky_mod=1.0, origin=[0, 0, 0], plane='XY', x_control=None, y_control=None, start_node=None, start_element=None, element_type='Quad')

Adds a rectangular mesh of elements to the model.

Parameters:
  • name (str) – A unique name for the mesh.

  • mesh_size (number) – The desired mesh size.

  • width (number) – The overall width of the rectangular mesh measured along its local x-axis.

  • height (number) – The overall height of the rectangular mesh measured along its local y-axis.

  • thickness (number) – The thickness of each element in the mesh.

  • material_name (str) – The name of the material for elements in the mesh.

  • kx_mod (float, optional) – Stiffness modification factor for in-plane stiffness in the element’s local x-direction. Defaults to 1.0 (no modification).

  • ky_mod (float, optional) – Stiffness modification factor for in-plane stiffness in the element’s local y-direction. Defaults to 1.0 (no modification).

  • origin (list, optional) – The origin of the regtangular mesh’s local coordinate system. Defaults to [0, 0, 0]

  • plane (str, optional) – The plane the mesh will be parallel to. Options are ‘XY’, ‘YZ’, and ‘XZ’. Defaults to ‘XY’.

  • x_control (list, optional) – A list of control points along the mesh’s local x-axis to work into the mesh. Defaults to None.

  • y_control (list, optional) – A list of control points along the mesh’s local y-axis to work into the mesh. Defaults to None.

  • start_node (str, optional) – The name of the first node in the mesh. If set to None the program will use the next available node name. Default is None.

  • start_element (str, optional) – The name of the first element in the mesh. If set to None the program will use the next available element name. Default is None.

  • element_type (str, optional) – They type of element to make the mesh out of. Either ‘Quad’ or ‘Rect’. Defaults to ‘Quad’.

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the mesh added to the model.

Return type:

str

add_section(name, section)

Adds a cross-section to the model.

Parameters:
  • name (string) – A unique name for the cross-section.

  • section (Section) – A ‘PyNite’ Section object.

add_spring(name, i_node, j_node, ks, tension_only=False, comp_only=False)

Adds a new spring to the model.

Parameters:
  • name (str) – A unique user-defined name for the member. If None or “”, a name will be automatically assigned

  • i_node (str) – The name of the i-node (start node).

  • j_node (str) – The name of the j-node (end node).

  • ks (number) – The spring constant (force/displacement).

  • tension_only (bool, optional) – Indicates if the member is tension-only, defaults to False

  • comp_only (bool, optional) – Indicates if the member is compression-only, defaults to False

Raises:

NameError – Occurs when the specified name already exists in the model.

Returns:

The name of the spring that was added to the model.

Return type:

str

analyze(log=False, check_stability=True, check_statics=False, max_iter=30, sparse=True, combo_tags=None)

Performs first-order static analysis. Iterations are performed if tension-only members or compression-only members are present.

Parameters:
  • log (bool, optional) – Prints the analysis log to the console if set to True. Default is False.

  • check_stability (bool, optional) – When set to True, checks for nodal instabilities. This slows down analysis a little. Default is True.

  • check_statics (bool, optional) – When set to True, causes a statics check to be performed

  • max_iter (int, optional) – The maximum number of iterations to try to get convergence for tension/compression-only analysis. Defaults to 30.

  • sparse (bool, optional) – Indicates whether the sparse matrix solver should be used. A matrix can be considered sparse or dense depening on how many zero terms there are. Structural stiffness matrices often contain many zero terms. The sparse solver can offer faster solutions for such matrices. Using the sparse solver on dense matrices may lead to slower solution times.

Raises:
  • Exception – _description_

  • Exception – _description_

analyze_PDelta(log=False, check_stability=True, max_iter=30, sparse=True, combo_tags=None)

Performs second order (P-Delta) analysis. This type of analysis is appropriate for most models using beams, columns and braces. Second order analysis is usually required by material specific codes. The analysis is iterative and takes longer to solve. Models with slender members and/or members with combined bending and axial loads will generally have more significant P-Delta effects. P-Delta effects in plates/quads are not considered.

Parameters:
  • log (bool, optional) – Prints updates to the console if set to True. Default is False.

  • check_stability (bool, optional) – When set to True, checks the stiffness matrix for any unstable degrees of freedom and reports them back to the console. This does add to the solution time. Defaults to True.

  • max_iter (int, optional) – The maximum number of iterations permitted. If this value is exceeded the program will report divergence. Defaults to 30.

  • sparse (bool, optional) – Indicates whether the sparse matrix solver should be used. A matrix can be considered sparse or dense depening on how many zero terms there are. Structural stiffness matrices often contain many zero terms. The sparse solver can offer faster solutions for such matrices. Using the sparse solver on dense matrices may lead to slower solution times. Be sure scipy is installed to use the sparse solver. Default is True.

Raises:
  • ValueError – Occurs when there is a singularity in the stiffness matrix, which indicates an unstable structure.

  • Exception – Occurs when a model fails to converge.

analyze_linear(log=False, check_stability=True, check_statics=False, sparse=True, combo_tags=None)

Performs first-order static analysis. This analysis procedure is much faster since it only assembles the global stiffness matrix once, rather than once for each load combination. It is not appropriate when non-linear behavior such as tension/compression only analysis or P-Delta analysis are required.

Parameters:
  • log (bool, optional) – Prints the analysis log to the console if set to True. Default is False.

  • check_stability (bool, optional) – When set to True, checks the stiffness matrix for any unstable degrees of freedom and reports them back to the console. This does add to the solution time. Defaults to True.

  • check_statics (bool, optional) – When set to True, causes a statics check to be performed. Defaults to False.

  • sparse (bool, optional) – Indicates whether the sparse matrix solver should be used. A matrix can be considered sparse or dense depening on how many zero terms there are. Structural stiffness matrices often contain many zero terms. The sparse solver can offer faster solutions for such matrices. Using the sparse solver on dense matrices may lead to slower solution times. Be sure scipy is installed to use the sparse solver. Default is True.

Raises:

Exception – Occurs when a singular stiffness matrix is found. This indicates an unstable structure has been modeled.

def_node_disp(node_name, direction, magnitude)

Defines a nodal displacement at a node.

Parameters:
  • node_name (str) – The name of the node where the nodal displacement is being applied.

  • direction (str) – The global direction the nodal displacement is being applied in. Displacements are ‘DX’, ‘DY’, and ‘DZ’. Rotations are ‘RX’, ‘RY’, and ‘RZ’.

  • magnitude (float) – The magnitude of the displacement.

Raises:

ValueError – _description_

def_releases(Member, Dxi=False, Dyi=False, Dzi=False, Rxi=False, Ryi=False, Rzi=False, Dxj=False, Dyj=False, Dzj=False, Rxj=False, Ryj=False, Rzj=False)

Defines member end realeses for a member. All member end releases will default to unreleased unless specified otherwise.

Parameters:
  • Member (str) – The name of the member to have its releases modified.

  • Dxi (bool, optional) – Indicates whether the member is released axially at its start. Defaults to False.

  • Dyi (bool, optional) – Indicates whether the member is released for shear in the local y-axis at its start. Defaults to False.

  • Dzi (bool, optional) – Indicates whether the member is released for shear in the local z-axis at its start. Defaults to False.

  • Rxi (bool, optional) – Indicates whether the member is released for torsion at its start. Defaults to False.

  • Ryi (bool, optional) – Indicates whether the member is released for moment about the local y-axis at its start. Defaults to False.

  • Rzi (bool, optional) – Indicates whether the member is released for moment about the local z-axis at its start. Defaults to False.

  • Dxj (bool, optional) – Indicates whether the member is released axially at its end. Defaults to False.

  • Dyj (bool, optional) – Indicates whether the member is released for shear in the local y-axis at its end. Defaults to False.

  • Dzj (bool, optional) – Indicates whether the member is released for shear in the local z-axis. Defaults to False.

  • Rxj (bool, optional) – Indicates whether the member is released for torsion at its end. Defaults to False.

  • Ryj (bool, optional) – Indicates whether the member is released for moment about the local y-axis at its end. Defaults to False.

  • Rzj (bool, optional) – Indicates whether the member is released for moment about the local z-axis at its end. Defaults to False.

def_support(node_name, support_DX=False, support_DY=False, support_DZ=False, support_RX=False, support_RY=False, support_RZ=False)
Defines the support conditions at a node. Nodes will default to fully unsupported

unless specified otherwise.

Parameters:
  • node_name (str) – The name of the node where the support is being defined.

  • support_DX (bool, optional) – Indicates whether the node is supported against translation in the global X-direction. Defaults to False.

  • support_DY (bool, optional) – Indicates whether the node is supported against translation in the global Y-direction. Defaults to False.

  • support_DZ (bool, optional) – Indicates whether the node is supported against translation in the global Z-direction. Defaults to False.

  • support_RX (bool, optional) – Indicates whether the node is supported against rotation about the global X-axis. Defaults to False.

  • support_RY (bool, optional) – Indicates whether the node is supported against rotation about the global Y-axis. Defaults to False.

  • support_RZ (bool, optional) – Indicates whether the node is supported against rotation about the global Z-axis. Defaults to False.

def_support_spring(node_name, dof, stiffness, direction=None)

Defines a spring support at a node.

Parameters:
  • node_name (str) – The name of the node to apply the spring support to.

  • dof (str ('DX', 'DY', 'DZ', 'RX', 'RY', or 'RZ')) – The degree of freedom to apply the spring support to.

  • stiffness (float) – The translational or rotational stiffness of the spring support.

  • direction (str or None ('+', '-', None), optional) – The direction in which the spring can act. ‘+’ allows the spring to resist positive displacements. ‘-’ allows the spring to resist negative displacements. None allows the spring to act in both directions. Default is None.

Raises:
  • ValueError – Occurs when an invalid support spring direction has been specified.

  • ValueError – Occurs when an invalid support spring degree of freedom has been specified.

delete_auxnode(auxnode_name)

Removes an auxiliary node from the model.

Parameters:

auxnode_name (str) – The name of the auxiliary node to be removed.

delete_loads()

Deletes all loads from the model along with any results based on the loads.

delete_member(member_name)
Removes a member from the model. All member loads associated with the member will also

be removed.

Parameters:

member_name (str) – The name of the member to be removed.

delete_node(node_name)

Removes a node from the model. All nodal loads associated with the node and elements attached to the node will also be removed.

Parameters:

node_name (str) – The name of the node to be removed.

delete_spring(spring_name)

Removes a spring from the model.

Parameters:

spring_name (str) – The name of the spring to be removed.

merge_duplicate_nodes(tolerance=0.001)

Removes duplicate nodes from the model and returns a list of the removed node names.

Parameters:

tolerance (float, optional) – The maximum distance between two nodes in order to consider them duplicates. Defaults to 0.001.

orphaned_nodes()

Returns a list of the names of nodes that are not attached to any elements.

rename()

Renames all the nodes and elements in the model.

unique_name(dictionary, prefix)

Returns the next available unique name for a dictionary of objects.

Parameters:
  • dictionary (dict) – The dictionary to get a unique name for.

  • prefix (str) – The prefix to use for the unique name.

Returns:

A unique name for the dictionary.

Return type:

str