Boundary Conditions¶
Boundary Condition¶
- class
feastruct.fea.bcs.BoundaryCondition(node, val, dof)[source]¶Parent class for supports and loads.
Provides an init method for the creation of boundary conditions.
Variables:
- node (
Node) – The node object at which the boundary condition acts- val (float) – The value of the boundary condition
- dof (int) – The degree of freedom about which the boundary condition acts
Nodal Support¶
- class
feastruct.fea.bcs.NodalSupport(node, val, dof)[source]¶Bases:
feastruct.fea.bcs.BoundaryConditionClass for a dirichlet boundary condition acting at a node.
Provides methods for the FEA solver and post-processing.
Variables:
- node (
Node) – The node object at which the boundary condition acts- val (float) – The value of the boundary condition
- dof (int) – The degree of freedom about which the boundary condition acts
- reactions (list[
ScalarResult]) – A list of reaction objects
__init__(node, val, dof)[source]¶inits the NodalSupport class.
Parameters:
- node (
Node) – The node object at which the boundary condition acts- val (float) – The value of the boundary condition
- dof (int) – The degree of freedom about which the boundary condition acts
apply_support(K, f_ext)[source]¶Applies the nodal support.
The stiffness matrix and external force vector are modified to apply the dirichlet boundary condition to enforce the displacement at the chosen degree of freedom to be equal to the specified value.
Parameters:
- K (
numpy.ndarray) – Global stiffness matrix of size (N x N)- f_ext (
numpy.ndarray) – Global external force vector of size N
get_gdof()¶Returns the global degree of freedom number for the boundary condition.
Returns: Global degree of freedom number Return type: int
get_reaction(analysis_case)[source]¶Gets the reaction force result corresponding to analysis_case.
Parameters: analysis_case ( AnalysisCase) – Analysis caseReturns: Reaction force at the node Return type: float
plot_imposed_disp(ax, max_disp, small, get_support_angle, analysis_case, deformed, def_scale)[source]¶Plots a graphical representation of an imposed translation.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- max_disp (float) – Maximum imposed displacement in the analysis case
- small (float) – A dimension used to scale the support
- get_support_angle (
feastruct.post.post.PostProcessor.get_support_angle()) – A function that returns the support angle and the number of connected elements- analysis_case (
AnalysisCase) – Analysis case- deformed (bool) – Represents whether or not the node locations are deformed based on the results of case id
- def_scale (float) – Value used to scale deformations
plot_imposed_rot(ax, small, get_support_angle, analysis_case, deformed, def_scale)[source]¶Plots a graphical representation of an imposed rotation.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- small (float) – A dimension used to scale the support
- get_support_angle (
feastruct.post.post.PostProcessor.get_support_angle()) – A function that returns the support angle and the number of connected elements- analysis_case (
AnalysisCase) – Analysis case- deformed (bool) – Represents whether or not the node locations are deformed based on the results of case id
- def_scale (float) – Value used to scale deformations
plot_reaction(ax, max_reaction, small, get_support_angle, analysis_case)[source]¶Plots a graphical representation of a reaction force and displays the value of the reaction force. A straight arrow is plotted for a translational reaction and a curved arrow is plotted for a rotational reaction.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- max_reaction (float) – Maximum reaction force in the analysis case
- small (float) – A dimension used to scale the support
- get_support_angle (
feastruct.post.post.PostProcessor.get_support_angle()) – A function that returns the support angle and the number of connected elements- analysis_case (
AnalysisCase) – Analysis case
plot_support(ax, small, get_support_angle, analysis_case, deformed, def_scale)[source]¶Plots a graphical representation of the nodal support.
Based on the type of support at the node, a graphical representation of the support type is generated and plotted. Possible support types include rollers, hinges, rotation restraints, fixed rollers and fully fixed supports. The angle of the connecting elements is considered in order to produce the most visually appealing representation. The support location is displaced if a deformed plot is desired. Note that some of the methods used to plot the supports are taken from Frans van der Meer’s code plotGeom.m.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- small (float) – A dimension used to scale the support
- get_support_angle (
feastruct.post.post.PostProcessor.get_support_angle()) – A function that returns the support angle and the number of connected elements- analysis_case (
AnalysisCase) – Analysis case- deformed (bool) – Represents whether or not the node locations are deformed based on the results of analysis_case
- def_scale (float) – Value used to scale deformations
plot_xysupport(ax, angle, roller, hinge, small, analysis_case, deformed, def_scale)[source]¶Plots a hinged or roller support.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- angle (float) – Angle at which to plot the support
- roller (bool) – Whether or not the support is a roller
- hinge (bool) – Whether or not there is a hinge at the support
- small (float) – A dimension used to scale the support
- analysis_case (
AnalysisCase) – Analysis case- deformed (bool) – Represents whether or not the node locations are deformed based on the results of case id
- def_scale (float) – Value used to scale deformations
save_reaction(f, analysis_case)[source]¶Saves the reaction force corresponding to analysis_case.
Parameters:
- f (float) – Reaction force at the node
- analysis_case (
AnalysisCase) – Analysis case
Nodal Load¶
- class
feastruct.fea.bcs.NodalLoad(node, val, dof)[source]¶Bases:
feastruct.fea.bcs.BoundaryConditionClass for a neumann boundary condition acting at a node.
Provides methods for the FEA solver and post-processing.
Variables:
- node (
Node) – The node object at which the nodal load acts- val (float) – The value of the nodal load
- dof (int) – The degree of freedom about which the nodal load acts
__init__(node, val, dof)[source]¶inits the NodalLoad class.
Parameters:
- node (
Node) – The node object at which the nodal load acts- val (float) – The value of the nodal load
- dof (int) – The degree of freedom about which the nodal load acts
apply_load(f_ext)[source]¶Applies the nodal load.
The external force vector is modified to apply the neumann boundary condition.
Parameters: f_ext ( numpy.ndarray) – Global external force vector of size N
get_gdof()¶Returns the global degree of freedom number for the boundary condition.
Returns: Global degree of freedom number Return type: int
plot_load(ax, max_force, small, get_support_angle, analysis_case, deformed, def_scale)[source]¶Plots a graphical representation of a nodal force. A straight arrow is plotted for a translational load and a curved arrow is plotted for a moment.
Parameters:
- ax (
matplotlib.axes.Axes) – Axes object on which to plot- max_force (float) – Maximum translational nodal load
- small (float) – A dimension used to scale the support
- get_support_angle (
feastruct.post.post.PostProcessor.get_support_angle()) – A function that returns the support angle and the number of connected elements- analysis_case (
AnalysisCase) – Analysis case- deformed (bool) – Represents whether or not the node locations are deformed based on the results of case id
- def_scale (float) – Value used to scale deformations