A Preventing Oscillations w/ Coarse Calculation Increments?

Stargazer43
Messages
7
Reaction score
0
TL;DR 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.

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 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.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top