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

simpleFoam source code

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

Reply
 
LinkBack Thread Tools 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: 8
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: 178
Rep Power: 8
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: 8
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 15 on Mac OS X gschaider OpenFOAM Installation 120 December 2, 2009 11:23
Compiling gmshFoam with OpenFOAM-1.5 BlGene Open Source Meshers: Gmsh, Netgen, CGNS, ... 10 August 6, 2009 04: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 15:56


All times are GMT -4. The time now is 23:16.