Summary
Full Transcript
Previously, we wrote a simple MATLAB script to compute and plot the Darcy-Weisbach friction factor for a given Reynolds number and value of the relative roughness (Chapter 2). We then updated the script to look at a range of Reynolds numbers (for loop and vectorized, Chapters 3 and 4) plotted the results. Here we start with our script from Chapter 2, and convert it to a function. We then use this within a simple for loop to look at a Range of Reynolds numbers and plot. In the next Chapter (Chapter 6) we will discuss vectoring our functions, and will improve our code one last time. This is Exercise 5.2 from my text "Introduction to Chemical Engineering Computation with MATLAB." A copy of the M-files created during the screen cast may be found below: https://drive.google.com/file/d/1z_zDg6u9QVj7oTwVWFqashoa6E7ZMw49/view?usp=sharing https://drive.google.com/file/d/1j7N6XtCFjHvbV0PtvIlATUwolHzDrxcT/view?usp=sharing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Subscribe: https://www.youtube.com/c/AndrewPaluch?sub_confirmation=1
