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

porousSimpleFoam creatfield

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2013, 08:48
Default porousSimpleFoam creatfield
  #1
Member
 
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13
AmirBaqa1987 is on a distinguished road
Hi everyone,
can any body say what do the following lines do in createfields?

Switch pressureImplicitPorosity(false);

int nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCo rrectors"))
{
nUCorr = readInt
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCo rrectors")
);
}

if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

any help is appreciated
thanks
arjang
AmirBaqa1987 is offline   Reply With Quote

Old   June 22, 2013, 16:09
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi argjang,


int nUCorr = 0; initialize nUCorr to 0
if (pZones.size()) checks if there are pZones (size > 0)
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCo rrectors")) checks if the nUCorrects keyword is present in the SIMPLE subdictionary of the solutionDict-file (system/fvSolutions)
{
nUCorr = readInt
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCo rrectors")
); If it is present, the (integer) value is read using the lookup function and stores it under nUCorr
}

if (nUCorr > 0) If nUCorr is bigger than 0, parameter pressureImplicitPorosity is set to true
{
pressureImplicitPorosity = true;
}
}

Hope this is what you liked to know.

Cheers,


Lieven
Lieven 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
porousSimpleFoam aban OpenFOAM 10 July 20, 2022 03:01
porousSimpleFoam Per OpenFOAM Running, Solving & CFD 5 October 24, 2015 15:42
porousSimpleFoam crash on 40 cores ciberbob1987 OpenFOAM Running, Solving & CFD 2 February 26, 2012 17:22
porousSimpleFoam - crash Sebaj OpenFOAM 2 January 4, 2012 16:16
porousSimpleFoam bug in 1.7.x chibsen OpenFOAM Bugs 4 August 6, 2010 17:26


All times are GMT -4. The time now is 01:18.