Matrix equation: Ax=b; can A coefficients be negative? Or could this be error?

Click For Summary
SUMMARY

The discussion centers on the occurrence of negative coefficients in the matrix equation Ax = b while solving partial differential equations related to transient advection and diffusion. Users confirm that negative coefficients are typical, especially when using finite difference methods, where patterns such as -1, 2, -1 are common for second derivatives. The presence of negative values does not indicate an error in the calculations or code, but rather reflects the mathematical properties of the numerical methods employed.

PREREQUISITES
  • Understanding of matrix equations, specifically Ax = b
  • Familiarity with finite difference methods for solving partial differential equations
  • Basic knowledge of transient advection and diffusion processes
  • Experience with numerical analysis and error analysis in computational methods
NEXT STEPS
  • Research finite difference methods in detail, focusing on their application in solving partial differential equations
  • Explore the mathematical properties of matrix coefficients in numerical methods
  • Learn about numerical stability and error analysis in computational solutions
  • Investigate the implications of negative coefficients in various mathematical models
USEFUL FOR

Researchers and practitioners in chemistry, applied mathematics, and engineering who are involved in numerical simulations of physical processes, particularly those using finite difference methods for solving differential equations.

bzz77
Messages
33
Reaction score
0
Hello all:

I'm using a code for solving partial differential equations that describe transient advection and diffusion.

I'm more of a chemistry person, so I'm a bit lost on some of the basics of the calculation method.

A general question:

As my calculation progresses, I see that some of the A coefficient values (in the equation Ax = b) go negative. This seems weird because all of the values used in the problem represent measurements that I carried out in my lab (positive).

So I'm trying to figure out whether there is some mathematical reason (like error? Something else I haven't thought of?) why these negative values may be arising or whether there is a bug in the code. I'm not sure if I have provided enough information for anyone to speculate, but I'd be interested in hearing any suggestions. Thanks a lot!
 
Physics news on Phys.org
Assuming you are using some sort of finite difference solution, the coefficients representing a second derivative will form a pattern that looks like -1, 2, -1.

So negative coefficients in the matrix are prefectly normal, and they won't cause any numerical problems.
 

Similar threads

  • · Replies 65 ·
3
Replies
65
Views
8K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K