Engeering_102_5b_Act_2_PDF

pdf

School

Texas A&M University *

*We aren’t endorsed by this school

Course

102

Subject

Mechanical Engineering

Date

Dec 6, 2023

Type

pdf

Pages

3

Uploaded by ChiefThunder8105

Report
# By submitting this assignment, I agree to the following: # "Aggies do not lie, cheat, or steal, or tolerate those who do." # "I have not given or received any unauthorized aid on this assignment." # # Name: Jared Pinkerton # Section: 572 # Assignment: Lab5b Act 2 # Date: 28 September 2021 # from math import * # I am asking the user to enter a strain number strain = float(input("Enter the strain: ")) # I listed all the points that were given x1 = 0 x2 = 0.01 x3 = 0.06 x4 = 0.18 x5 = 0.27 y1 = 0 y2 = 43 y3 = 43.5 y4 = 60 y5 = 51
if strain >= 0 and strain <= 0.01: # The stress between strain 0 and 0.01 is calculated by finding the #slope of the two points. The slope is equal to Young's Modulus. stress_1 = ((y2-y1)/(x2 - x1)) * (strain-x1) + y1 #This prints the stress print("The stress is approximately {:.1f}".format(stress_1)) elif strain >= 0.01 and strain <= 0.06: # The stress between strain 0.01 and 0.06 is calculated by finding the #slope of the two points. The slope is equal to Young's Modulus. stress_2 = ((y3-y2)/(x3 - x2)) * (strain-x2) + y2 #This prints the stress print("The stress is approximately {:.1f}".format(stress_2)) elif strain >= 0.06 and strain <= 0.18: # The stress between strain 0.06 and 0.18 is calculated by finding the #slope of the two points. The slope is equal to Young's Modulus. stress_3 = ((y4-y3)/(x4 - x3)) * (strain-x3) + y3 #This prints the stress print("The stress is approximately {:.1f}".format(stress_3))
elif strain >= 0.18 and strain <= 0.27: # The stress between strain 0.18 and 0.27 is calculated by finding the #slope of the two points. The slope is equal to Young's Modulus. stress_4 = ((y5-y4)/(x5 - x4)) * (strain-x4) + y4 #This prints the stress print("The stress is approximately {:.1f}".format(stress_4)) else: print("Strain is undefined in that region")
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help