sandialabs / CACTUS

CACTUS (Code for Axial and Cross-flow TUrbine Simulation) is a turbine performance simulation code, based on a free wake vortex method, to study wind turbines and marine hydrokinetic (MHK) devices.
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

Convergence problems in non-linear iteration loop #28

Open danrhouck opened 4 years ago

danrhouck commented 4 years ago

I got this error while running. Can you help me figure out what needs to be addressed to fix it? Norm. Time, Theta (rad), Revolution, Torque Coeff., Power Coeff. 0.19640E+02 0.15834E+03 26. 0.59640E-01 0.48082E+00 Timestep: 506 0***** NON-LINEAR ITERATION LOOP DID NOT CONVERGE IN 10 ITERATIONS. PROGRAM TERMINATED. ***** Note: The following floating-point exceptions are signalling: IEEE_DIVIDE_BY_ZERO IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

whophil commented 4 years ago

At each timestep there is there an iteration loop to ensure that the bound vorticity and its effect on local angle of attack are consistent. This is done using a fixed point iteration. See code around https://github.com/SNL-WaterPower/CACTUS/blob/80b28c9aa00e6ccfcd552b2c2e007fb2a6b3442f/src/CACTUS.f95#L140

The error you are seeing indicates that:

  1. This loop did not converge to NLTol within 10 iterations https://github.com/SNL-WaterPower/CACTUS/blob/80b28c9aa00e6ccfcd552b2c2e007fb2a6b3442f/src/CACTUS.f95#L140
  2. There might also be some divid by zero issues.

A few ideas to try:

  1. Look at your airfoil polars. The fixed point iteration may be poorly behaved if your airfoil polars are not smooth. Are you using +/- 180 degree polars?
  2. Try increasing the tolerance and max number of iterations. You will need to recompile as these parameters are not currently exposed.
  3. Try disabling the convergence loop entirely. I never looked at how much this affects the solutions.
danrhouck commented 4 years ago

Thanks for the tips. I think I’ll start with number one. I already have the convergence criteria turned off so that I can be sure the wake propagates as far as I’d like it to. I’m also seeing some streaks of fast flow at about midspan that I think must be related to the polars as they don’t seem to change when I try different numbers or distributions of blade elements. Hopefully going back to the polars will fix both problems. Previously, I used QBlade, which implements XFOIL, to create the polars and the extrapolations to be +/- 180. They definitely aren’t all smooth. Any recommendations for other programs/methods to produce the polars?

jcokemurray commented 4 years ago

Sorry for the late reply. I've been out on vacation... That iteration converges the nonlinear relationship between blade loads and the wake vorticity elements shed into the wake at the next timestep. A few things you might try:

  1. Use more timestep per revolution. This makes for smaller changes in blade loads on each step and usually makes that iteration converge easier.
  2. Use the "timestep filtering" input (see docs). This smooths changes over timesteps and stops an odd-even instability in the solution advancement that can sometimes show up and cause that loop to eventually diverge.

Jon

On Thu, Jul 16, 2020, 10:07 AM Phil Chiu notifications@github.com wrote:

At each timestep there is there an iteration loop to ensure that the bound vorticity and its effect on local angle of attack are consistent. This is done using a fixed point iteration. See code around https://github.com/SNL-WaterPower/CACTUS/blob/80b28c9aa00e6ccfcd552b2c2e007fb2a6b3442f/src/CACTUS.f95#L140

The error you are seeing indicates that:

  1. This loop did not converge to NLTol within 10 iterations https://github.com/SNL-WaterPower/CACTUS/blob/80b28c9aa00e6ccfcd552b2c2e007fb2a6b3442f/src/CACTUS.f95#L140
  2. There might also be some divid by zero issues.

A few ideas to try:

  1. Look at your airfoil polars. The fixed point iteration may be poorly behaved if your airfoil polars are not smooth. Are you using +/- 180 degree polars?
  2. Try increasing the tolerance and max number of iterations. You will need to recompile as these parameters are not currently exposed.
  3. Try disabling the convergence loop entirely. I never looked at how much this affects the solutions.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SNL-WaterPower/CACTUS/issues/28#issuecomment-659512283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC2ZXNL3H4ZTHKWQWOLA3TR34QUDANCNFSM4O23TAJQ .