Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python You are to come up with a simplified purely linear piecewise model of the stress- strain curve. You are to approximate the curve with
python
You are to come up with a simplified purely linear piecewise model of the stress- strain curve. You are to approximate the curve with a series of line segments (piecewise function). You should approximate the graph with 5 linear segments. The lines should begin at the origin (0,0) and end at the fracture point. Using more lines will give a more accurate representation, but will be more work in coding. For this assignment, you do not need to be that precise, and can use just 5 segments. Record the endpoints (as strain and stress "coordirfates") for each of the linear segments. You will need to estimate these from the graph. You will now use that linear approximation of the stress-strain curve, and create a program that can evaluate it for you. (i.e. given a strain, report the stress). Next, consider what values you need to store, and the general steps you will need to follow in your program. Make a list of the variables you believe you are likely to need, and the names you will use. Create a sequence of steps that you will follow: o If you have a conditional statement (and you should...), you might want to indicate each part of the condition as a separate action. o The computation here will involve a few stages. Please separate the stages into different parts; do not just say "compute stress". Next, create a list of test cases that you will use in your program. Be sure to handle both "typical" and "edge" cases. Do this before writing the program itself! Similar to the group activity, for each test case, state what it is that you are trying to test (e.g. a typical case, an edge case, which region(s) you are testing, etc.) and what value you want as input and the value expected as output. Note that you should try to come up with a complete set of test cases that thoroughly test the idea. AFTER fully completing activity #1, construct your program. Your program should ask users for a strain, and report the corresponding stress. As you write your program, please be sure to do the following: Include comments for your program. You should probably begin by converting your list of steps into comments. Develop incrementally. That is, write some code and test it before writing the next section of code. Be sure your program runs on all test cases. Be sure to include specific instructions to the user regarding input, and write a descriptive output Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started