EGR 103/Fall 2023/Lab 8
Jump to navigation
Jump to search
Assignment
You will be using root-finding to solve several engineering problems. The main Python method you will be using is:
Note that generally we will bring in scipy.optimize
with
import scipy.optimize as opt
so the function calls will look like
opt.brentq()
In the documentation on Scipy, they bring in the optimize package with
from scipy import optimize
so their function calls look like
optimize.brentq()
Chapra 6.13
- For the plot, use $$T$$ values from 0 to 1200 K
- Use
opt.brentq()
for this. Remember that you do not need to work too hard to make a narrow bracket - just look at the graph and figure out values to the left and right of the root you want. Include the graph and the temperature in your report.
Chapra 6.16
- Use
opt.brentq()
for this. Use the physically possible smallest and largest height values for your brackets.
Chapra 6.21
- Use
opt.brentq()
for this. For Connect, find the smaller of the two angles that work given the $$y$$ on Connect. For the lab report, find both angles that work given the $$y$$ value in the book (30 feet), and report them in both radians and degrees. Remember to convert all the measurements to SI (meters for distance and seconds for time).
Chapra 6.33
- You will be repurposing Chapra Figure 4.2 for this and also using
opt.brentq()
.