bluemira.structural.model
Finite element model
Classes
Enumeration of Boundary Condition Methods. |
|
3-D beam finite element model. The main interface object with other modules |
Functions
|
Checks the condition number of a matrix and warns if it is unsuitable for |
Module Contents
- class bluemira.structural.model.BoundaryConditionMethod(*args, **kwds)
Bases:
enum.EnumEnumeration of Boundary Condition Methods.
- PRZEMIENIECKI
- DELETION
- classmethod _missing_(value: str | BoundaryConditionMethod) BoundaryConditionMethod
- Parameters:
value (str | BoundaryConditionMethod)
- Return type:
- bluemira.structural.model.check_matrix_condition(matrix: numpy.ndarray, digits: int)
Checks the condition number of a matrix and warns if it is unsuitable for working with.
- Parameters:
matrix (numpy.ndarray) – The matrix to check the condition number of
digits (int) – The desired level of digit-precision (higher is less demanding)
- Raises:
StructuralError – If the stiffness matrix is singular or ill-conditioned
- class bluemira.structural.model.FiniteElementModel
3-D beam finite element model. The main interface object with other modules As such, all important functionality is brought to the surface here, hence the large number of class methods
- geometry
The geometry in the FiniteElementModel
- load_case
The load case applied in the FiniteElementModel
- n_fixed_dofs
The number of fixed degrees of freedom
- fixed_dofs
The fixed degrees of freedom
- fixed_dof_ids
The id_numbers of the fixed degrees of freedom
- N_INTERP = 7
- cycle_sym_ids = []
- cycle_sym = None
- set_geometry(geometry: bluemira.structural.geometry.Geometry)
Set a Geometry in the FiniteElementModel
- Parameters:
geometry (bluemira.structural.geometry.Geometry) – The Geometry to add to the FiniteElementModel
- add_node(x: float, y: float, z: float) int
Adds a Node to the FiniteElementModel
- Parameters:
x (float) – The node global x coordinate
y (float) – The node global y coordinate
z (float) – The node global z coordinate
- Return type:
The ID number of the node that was added
- add_element(node_id1: int, node_id2: int, cross_section: bluemira.structural.crosssection.CrossSection, material: matproplib.material.Material | None = None, op_cond: matproplib.conditions.OperationalConditions | None = None) int
Adds an Element to the FiniteElementModel
- Parameters:
node_id1 (int) – The ID number of the first node
node_id2 (int) – The ID number of the second node
cross_section (bluemira.structural.crosssection.CrossSection) – The CrossSection property object of the element
material (matproplib.material.Material | None) – The Material property object of the element
op_cond (matproplib.conditions.OperationalConditions | None)
- Return type:
The ID number of the element that was added
- add_coordinates(coords: bluemira.geometry.coordinates.Coordinates, cross_section: bluemira.structural.crosssection.CrossSection, material: matproplib.material.Material | None = None, op_cond: matproplib.conditions.OperationalConditions | None = None)
Adds a Coordinates object to the FiniteElementModel
- Parameters:
coords (bluemira.geometry.coordinates.Coordinates) – The coordinates to transform into connected Nodes and Elements
cross_section (bluemira.structural.crosssection.CrossSection) – The cross section of all the Elements in the Coordinates
material (matproplib.material.Material | None) – The material of all the Elements in the Coordinates
op_cond (matproplib.conditions.OperationalConditions | None)
- add_support(node_id: int, *, dx: bool = False, dy: bool = False, dz: bool = False, rx: bool = False, ry: bool = False, rz: bool = False)
Applies a support condition at a Node in the FiniteElementModel
- Parameters:
node_id (int) – The id_number of the Node where to apply the condition
dx (bool) – Whether or not the linear DOFs at the Node are constrained
dy (bool) – Whether or not the linear DOFs at the Node are constrained
dz (bool) – Whether or not the linear DOFs at the Node are constrained
rx (bool) – Whether or not the rotational DOFs at the Node
ry (bool) – Whether or not the rotational DOFs at the Node
rz (bool) – Whether or not the rotational DOFs at the Node
- find_supports()
Find the support conditions in the FiniteElementModel.
- apply_cyclic_symmetry(left_node_ids: list[int], right_node_ids: list[int], p1: numpy.typing.NDArray[numpy.float64] | None = None, p2: numpy.typing.NDArray[numpy.float64] | None = None)
Applies a cyclic symmetry condition to the FiniteElementModel
- Parameters:
left_node_ids (list[int]) – The id numbers of the nodes on the left boundary
right_node_ids (list[int]) – The id numbers of the nodes on the right boundary
p1 (numpy.typing.NDArray[numpy.float64] | None) – The first point of the symmetry rotation axis
p1 – The second point of the symmetry rotation axis
p2 (numpy.typing.NDArray[numpy.float64] | None)
- apply_load_case(load_case: bluemira.structural.loads.LoadCase)
Apply a load case to the FiniteElementModel.
- Parameters:
load_case (bluemira.structural.loads.LoadCase) – The load case to apply to the model.
- add_node_load(node_id: int, load: float, load_type: str)
Adds a node load to the FiniteElementModel
- Parameters:
node_id (int) – The id_number of the Node to apply the load at
load (float) – The value of the load
load_type (str) – The type and axis of the load (from [‘Fx’, ‘Fy’, ‘Fz’, ‘Mx’, ‘My’, ‘Mz’])
- add_element_load(element_id: int, load: float, x: float, load_type: str)
Adds an element point load to the FiniteElementModel
- Parameters:
element_id (int) – The id_number of the Element to apply the load at
load (float) – The value of the load
x (float) – The parameterised and normalised distance along the element x-axis
load_type (str) – The type and axis of the load (from [‘Fx’, ‘Fy’, ‘Fz’, ‘Mx’, ‘My’, ‘Mz’])
- add_distributed_load(element_id: int, w: float, load_type: str)
Adds a distributed load to the FiniteElementModel
- Parameters:
element_id (int) – The id_number of the Element to apply the load at
w (float) – The value of the distributed load
load_type (str) – The type and axis of the load (from [‘Fx’, ‘Fy’, ‘Fz’])
- add_gravity_loads()
Applies self-weight distributed loads to all members
- clear_loads()
Clears any applied loads to the model, and removes any displacements
- clear_load_case()
Clears the LoadCase applied to the model
- _apply_load_case(load_case: bluemira.structural.loads.LoadCase)
Applies a LoadCase to the FiniteElementModel. Maps individual loads to their respective Nodes and Elements.
- Parameters:
load_case (LoadCase object) – The list of loads to apply to the model
- _get_nodal_forces() numpy.ndarray
Calculates the total nodal forces (including forces applied at nodes and equivalent concentrated forces from element loads).
- Return type:
The global nodal force vector (6*n_nodes)
- _get_reaction_forces() numpy.ndarray
Calculates the reaction forces, applying them to each of the nodes and returning the full vector
- Return type:
The full reaction vector in global coordinates over all the nodes (6*n_nodes)
- _math_checks(k_matrix: numpy.ndarray)
Performs a series of checks on the model boundary conditions and the global stiffness matrix K, prior to the solution of the system of equations.
- Parameters:
k_matrix (numpy.ndarray) – The global stiffness matrix to be checked ((6*n_nodes, 6*n_nodes))
- Raises:
StructuralError – DOFs less than 6 or never constrianed
- _displacement_check(deflections: numpy.ndarray)
Checks to see if the displacements are not too big relative to the size of the model.
- Parameters:
deflections (numpy.ndarray) – The vector of absolute displacements (6*n_nodes)
- _apply_boundary_conditions(k: numpy.ndarray, p: numpy.ndarray, method: str = 'Przemieniecki') tuple[numpy.ndarray, numpy.ndarray]
Applies the boundary conditions to the matrices to make the problem solvable. This is creation of the “reduced” stiffness matrix and force vector, Kr and Pr.
- Parameters:
k (numpy.ndarray) – The global stiffness matrix of the problem
p (numpy.ndarray) – The global nodal force vector of the problem
method (str)
- Returns:
kr – The reduced global stiffness matrix of the problem
pr – The reduced global nodal force vector of the problem
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- _apply_boundary_conditions_sparse(k, p)
- _apply_displacements(u_r)
Applies the displacements to the individual nodes in the Geometry
- plot(ax=None, **kwargs)
Plots the model geometry, boundary conditions, and loads
- solve(load_case: bluemira.structural.loads.LoadCase | None = None, *, sparse: bool = False) bluemira.structural.result.Result
Solves the system of linear equations for deflection and applies the deflections to the nodes and elements of the geometry
- Parameters:
load_case (bluemira.structural.loads.LoadCase | None) – Will default to the loads applied to the elements and nodes in the geometry
sparse (bool) – Whether or not to use sparse matrices to solve
- Return type:
The result of the FE analysis with the applied LoadCase