Cable (Docstrings)#
Cable#
This module can be used to solve problems related to 2D Cables.
- class sympy.physics.continuum_mechanics.cable.Cable(support_1, support_2)[源代码]#
Cables are structures in engineering that support the applied transverse loads through the tensile resistance developed in its members.
Cables are widely used in suspension bridges, tension leg offshore platforms, transmission lines, and find use in several other engineering applications.
实例
A cable is supported at (0, 10) and (10, 10). Two point loads acting vertically downwards act on the cable, one with magnitude 3 kN and acting 2 meters from the left support and 3 meters below it, while the other with magnitude 2 kN is 6 meters from the left support and 6 meters below it.
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.apply_load(-1, ('P', 2, 7, 3, 270)) >>> c.apply_load(-1, ('Q', 6, 4, 2, 270)) >>> c.loads {'distributed': {}, 'point_load': {'P': [3, 270], 'Q': [2, 270]}} >>> c.loads_position {'P': [2, 7], 'Q': [6, 4]}
- apply_length(length)[源代码]#
This method specifies the length of the cable
- 参数:
length : Sympifyable
The length of the cable
实例
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.apply_length(20) >>> c.length 20
- apply_load(order, load)[源代码]#
This method adds load to the cable.
- 参数:
秩序 :整数
施加荷载的顺序。
For point loads, order = -1
For distributed load, order = 0
load : tuple
For point loads, load is of the form (label, x, y, magnitude, direction), where:
- labelString or symbol
The label of the load
- X值得同情的
The x coordinate of the position of the load
- Y值得同情的
The y coordinate of the position of the load
- magnitude值得同情的
The magnitude of the load. It must always be positive
- 方向值得同情的
The angle, in degrees, that the load vector makes with the horizontal in the counter-clockwise direction. It takes the values 0 to 360, inclusive.
For uniformly distributed load, load is of the form (label, magnitude)
- labelString or symbol
The label of the load
- magnitude值得同情的
The magnitude of the load. It must always be positive
实例
For a point load of magnitude 12 units inclined at 30 degrees with the horizontal:
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.apply_load(-1, ('Z', 5, 5, 12, 30)) >>> c.loads {'distributed': {}, 'point_load': {'Z': [12, 30]}} >>> c.loads_position {'Z': [5, 5]}
For a uniformly distributed load of magnitude 9 units:
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.apply_load(0, ('X', 9)) >>> c.loads {'distributed': {'X': 9}, 'point_load': {}}
- change_support(label, new_support)[源代码]#
This method changes the mentioned support with a new support.
- 参数:
label: String or symbol
The label of the support to be changed
new_support: Tuple of the form (new_label, x, y)
- new_label: String or symbol
The label of the new support
- x: Sympifyable
The x-coordinate of the position of the new support.
- y: Sympifyable
The y-coordinate of the position of the new support.
实例
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.supports {'A': [0, 10], 'B': [10, 10]} >>> c.change_support('B', ('C', 5, 6)) >>> c.supports {'A': [0, 10], 'C': [5, 6]}
- property left_support#
Returns the position of the left support.
- property length#
Returns the length of the cable.
- property loads#
Returns the magnitude and direction of the loads acting on the cable.
- property loads_position#
Returns the position of the point loads acting on the cable.
- property reaction_loads#
Returns the reaction forces at the supports, which are initialized to 0.
- remove_loads(*args)[源代码]#
This methods removes the specified loads.
- 参数:
This input takes multiple label(s) as input
label(s): String or symbol
The label(s) of the loads to be removed.
实例
>>> from sympy.physics.continuum_mechanics.cable import Cable >>> c = Cable(('A', 0, 10), ('B', 10, 10)) >>> c.apply_load(-1, ('Z', 5, 5, 12, 30)) >>> c.loads {'distributed': {}, 'point_load': {'Z': [12, 30]}} >>> c.remove_loads('Z') >>> c.loads {'distributed': {}, 'point_load': {}}
- property right_support#
Returns the position of the right support.
- property supports#
Returns the supports of the cable along with their positions.