|
[Sponsors] |
June 22, 2013, 08:48 |
porousSimpleFoam creatfield
|
#1 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 |
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 |
|
June 22, 2013, 16:09 |
|
#2 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22 |
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 |
|
|
|
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 |