Shear stress: typo + WIkipedia URL (#7896)

This commit is contained in:
Abhishek Chakraborty 2022-10-30 14:11:05 -07:00 committed by GitHub
parent 11e6c6fcc4
commit e12516debb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: