# How nonlinear discretised equations are linearised in OpenFoam

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 15, 2006, 00:54 Hi, I am a new user to OpenFO #1 New Member   Ashish Pande Join Date: Mar 2009 Posts: 2 Rep Power: 0 Sponsored Links Hi, I am a new user to OpenFOAM (and to CFD methods as well :D). After going through the user's and programmer's guide, I notice that these manuals don't give information on linearisation method. i.e. when one uses discretisation method for all the terms in a equation, what we get is a non-linear (but discretised) algebraic equation (if u've steady state). How is this equation linearised to get the standard form Ax=b? I've been looking for this in Fluent as well, which also doesn't give any information. I suspect that a newton form of method is used, to arrive at the linearised form, because after that one can use krylov subspace methods to avoid calculating the jacobian exactly and getting matrix vector products instead. If Krylov methods are not used in OpenFOAM, how is the jacobian calculated (by algorithmic differenciation/any other method which I don't know)?? Ashish

 June 15, 2006, 06:24 Most CFD codes (OpenFOAM and t #2 Senior Member   Michael Prinkey Join Date: Mar 2009 Location: Pittsburgh PA Posts: 334 Rep Power: 16 Most CFD codes (OpenFOAM and the segregated solver in FLUENT included) do not use Newton-type linearizations for nonlinear terms. The linearization approach is based on Patankar's SIMPLE algorithm. Most any CFD book will give an good discussion of this approach. Essentially, nonlinear terms in convection use lagged values for the mass/volume flux. In OpenFOAM, you can see this as the explicit construction of the phi flux field, that is then used for all convective terms which (for momentum, at least) are nonlinear terms. Other terms, say nonlinear source terms, are linearized in a modified Newton fashion. Typically, the source terms are expanded in a Talyor series about the old iteration/timestep value and yields a constant term that goes into the b vector and a linear term (proportional to the field value) that goes on the diagonal of A. I say this is a modified Newton form because it doesn't use full Jacobian data...only the derivative of the source function with respect to the solved variable at hand. Dependencies on other field variables are evaluated based on old iteration/timestep values. That brings up an essential feature of CFD codes based on SIMPLE and its variants. Each field variable is solved one at a time rather than in a fully coupled way. This is necessary and effective for a variety of reasons, but the biggest reason was (and still is) the memory requirements and solution difficulties associated with a full-sized sparse matrix that includes all field variables. There are certainly other CFD approaches that do either linearized yet fully coupled solution of all of the field variables (FLUENT's coupled solver, CFX5 solver). Other's directly apply the Newton linearization and invert the full Jacobian or (more efficiently) build approximate Jacobian data and seeks solutions using Krylov methods. The latter are called Matrix-Free Newton-Krylov (MFNK) methods and are in the process of being developed. Right now, none of these coupled approaches are being done in any of the OpenFOAM solvers to my knowledge. The full-Jacobian/linearized coupled schemes will require a block solver infrastructure that OpenFOAM doesn't have yet. The MFNK methods could be implemented using existing OpenFOAM capabilities, but I've not seen anyone do that. Good luck. kiddmax and toboto like this.

 June 16, 2006, 07:02 Thanks Micheal, I think this #3 New Member   Ashish Pande Join Date: Mar 2009 Posts: 2 Rep Power: 0 Thanks Micheal, I think this helps me a lot.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post fw407 OpenFOAM Running, Solving & CFD 0 February 26, 2008 08:43 JackMM Main CFD Forum 6 October 5, 2007 07:20 eyesfront Main CFD Forum 5 December 19, 2002 16:20 Hakeem Main CFD Forum 1 February 4, 2002 21:41 Yap Wen Jiun Main CFD Forum 3 September 12, 2000 23:16