Skip to content

Commit

Permalink
Shear stress: typo + WIkipedia URL (TheAlgorithms#7896)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekchak52 authored Oct 30, 2022
1 parent 11e6c6f commit e12516d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions physics/sheer_stress.py → physics/shear_stress.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
from __future__ import annotations

"""
Shear stress is a component of stress that is coplanar to the material cross-section.
It arises due to a shear force, the component of the force vector parallel to the
material cross-section.
def sheer_stress(
https://en.wikipedia.org/wiki/Shear_stress
"""


def shear_stress(
stress: float,
tangential_force: float,
area: float,
) -> tuple[str, float]:
"""
This function can calculate any one of the three -
1. Sheer Stress
1. Shear Stress
2. Tangential Force
3. Cross-sectional Area
This is calculated from the other two provided values
Examples -
>>> sheer_stress(stress=25, tangential_force=100, area=0)
>>> shear_stress(stress=25, tangential_force=100, area=0)
('area', 4.0)
>>> sheer_stress(stress=0, tangential_force=1600, area=200)
>>> shear_stress(stress=0, tangential_force=1600, area=200)
('stress', 8.0)
>>> sheer_stress(stress=1000, tangential_force=0, area=1200)
>>> shear_stress(stress=1000, tangential_force=0, area=1200)
('tangential_force', 1200000)
"""
if (stress, tangential_force, area).count(0) != 1:
Expand Down

0 comments on commit e12516d

Please sign in to comment.