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

Questions about simplefoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2013, 13:11
Default Questions about simplefoam
  #1
New Member
 
Mao Mao
Join Date: Feb 2013
Posts: 1
Rep Power: 0
maoyanren is on a distinguished road
Hi all,

I am relatively new to OpenFOAM and I have a question about the solver simpleFoam. I am using OF 2.1.1.

I read a little bit about the solver and algorithm and had some understanding of it. One thing confuses me though. In the source code of simpleFoam

UEqn.H
"tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
sources(U)
);

UEqn().relax();

sources.constrain(UEqn());

solve(UEqn() == -fvc::grad(p));"

why is there a "sources(U)" term in the UEqn and it is even a function of U? And what is "sources.constrain(UEqn())" for?

Any help will be appreciated.
maoyanren is offline   Reply With Quote

Old   March 6, 2013, 03:16
Default
  #2
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
Digging it in doxygen you first get to IObasicSourceList which is a derivative of IOdictionary and basicSourceList. In latter you find operator() and constraint function:
http://foam.sourceforge.net/docs/cpp/a00081.html
However in operator() code addSup does nothing according to:
Foam::basicSource::addSup

In case it was set to something else constraint clips it in a defined range.
anishtain4 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
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 16:26
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 07:27
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 10:07
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 04:08
Error running simpleFoam in parallel skabilan OpenFOAM Running, Solving & CFD 2 August 29, 2008 10:42


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