CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How nonlinear discretised equations are linearised in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 8 Post By mprinkey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2006, 00:54
Default Hi, I am a new user to OpenFO
  #1
New Member
 
Ashish Pande
Join Date: Mar 2009
Posts: 2
Rep Power: 0
ashish is on a distinguished road
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
ashish is offline   Reply With Quote

Old   June 15, 2006, 06:24
Default Most CFD codes (OpenFOAM and t
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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.
bigphil, kiddmax, toboto and 5 others like this.
mprinkey is offline   Reply With Quote

Old   June 16, 2006, 07:02
Default Thanks Micheal, I think this
  #3
New Member
 
Ashish Pande
Join Date: Mar 2009
Posts: 2
Rep Power: 0
ashish is on a distinguished road
Thanks Micheal,
I think this helps me a lot.
ashish is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nonlinear material study in OF fw407 OpenFOAM Running, Solving & CFD 0 February 26, 2008 07:43
nonlinear instability JackMM Main CFD Forum 6 October 5, 2007 07:20
Nonlinear PDE eyesfront Main CFD Forum 5 December 19, 2002 15:20
axisymmetric discretised eqn Hakeem Main CFD Forum 1 February 4, 2002 20:41
Nonlinear instability Yap Wen Jiun Main CFD Forum 3 September 12, 2000 23:16


All times are GMT -4. The time now is 08:14.