Rate of convergence in an algorithm

In summary: Then, you can compare the values of y_3 with y_1 and y_2. From there, you can conclude whether component 3 always has a smaller square of deviation or not.In summary, the goal is to compare the values of y for each component and show that y_3 is always smaller. I hope this helps clarify your approach. Good luck with your solution!
  • #1
oliz
2
0

Homework Statement


Calculate the operating temperature for a flash unit.

[tex]osf_2= 0.9[/tex] [tex]P = 750 mmHg[/tex]
[tex]f_1=30, A_1=15.9, B_1=2788.5, C_1=-52.3[/tex]
[tex]f_2=50, A_2=16.0, B_2=3096.5, C_2=-53.7[/tex]
[tex]f_3=40, A_3=16.1, B_3=3096.5, C_3=-59.4[/tex]

[tex]T_{guess} = 400K[/tex]

calculate [tex]P_i^0=exp\left(A_i-\frac{B_i}{T_guess+C_i}\right)[/tex] for all components

calculate [tex]K_i=\frac{P_i^0}{P}[/tex] for all components

calculate [tex]\alpha_\frac{i}{2}=\frac{K_i}{K_2}[/tex] for all components

calculate [tex]osf_i=\frac{\alpha_\frac{i}{2}\cdot osf_2}{1+\left(\alpha_\frac{i}{2}-1\right)\cdot osf_2}[/tex]

calculate
[tex]v_i=osf_i\cdot f_i[/tex]
[tex]l_i=(1-osf_i)\cdot f_i[/tex]
[tex]y_i=\frac{v_i}{V}[/tex]
[tex]x_i=\frac{l_i}{L}[/tex]
for all components

calculate a new [tex]K_2^{new}=\frac{1}{\alpha_\frac{1}{2}\cdot x_1+\alpha_\frac{2}{2}\cdot x_2+\alpha_\frac{3}{2}\cdot x_3}[/tex]

calculate [tex]K_1^{new}=\alpha_\frac{1}{2}\cdot K_2^{new}[/tex] and [tex]K_3^{new}=\alpha_\frac{3}{2}\cdot K_2^{new}[/tex]

calculate new [tex]P_i^0=P \cdot K_i^{new}[/tex] for all components

calculate new [tex]T_i=\frac{B_i}{A_i-\log{P_i^0}}-C_i[/tex]

When comparing the new temperatures to the guessed temperature, [tex]T_3[/tex] will always be closer. As i understand [tex]T_3[/tex] converges faster.

Prove this analytical.


The Attempt at a Solution




[tex]\frac{K_1^j}{K_1^{j-1}} = \frac{K_2^j}{K_2^{j-1}} = \frac{K_3^j}{K_3^{j-1}}[/tex] where j indicates new value and j-1 from the iteration before

From the definition of [tex]K_i[/tex], this eq. can be written.

[tex]\frac{P_1^j}{P_1^{j-1}} = \frac{P_2^j}{P_2^{j-1}} = \frac{P_3^j}{P_3^{j-1}} = Q[/tex]

I then define this equation, which is the square of the deviation of the new temperature to the previous temperature.


[tex]y\left( P_i^j, f \right) = \left( T_{guess} - \frac{B_i^j}{A_i^j - \ln(P_i^j)} + C_i^j \right)^2 = \left( T_{guess} - \frac{B_i^j}{A_i^j - \ln(f + P_i^{j-1})} + C_i^j \right)^2[/tex]

where

[tex]f = P_i^j - P_i^{j-1} = Q \cdot P_i^{j-1} -P_i^{j-1} = P_i^{j-1} \cdot (Q-1)[/tex]

My idea was to show that this square of deviation always is smaller for component 3 but I can't get further.
Im new to comparing rate of convergence so maybe my solution is in the totally wrong direction. I appreciate any help!
 
Physics news on Phys.org
  • #2


Thank you for your post. It seems like you have a good understanding of the problem and have made some progress towards finding a solution. However, I believe there are some mistakes in your approach.

Firstly, when you define the equation for the deviation of the new temperature, it should be:

y\left( P_i^j, f \right) = \left( T_{guess} - \frac{B_i^j}{A_i^j - \ln(P_i^j)} + C_i^j \right)^2 = \left( T_{guess} - \frac{B_i^j}{A_i^j - \ln(f + P_i^{j-1})} + C_i^j \right)^2

This is because the temperature, T_i, is a function of P_i^j and not just f. Additionally, the term (f + P_i^{j-1}) should be (f + P_i^{j}). This is because in the iteration process, the new value of P_i^j is used, not the previous value P_i^{j-1}.

Next, when you define f, it should be f = P_i^j - P_i^{j-1} = Q \cdot P_i^{j-1} -P_i^{j-1} = (Q-1) \cdot P_i^{j-1}. This is because in the iteration process, the new value of P_i^j is used, not the previous value P_i^{j-1}.

Finally, when you try to show that the square of deviation is always smaller for component 3, you need to compare the values of y for each component. So, you should have:

y_1 = \left( T_{guess} - \frac{B_1^j}{A_1^j - \ln(P_1^j)} + C_1^j \right)^2

y_2 = \left( T_{guess} - \frac{B_2^j}{A_2^j - \ln(P_2^j)} + C_2^j \right)^2

y_3 = \left( T_{guess} - \frac{B_3^j}{A_3^j - \ln(P_3^j)} + C_3^j \right)^2
 

Related to Rate of convergence in an algorithm

What is the definition of rate of convergence?

The rate of convergence in an algorithm refers to how quickly the algorithm is able to approximate the true solution. It measures how fast the algorithm is able to converge to the desired result as the number of iterations increases.

How is rate of convergence calculated?

The rate of convergence is typically calculated by taking the absolute value of the difference between the current approximation and the true solution, and dividing it by the difference between the previous approximation and the current approximation. This process is repeated for each iteration until the desired level of accuracy is achieved.

What factors affect the rate of convergence in an algorithm?

There are several factors that can affect the rate of convergence in an algorithm, such as the choice of initial guess, the complexity of the problem, and the overall design of the algorithm. Additionally, the precision of the calculations and the presence of rounding errors can also impact the rate of convergence.

Why is rate of convergence important in algorithms?

The rate of convergence is an important measure of the efficiency and accuracy of an algorithm. A faster rate of convergence means that the algorithm will reach the desired solution in fewer iterations, saving time and resources. It also indicates the stability and reliability of the algorithm.

How can the rate of convergence be improved?

There are various techniques that can be used to improve the rate of convergence in an algorithm. These include choosing a better initial guess, utilizing more advanced algorithms or techniques, and optimizing the code for better performance. Additionally, addressing any sources of error and improving the overall design of the algorithm can also help improve the rate of convergence.

Similar threads

  • Calculus and Beyond Homework Help
Replies
20
Views
770
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
911
  • Mechanical Engineering
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
20
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
380
Back
Top