CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Parallelized dnsFoam (how do I do forcing?) (https://www.cfd-online.com/Forums/openfoam-solving/106235-parallelized-dnsfoam-how-do-i-do-forcing.html)

Steveo August 22, 2012 17:01

Parallelized dnsFoam (how do I do forcing?)
 
Hi everyone,

I am trying to run dnsFoam in parallel. This solver works fine in serial, however, once the spatial decomposition of the grid has occurred (that is, once the decomposePar utility has been called), the forcing scheme used in this solver (which makes use of the "randomProcesses" source files, in particular, the member functions of fft class), causes the solver to crash. I employed the following sequence of commands:

blockMesh
boxTurb
mpirun -np 2 dnsFoam -parallel
reconstructPar

The specific error I encounter is:

[0] --> FOAM FATAL ERROR:
[0] calculated number of cells is incorrect
[0]
[0] From functino Kmesh::Kmesh(const fvMesh & mesh)
[0] in file Kmesh/Kmesh.C at line 84.
[0]

So it appears this forcing scheme needs the whole domain (and not just a portion of it) to operate. Does anyone have any ideas?

openfoamnoob October 18, 2012 15:29

Cannot figure out parallel processing
 
Hi

I am trying to run a dnsFoam job locally on a multiprocessor machine. My grid is very simple. here it is:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.01;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 .25 0)
    (0 .25 0)
    (1 .5 0)
    (0 .5 0)

    (0 0 .01)
    (1 0 .01)
    (1 .25 .01)
    (0 .25 .01)
    (1 .5 .01)
    (0 .5 .01)
);

blocks
(
    hex (0 1 2 3 6 7 8 9) (512 128 1) simpleGrading (1 1 1)
    hex (3 2 4 5 9 8 10 11) (512 128 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 3 9 6)
            (3 5 11 9)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (1 2 8 7)
            (2 4 10 8)
        );
    }
    topWall
    {
        type patch;
        faces
        (
            (5 11 10 4)
        );
    }
    bottomWall
    {
        type wall;
        faces
        (
            (0 6 7 1)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (0 1 2 3)
            (3 2 4 5)
            (6 7 8 9)
            (9 8 10 11)
        );
    }
);

mergePatchPairs
(
);


I'm trying to run on 2 processors... my decomposeParDict is simple, 2 subdomains in the y-direction because i'm trying to simulate M=.7 turbulent flow over a 2d flat plate. I keep getting this error when I try to run "mpirun -np 2 dnsFoam -parallel"

FOAM FATAL ERROR: calculated number of cells is incorrect

I have read other posts on the forums but I guess I am just not understanding the solution. Can someone please break it down for me? :confused: thank you in advance!!!!

wyldckat October 18, 2012 15:58

Greetings to both of you and welcome to the forum!

My apologies for moving openfoamnoob's post to this thread, but it felt like this will help you both:
  1. In a quick search, I found this:
    Quote:

    Originally Posted by NorbertB (Post 266152)
    However I red on this forum (do not find out the link ...) that a parallelization is not possible at present with dnsFoam.
    Is there any expert who could come here and give us a definitive answer plz :)

  2. I did a quick test and managed to reproduce the error Steveo got. Since you two are interested in this more than I'll ever be, I suggest you guys report this here: http://openfoam.org/bugs/
Best regards,
Bruno


All times are GMT -4. The time now is 22:04.