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

simpleFoam source code

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2009, 03:03
Default simpleFoam source code
  #1
Senior Member
 
Prapanch Nair
Join Date: Mar 2009
Location: Bangalore, India
Posts: 105
Rep Power: 12
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, 04:03
Default
  #2
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 12
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, 04:33
Default
  #3
Member
 
Jean-Peer Lorenz
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 33
Rep Power: 12
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:23
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 05:26
Fast Polygon Triangulation with source code. Liang, Wu Main CFD Forum 0 November 2, 2005 20:42
Pre & Post-Processor source code !! C. Beghein Main CFD Forum 1 January 30, 2002 09:35
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56


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