Preventing Oscillations w/ Coarse Calculation Increments?

Click For Summary

Discussion Overview

The discussion revolves around numerical methods for solving a set of equations that describe a transfer rate along a fixed length, particularly focusing on the challenges of oscillatory behavior when using coarse calculation increments. Participants explore potential stabilization techniques and alternative setups for the equations to mitigate these issues without introducing excessive error.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a set of equations and the oscillatory behavior encountered when the value of B is too large, leading to rapid increases in X and subsequent swings in D.
  • Another participant inquires about the software and integration method being used, suggesting that the choice of method may influence the results.
  • A participant recommends using an implicit method and variable step sizes to address initial stiffness in the equations, referencing a manual for guidance on element spacing.
  • Another participant mentions that sophisticated programs can vary step sizes to control divergence but does not provide specific software recommendations.
  • A suggestion is made to consider predictor-corrector methods, such as the Runge-Kutta algorithm, to address instability in the evaluation of differential equations, though uncertainty remains about its applicability to the participant's software.

Areas of Agreement / Disagreement

Participants express differing opinions on the best numerical methods to use, with no consensus on a single approach. There is acknowledgment of the challenges posed by oscillatory behavior and the need for stabilization techniques, but specific solutions remain contested.

Contextual Notes

Participants note that the oscillatory behavior is particularly pronounced in the initial increments and that making increments infinitely small resolves the issue but is impractical due to calculation time. There is also mention of the difficulties encountered when introducing if/then statements into the calculations, which create discontinuities.

Stargazer43
Messages
7
Reaction score
0
TL;DR
I'm trying to solve a system of equations, but it exhibits significant oscillatory behavior and difficult convergence if my calculation increments are too large.
I'm trying to solve the following set of equations across several discrete increments. These aren't the exact equations I'm using, but they're a simplified version with the same general structure...it's basically a set of equations describing a transfer rate along a fixed length, where "Z" is the length, and my increment is some fraction of Z. The values of C, D, and X are all between 0 and 1.

A = B*(C - D)
D = (10^6) * X
X = (A*Z)/(10+(A*Z))

The issue I've been running into is this: if the value of B is too large, then it will lead to oscillatory behavior where X will rapidly increase in the first increment beyond what is physically possible, and then in the next increment swing back the other way as the value of D exponentially increases. This is heightened by the fact that in the initial increment, D is typically 0, and C is typically ~1. In the subsequent increments, the product of the two is typically very small (on the order of 0.1 or less), so it's just the initial few increments that cause problems.

If I make my increments infinitely-small, this goes away, but the calculation time becomes unrealistic. If I try to use if/then statements in my calculations to limit the maximum value of "A", the solvers I'm using majorly struggle, since it creates a significant discontinuity.

Are there any numerical stabilization techniques I can use to prevent this calculation from going haywire if the value of "B" is too large? Is there a better way to set up the equations such that it will limit the value of "A" to a maximum and prevent oscillations, without introducing excessive error?

I saw an article from Comsol on a similar problem, but since I'm not using their software and am not well-versed in PDEs I was struggling to recreate their solution on my own.

https://www.comsol.com/blogs/understanding-stabilization-methods/
 
Physics news on Phys.org
What software are you using and what integration method?
 
pbuk said:
What software are you using and what integration method?

I'm using Aspen Custom Modeler w/ their 1st order BFD method, but I have tried most of their other built-in methods with the same result. I get the same issue when I try to numerically integrate in Excel also, unless I make my increment size extremely small.
 
Yes an implicit method is probably the right choice here, you probably want a variable step size to get over the initial stiffness. I'm not familiar with that software but a search gave me this manual and a quick look turned up (p139):

Element spacing is uniform within a given domain section, but non-uniform spacing can be applied using multiple sections, each with a different spacing. The latter is particularly useful for modeling PDE systems with sharp fronts.

Have you tried that?
 
  • Like
Likes   Reactions: FactChecker
Sophisticated programs will vary the step size at different locations to control any divergence. Unfortunately, I don't know what is currently available for use.
 
Predictor-corrector methods (the Runge-Kutta algorithm being the classic one) are often the answer to instability in evaluating differential equations. I'm not familiar with your software so don't know that's an option or if there's a good way to graft Runge-Kutta into the solver.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 23 ·
Replies
23
Views
7K