Systems of Nonlinear Equations
Hello people,
I have a query regarding how to solve a system of nonlinear equations while writing a C++ code for an FVM algorithm. If we use QUICK differencing scheme and write the NavierStokes equations in the discretized form (assuming steady conditions) with convection, diffusion and pressure gradient terms, we finally end up with terms like u(P)^2 and v(P)^2. (u & v are velocities at the node P). How does one solve such a system of nonlinear equations for all the nodes? 
When you are to solve a nonlinear equation like this you should consider terms like u(p)^2 as u(p)*u(p).
one u(p) will be set as variable while another simply is a coefficient which is predetermined from previous iteration or an initial guess. as the iteration goes on one u(p) is calculated and another one which is just a coefficient will be updated. regards 
Right. Thanks a lot.

I have another query, now that I've got a linear system in my C++ program. I have two choices to solve the equations the GaussSeidel scheme and the full Gaussian elimination matrix method (the coefficient matrix isn't tridiagonal, so TDMA is not an option). GaussSeidel is easier to implement but matrix elimination with scaling and partial pivoting will lead to convergence. So, which scheme do commercial softwares like OpenFOAM use to solve a system of linear equations?

I don't know what OpenFOAM is using, but for general matrices I would recommend UMFPACK: it comes as an OSS C library (or bundled with Matlab), it's very easy to use and it's very efficient to solve large sparse linear systems (it uses a sparse LU factorization algorithm), as long as you are not looking for a parallel solver...

Linear System solvers
Quote:
1) Krylov Subspace solvers: preconditioned conjugate gradient (asymmetric systems), preconditioned Biconjugate gradient(symmetric systems). 2) Geometric Algebraic Multigrid solvers (works well for symmetric systems) 3) smooth solvers (works well for large asymmetric systems) (I may have left out some) several preconditioners including Diagonal incomplete cholesky, Diagonal LU factorization, GAMG, or just plain diagonal to name a few A good brief source is (http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/TimBehrens/tibehreportfin.pdf) if you are writing your own linear system solver then the krylov solvers aren't too bad. As long as you have programmed some operations (saxpy, matvec operations, dot product, etc.) then its pretty easy. A good book covering the basics is "iterative methods for sparse linear systems" by Yousef Saad. Good luck. Dan 
All times are GMT 4. The time now is 09:25. 