- #1
ramzerimar
- 178
- 23
Homework Statement
I don't even know if this is the correct forum for this question, but here we go. This exercise is from my numerical methods for engineers class, and it says the following:
The coefficient of saturation of oxygen dissolved in fresh water is given by the equation:
$$ \ln(o_{sf}) = - 139.34411 + \frac{1.575701e5}{T_a} - \frac{6.642308e7}{T_a^2} + \frac{1.243800e10}{T_a^3} - \frac{8.621949e11}{T_a^4}$$
Where osf is the concentration of saturation of oxygen dissolved in fresh water at 1atm(mg/L) and Ta is the absolute temperature (K). The problem gives some additional information: this equation can be used to determine the variation of oxygen concentration from 14,621 mg/L at 0ºC to 6,413 mg/L at 40ºC. Given this formula, the oxygen concentration, we can use bisection method to find the temperature.
So, given inital approximations 0 and 40ºC, develop some program using bisection method to determine T = Ta + 273,15 as a function of a given oxygen concentration with a error of 0.05ºC, for osf = 8, 10 and 12mg/L.
Homework Equations
Only the algorithm for the bisection method and the equation above.
The algorithm is:
- Find points a and b such that a < b and f(a) * f(b) < 0.
- Take the interval [a, b] and find its midpoint x1.
- If f(x1) = 0 then x1 is an exact root, else if f(x1) * f(b) < 0 then let a = x1, else if f(a) * f(x1) < 0 then let b = x1.
- Repeat steps 2 & 3 until f(xi) = 0 or |f(xi)| <= DOA, where DOA stands for degree of accuracy.
The Attempt at a Solution
Using the method is fine. I developed a program in C so I can solve functions using the bisection method. What I don't know is how can I use this method to find the temperature in celsius given those conditions. I mean, the bisection method will find roots of a function in a given interval, how to apply this to the problem?
I know it's a laborious problem, but I need some help figuring out what to do.
Last edited: