next up previous
Next: Extensions of the Robot's Up: Exercises Previous: Nernst Equation

Bingham's correlation Lab

Bingham's correlation for the viscosity of water as a function of temperature is given by:

\begin{displaymath}
\frac{1}{\mu} = 0.021482 * ( T - 8.435 + \sqrt{( 8078.9 + ( T - 8.435 )^2)} ~~) - 1.2
\end{displaymath}

where $\mu$ is the viscosity in centipoise and $T$ is the temperature in oC.

  1. Create a directory called cs2503Programs in your utulsa file server. Make sure it is accessible only by you. The Unix command chmod go-rx cs2503Programs would do it.

  2. Write a main() program that receives as input the temperature and outputs the viscosity of water. The input is from the standard input, the keyboard. The results are sent to the standard output, the screen. Save it as BinghamWatVisc.cpp t in your directory cs2503Programs.

    Please note: you are required to maintain the user restrictions to this directory. You are also expected to store ALL the programs related to this class in this directory. Any of these violations will be considered an academic infraction and severe penalties will apply including an F grade for the class. This will be continually monitored by the Instructor and the TA periodically.

  3. Verify that you typed it correctly by using the Unix command: g++ BinghamWatVisc.cpp -o BinghamWatVisc . You should have now a new file named BinghamWatVisc . Otherwise, you have miss typed something and would need to correct it.

  4. Once your program compiles, verify that it produces the correct results as follows:

  5. Once your program works correctly, create a file called BinghamWatViscLabReport.html which explains what you accomplished in this lab and save it in your public_html/cs2503Reports directory. Make sure that your file BinghamWatVisc.cpp is not accessible by any other user.

  6. Modify your cs2503.html file to place a link to BinghamWatViscLabReport.html.

  7. Clean up your home directory and any of your public areas to make sure that no files containing your program or portion thereof are accessible by any user.

  8. Hand-in both the files BinghamWatVisc.cpp, BinghamWatViscLabReport.html and cs2503.html.


next up previous
Next: Extensions of the Robot's Up: Exercises Previous: Nernst Equation
J. C. Diaz 2004-01-19