CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   custom inlet problem with parallel runs (

hansjoerg June 10, 2013 12:46

custom inlet problem with parallel runs
I created custom velocity inlets for
a) linear shear flow
b) logarithmic velocity profile
to use them with pisoFoam.

For testing I run the following commands:
1) ~>decomposePar
2) ~>mpirun -np 4 pisoFoam -parallel -case .
3) ~>pisoFoam -case .

In the case of the linear inlet (a): 1-3 run without error
In the case of the logarithmic inlet (b): only (1) and (3) run

running pisoFoam in parallel however fails with the error message below.
The corresponding section in the velocity 0/U:
type logVelocity;
n (1 0 0);
y (0 0 1);
uStar 1.0;
z0 0.1;
kappa 0.41;
//value uniform (0 0 0); // for paraview

I dont know where to search for the error, as my configs/custom
libs run fine in the serial case.

When checking the processor0 - processor3 directories I found that the kappa entry was missing in the U dictionary.
After adding the entry manually I succeeded running the case
Hope somebody has an idea why decomposePar omits the entry

Thanks a lot

[0] keyword kappa is undefined in dictionary "/net/segovia/home/hansjoerg/Projects/Particles_in_Flow/CFDEM/hansjoerg-PUBLIC-2.1.x/pisoShearFlowCFDEM1/CFD/processor0/0/U::boundaryField::inlet"
[0] file: /net/segovia/home/hansjoerg/Projects/Particles_in_Flow/CFDEM/hansjoerg-PUBLIC-2.1.x/pisoShearFlowCFDEM1/CFD/processor0/0/U::boundaryField::inlet from line 36 to line 41.
[0] From function dictionary::lookupEntry(const word&, bool, bool) const
[0] in file db/dictionary/dictionary.C at line 400.
FOAM parallel run exiting

wyldckat June 10, 2013 13:58

Greetings Hansjoerg,

:eek: Not much information to work with... this is one of those "which I had a crystal ball" kind of moments...

Nonetheless, I do believe I know what the problem is, because I fixed one of these problems not too long ago. Check the source code for "libMyPolynomVelocity" from the following two posts:
Compare them side-by-side and you might see what the problem is in your own boundary condition ;)

Best regards,

hansjoerg June 10, 2013 14:40

Thanks a lot for he reply. Problem solved.

I went through your suggested posts and I think that i found the

At the end of the library definition in the function

void logVelocityFvPatchVectorField::write(Ostream& os) const

the entry for "kappa":

os.writeKeyword("kappa")<< kappa_ << token::END_STATEMENT << nl;

was missing. This seems to be ok in serial jobs but crucial in parallel calculations.



styleworker November 15, 2013 11:05

How did you read the entry kappa outside the logVelocityFvPatchVectorField?

All times are GMT -4. The time now is 15:47.