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

simpleFoam source code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2009, 02:03
Default simpleFoam source code
  #1
Senior Member
 
Prapanch Nair
Join Date: Mar 2009
Location: Bangalore, India
Posts: 105
Rep Power: 17
prapanj is on a distinguished road
Hi,

In simpleFoam source code, what do the following lines (in Ueqn.H) mean?

Ueqn().relax();
eqnResidual = solve
( Ueqn() == -fvc::grd(p)
).initial Residual()

I understand the part Ueqn()== -fvc::grad(p), please someone explain the rest. Thank you
prapanj is offline   Reply With Quote

Old   October 14, 2009, 03:03
Default
  #2
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17
markusrehm is on a distinguished road
Hello,

Ueqn().relax();
this is for under-relaxing the momentum equation.


Correct me if I am wrong, but I think, the two lines with "initialResidual" are for stopping the whole solution process once the residuals of all equations are low enough.

Regards, Markus.
markusrehm is offline   Reply With Quote

Old   October 14, 2009, 03:33
Default
  #3
Member
 
Jean-Peer Lorenz
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 33
Rep Power: 17
jploz is on a distinguished road
Hi,

not exactly. The code

Code:
eqnResidual = solve( .. ).initial Residual()
assigns the initial residual of the equation to be solved to the existing variable 'eqnResidual' and solves the equation within a single statement.

The check, whether the convergence criterion is satisfied is done later (see file convergenceCheck.H).

HTH, Jean-Peer.
jploz is offline   Reply With Quote

Reply

Tags
residual, simplefoam, source, ueqn


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
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 04:26
Fast Polygon Triangulation with source code. Liang, Wu Main CFD Forum 0 November 2, 2005 19:42
Pre & Post-Processor source code !! C. Beghein Main CFD Forum 1 January 30, 2002 08:35
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56


All times are GMT -4. The time now is 11:52.