How can I improve convergence for my complex mathematical model?

  • Context: Graduate 
  • Thread starter Thread starter Redhunter
  • Start date Start date
  • Tags Tags
    Algorithm Convergence
Click For Summary

Discussion Overview

The discussion revolves around improving the convergence of a complex mathematical model used to calculate heat exchanger performance. Participants explore various iterative methods and techniques to refine the model's approach to finding the entering temperature that satisfies a target duty.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • The original method involves iterating the entering temperature based on calculated fluid properties and a correction factor, but sometimes leads to oscillations around the solution.
  • One participant suggests averaging two successive iterations to improve convergence speed.
  • Another participant introduces a geometric approximation method using three successive iterations to accelerate convergence, but questions arise regarding its validity in certain cases.
  • Concerns are raised about the applicability of the geometric approximation when iterations yield nonsensical results, such as negative estimates for duty.
  • A suggestion is made to use a collapsing grid approach if the surface is a monotonic function of temperature.
  • Participants discuss the challenges of estimating derivatives numerically due to the complexity of the process.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of the proposed geometric approximation method, with some finding it unworkable in specific scenarios. The discussion remains unresolved regarding the best approach to improve convergence.

Contextual Notes

Participants note the limitations of their methods, including the need for the geometric approximation to be valid only when iterations are sufficiently close to the actual solution. There are also unresolved issues related to the complexity of estimating derivatives numerically.

Who May Find This Useful

This discussion may be useful for individuals working on complex mathematical models in heat exchanger performance, particularly those interested in numerical methods and convergence techniques.

Redhunter
Messages
2
Reaction score
0
I have a complex mathematical model (about 2000 lines of code) which calculates heat exchanger performance.
Using Q=UxAxLMTD I want to iterate the entering temperature until I find that the installed surface satisfies a target duty.

At present I
1 guess an entering temperature and from the duty calculate the leaving and mean temperature.
2 Calculate various fluid properties, Reynolds No, Prandtl No etc and so a U-value
3 Using the target duty, I calculate the required surface
4 I compare the required surface with the actual surface and make a correction factor
ie k x ((Required-Actual)/Actual)
where k is say 0.25
5 New entering temperature = previous entering temp x (1- correction)

after playing about with k I generally get convergence at between 5 and 40 iterations but sometimes I get oscillation about the solution.

The books I have seem to use first and second order derivatives but my process is too complex for that. Any simple solutions?
 
Science news on Phys.org
If you get oscillations about the solution, and they take a long time to settle, simply averaging 2 successive iterations should make things converge faster.

For a more rigorous approach, be aware that numerical solutions tend to converge (approximately) geometrically to the answer. (This is true whether they oscillate about or approach exponentially the final answer.) You can use that fact and 3 successive iterations to "accelerate" the convergence:

Let x1, x2, and x3 be 3 successive iterations, and let xx be the actual solution. Since the iterations converge approximately geometrically:

(x2-xx)/(x1-xx) ≈ (x3-xx)/(x2-xx)

I.e., the error decreases by the same ratio with each iteration. Solving the above for xx gives

xx = (x1 x3 - x22) / (x1 - 2x2 + x3)

This, of course, is an approximation to the actual value, but it will be much closer than x1, x2, and x3 are.

Next, you can do another 3 iterations starting with xx, and repeat the process as needed.
 
I can see your logic but this does not seem to work. Supposing sucessive iterations were x1=99, x2=100, x3=101 then xx = -1/0

I also tried with some actual data. My first three iterations were 799,717,642 using my current method it converges at 577. The formula gives xx as -198 as these are duty in Kw a negative estimate is nonsense and could not be processed.
 
If the surface is a monotonic function of the temperature, you could use a collapsing grid to zero in on the right temperature.
 
Redhunter said:
I can see your logic but this does not seem to work. Supposing sucessive iterations were x1=99, x2=100, x3=101 then xx = -1/0

I also tried with some actual data. My first three iterations were 799,717,642 using my current method it converges at 577. The formula gives xx as -198 as these are duty in Kw a negative estimate is nonsense and could not be processed.

Yes, I've found you do have to get more "in the neighborhood" of the answer before the geometric approximation is valid. Clearly this is not the case for the 99,100,101 example since the output is changing by the same amount each time.

How does the geometric formula do when your iterations get below 600 in your example? Or when they oscillate as you mentioned they sometimes do in Post #1?

Another comment: you mentioned a method using derivatives, but your process is too complicated to compute them. Could you estimate them numerically, i.e. change the input parameter by a small amount to estimate the derivative?

Regards,

Mark
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
9
Views
2K
  • · Replies 45 ·
2
Replies
45
Views
7K