mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 00:07:00 +00:00
Shear stress: typo + WIkipedia URL (#7896)
This commit is contained in:
parent
11e6c6fcc4
commit
e12516debb
|
@ -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:
|
Loading…
Reference in New Issue
Block a user