
[Sponsors] 
September 24, 2010, 21:04 
Systems of Nonlinear Equations

#1 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 7 
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? 

September 25, 2010, 00:23 

#2 
Senior Member
Hamid Zoka
Join Date: Nov 2009
Posts: 164
Rep Power: 8 
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 

September 25, 2010, 12:46 

#3 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 7 
Right. Thanks a lot.


September 28, 2010, 01:54 

#4 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 7 
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?


October 7, 2010, 15:51 

#5 
New Member
Join Date: May 2010
Posts: 8
Rep Power: 7 
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...


November 2, 2010, 16:27 
Linear System solvers

#6  
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 550
Rep Power: 18 
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 

Tags 
nonlinear, systems 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Guide: Writing Equations in LaTeX on the CFD Online Forums  pete  Site Help, Feedback & Discussions  20  June 16, 2015 13:52 
Dealing with nonlinear ODE with contraint equations  enoch  Main CFD Forum  1  August 25, 2010 09:25 
Maths problem when deriving conservation of energy equations.  Demonwolf  Main CFD Forum  1  June 15, 2009 14:21 
How nonlinear discretised equations are linearised in OpenFoam  ashish  OpenFOAM Running, Solving & CFD  2  June 16, 2006 07:02 
Solving systems of equations  Marco Kupiainen (Kupiainen)  OpenFOAM Running, Solving & CFD  3  February 2, 2005 13:55 