Question: This program must be in python languague. You are to come up with a simplified piecewise linear model of the stress-strain curve. That is, you
This program must be in python languague.


You are to come up with a simplified piecewise linear model of the stress-strain curve. That is, you are to approximate the curve by a series of line segments. You should approximate the graph by at least 4 linear segments. The lines should begin at 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 project, you do not need to be precise, and can use just 4 segments You'll then work on taking 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). The user should be able to input the data needed to generate the curve, and then be given the choice of whether to plot the curve (using matplotlib) or to input a strain value and output the corresponding stress. The user should be repeatedly presented with these options until they decide to exit the program (i.e. "exit the program" should be an option). 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 list of operations that use these variables Group these operations and variables to separate the major tasks in your program Think about small changes that might be made to the program, for example: reading input from a file instead of the command line, producing a stress-strain curve for a different material, plotting the curve instead of outputting points, etc. 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! For each test case state what it is you are trying to test (e.g. a typical case, an edge case, which region(s) you are testing, etc.), the value you want as input and the value as output Note that you should try to come up with a complete set of test cases that thoroughly test the idea . You must have a minimum of 5 test cases You are to come up with a simplified piecewise linear model of the stress-strain curve. That is, you are to approximate the curve by a series of line segments. You should approximate the graph by at least 4 linear segments. The lines should begin at 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 project, you do not need to be precise, and can use just 4 segments You'll then work on taking 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). The user should be able to input the data needed to generate the curve, and then be given the choice of whether to plot the curve (using matplotlib) or to input a strain value and output the corresponding stress. The user should be repeatedly presented with these options until they decide to exit the program (i.e. "exit the program" should be an option). 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 list of operations that use these variables Group these operations and variables to separate the major tasks in your program Think about small changes that might be made to the program, for example: reading input from a file instead of the command line, producing a stress-strain curve for a different material, plotting the curve instead of outputting points, etc. 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! For each test case state what it is you are trying to test (e.g. a typical case, an edge case, which region(s) you are testing, etc.), the value you want as input and the value as output Note that you should try to come up with a complete set of test cases that thoroughly test the idea . You must have a minimum of 5 test cases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
