- 5

- 0

- Summary
- 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.

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.

### Understanding Stabilization Methods

Here, we provide a mass transport example model as a way to help describe the impact stabilization methods have on your numerical models.

www.comsol.com