Skip to content

Commit e12516d

Browse files
Shear stress: typo + WIkipedia URL (TheAlgorithms#7896)
1 parent 11e6c6f commit e12516d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

physics/sheer_stress.py renamed to physics/shear_stress.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
from __future__ import annotations
22

3+
"""
4+
Shear stress is a component of stress that is coplanar to the material cross-section.
5+
It arises due to a shear force, the component of the force vector parallel to the
6+
material cross-section.
37
4-
def sheer_stress(
8+
https://en.wikipedia.org/wiki/Shear_stress
9+
"""
10+
11+
12+
def shear_stress(
513
stress: float,
614
tangential_force: float,
715
area: float,
816
) -> tuple[str, float]:
917
"""
1018
This function can calculate any one of the three -
11-
1. Sheer Stress
19+
1. Shear Stress
1220
2. Tangential Force
1321
3. Cross-sectional Area
1422
This is calculated from the other two provided values
1523
Examples -
16-
>>> sheer_stress(stress=25, tangential_force=100, area=0)
24+
>>> shear_stress(stress=25, tangential_force=100, area=0)
1725
('area', 4.0)
18-
>>> sheer_stress(stress=0, tangential_force=1600, area=200)
26+
>>> shear_stress(stress=0, tangential_force=1600, area=200)
1927
('stress', 8.0)
20-
>>> sheer_stress(stress=1000, tangential_force=0, area=1200)
28+
>>> shear_stress(stress=1000, tangential_force=0, area=1200)
2129
('tangential_force', 1200000)
2230
"""
2331
if (stress, tangential_force, area).count(0) != 1:

0 commit comments

Comments
 (0)