Node¶
Node¶
- class
feastruct.fea.node.Node(coords)[source]¶Class for a node to be used in finite element analyses.
A node object is defined by its position in 3D cartesian space and has six associated degrees of freedom.
Variables:
- coords (list[float, float, float]) – Cartesian coordinates of the node
- dofs (list[
DoF]) – List of degrees of freedom for the node (x, y, z, rx, ry, rz)- nfs (list[bool]) – Node freedom signature
__init__(coords)[source]¶Inits the Node class.
Parameters: coords (list[float]) – Cartesian coordinates of the node ([x], [x, y] or [x, y, z])
copy_node(vec)[source]¶Copies and returns a new node shifted by the vector vec ([dx], [dx, dy] or [dx, dy, dz]).
Parameters: vec (list[float]) – Vector to move the current node by Returns: New node object Return type: Node
get_displacements(analysis_case)[source]¶Returns the displacement vector for the current node and analysis case. If the degree of freedom is not used in the current analysis case, a None value is assigned.
Degree of freedoms are ordered as follows: (x, y, z, rx, ry, rz)
Parameters: analysis_case ( AnalysisCase) – Analysis case relating to the displacementReturns: Displacement vector of length (1 x 6) Return type: float
DoF¶
- class
feastruct.fea.node.DoF(node, node_dof_num)[source]¶Class for a degree of freedom to be used in finite element analyses.
A degree of freedom relates to a specific node and has a specific degree of freedom number used in the finite element analysis. Displacement results are stored within the degree of freedom.
Variables:
- node (
Node) – Parent node- node_dof_num (int) – Node degree of freedom number
- global_dof_num (int) – Global degree of freedom number
- displacements (list[
Displacement]) – A list of Displacement objects for the dof- buckling_results (list[
BucklingMode]) – A list of BucklingModes objects for the dof- frequency_results (list[
FrequencyMode]) – A list of FrequencyModes objects for the dof
get_buckling_mode(analysis_case, buckling_mode)[source]¶Returns the value of the eigenvalue and eigenvector for a given buckling_mode related to an
AnalysisCase.
Parameters:
- analysis_case (
AnalysisCase) – Analysis case relating to the buckling results- buckling_mode (int) – Buckling mode number
Returns: Eigenvalue and eigenvector corresponding to an analysis_case and buckling_mode
Return type: tuple(float, float)
Raises: Exception – If buckling results corresponding to an analysis_case cannot be found, or if the buckling mode does not exist
get_displacement(analysis_case)[source]¶Returns the displacement value relating to an
AnalysisCase.
Parameters: analysis_case ( AnalysisCase) – Analysis case relating to the displacementReturns: Displacement value Return type: float Raises: Exception – If a displacement corresponding to analysis_case cannot be found
get_frequency_mode(analysis_case, frequency_mode)[source]¶Returns the value of the eigenvalue and eigenvector for a given frequency_mode related to an
AnalysisCase.
Parameters:
- analysis_case (
AnalysisCase) – Analysis case relating to the frequency results- frequency_mode (int) – Frequency mode number
Returns: Eigenvalue and eigenvector corresponding to an analysis_case and frequency_mode
Return type: tuple(float, float)
Raises: Exception – If frequency results corresponding to an analysis_case cannot be found, or if the frequency mode does not exist
save_buckling_modes(buckling_modes, w, v, analysis_case)[source]¶Saves buckling results to the DoF.
Parameters:
- buckling_modes (list[int]) – Buckling mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the buckling analysis
save_displacement(disp, analysis_case)[source]¶Saves a displacement result to the DoF.
Parameters:
- disp (float) – Value of the displacement
- analysis_case (
AnalysisCase) – Analysis case relating to the displacement
save_frequency_modes(frequency_modes, w, v, analysis_case)[source]¶Saves frequency results to the DoF.
Parameters:
- frequency_modes (list[int]) – Frequency mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the frequency analysis
Displacement¶
- class
feastruct.fea.node.Displacement(disp, analysis_case)[source]¶Class for storing a displacement at a degree of freedom for a specific analysis case.
Variables:
- disp (float) – Displacement at a degree of freedom
- analysis_case (
AnalysisCase) – Analysis case relating to the displacement
__init__(disp, analysis_case)[source]¶Inits the Displacement class.
Parameters:
- disp (float) – Displacement at a degree of freedom
- analysis_case (
AnalysisCase) – Analysis case relating to the displacement
Buckling Modes¶
- class
feastruct.fea.node.BucklingModes(buckling_modes, w, v, analysis_case)[source]¶Class for storing buckling modes at a degree of freedom for a specific analysis case.
Variables:
- buckling_modes (list[int]) – Buckling mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the buckling analysis
__init__(buckling_modes, w, v, analysis_case)[source]¶Inits the Displacement class.
Parameters:
- buckling_modes (list[int]) – Buckling mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the buckling analysis
Frequency Modes¶
- class
feastruct.fea.node.FrequencyModes(frequency_modes, w, v, analysis_case)[source]¶Class for storing frequency modes at a degree of freedom for a specific analysis case.
Variables:
- frequency_modes (list[int]) – Frequency mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the frequency analysis
__init__(frequency_modes, w, v, analysis_case)[source]¶Inits the Displacement class.
Parameters:
- frequency_modes (list[int]) – Frequency mode numbers
- w (list[float]) – Eigenvalues corresponding to the given modes
- v (list[float]) – Value of the eigevectors at the DoF corresponding to the given modes
- analysis_case (
AnalysisCase) – Analysis case relating to the frequency analysis