# Example 17 - Single NLE with 'if' condition
# Terminal Velocity
# Verified Solution: vt = 0.015782
# Ref.: Comput. Appl. Eng. Educ. 6: 174, 1998
f(vt)=vt^2*(3*CD*rho)-4*g*(rhop-rho)*Dp
rho=994.6
g=9.80665
rhop=1800
Dp=0.208e-3
vis=8.931e-4
Re=Dp*vt*rho/vis
CD=if (Re < 0.1) then (24/Re) else (24*(1+0.14*Re^0.7)/Re)
vt(min)=0.0001
vt(max)=0.05
Calculated values
|
Variable |
Value |
f(x) |
Initial Guess |
Initial f(x) |
1 |
vt |
0.01578162 |
1.4E-10 |
0.02505 |
4.9E00 |
|
Variable |
Value |
Initial Value |
1 |
CD |
8.8426583 |
6.1187912 |
2 |
Dp |
0.000208 |
0.000208 |
3 |
g |
9.80665 |
9.80665 |
4 |
Re |
3.6556385 |
5.8025572 |
5 |
rho |
994.6 |
994.6 |
6 |
rhop |
1800 |
1800 |
7 |
vis |
0.0008931 |
0.0008931 |
Root Finding Plot
Formatted equations
Nonlinear equations
1 |
f(vt) = vt^2*(3*CD*rho)-4*g*(rhop-rho)*Dp = 0 |
Explicit equations
1 |
rho = 994.6 |
2 |
g = 9.80665 |
3 |
rhop = 1800 |
4 |
Dp = 0.208e-3 |
5 |
vis = 8.931e-4 |
6 |
Re = Dp*vt*rho/vis |
7 |
CD = if (Re < 0.1) then (24/Re) else (24*(1+0.14*Re^0.7)/Re) |
General Settings
Total number of equations |
8 |
Number of implicit equations |
1 |
Number of explicit equations |
7 |
Elapsed time |
0.00 sec |
Reporting digits |
10 |
Solution method |
safenewt |
Max iterations |
150 |
Tolerance F |
1E-07 |
Tolerance X |
1E-07 |
Tolerance min |
1E-07 |