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/)
-   -   decomposePar pointfield (https://www.cfd-online.com/Forums/openfoam-solving/117268-decomposepar-pointfield.html)

flying May 5, 2013 23:27

decomposePar pointfield
 
Dear All foamers:

I have met a problem when I use decomposePar to decompose the field which has a dynamic boundary. The boundary motion is described with a pointfield. The problem appears when the decompose plane crosses the dynamic boundary. Otherwise, it seems Ok. In additiion, I have found that the problem has been encountered by other users, but it seems that there are nobody to solve it. My error information as follows:

[6] --> FOAM FATAL IO ERROR:
[6] size 6977 is not equal to the given value of 933
[2] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor2/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[2]
[2] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[2] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[2]
FOAM parallel run exiting
[2]
[6]
[6] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor6/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[6]
[6] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[6] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[6]
FOAM parallel run exiting
[6]
[0]
[0] --> FOAM FATAL IO ERROR:
[0] size 6977 is not equal to the given value of 944
[0]
[0] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor0/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[0]
[0] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[0] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[0]
FOAM parallel run exiting
[0]
[4]
[4] --> FOAM FATAL IO ERROR:
[4] size 6977 is not equal to the given value of 866
[4]
[4] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor4/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[4]
[4] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[4] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[4]
FOAM parallel run exiting
[4]
[7]
[7] [3]
[3]
[3] --> FOAM FATAL IO ERROR:
[3] size 6977 is not equal to the given value of 876
[3]
[3]
[7] --> FOAM FATAL IO ERROR:
[7] size 6977 is not equal to the given value of 1025
[7]
file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor3/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[3]
[3] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[3] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236[7] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor7/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[7]
[7] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[7] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C.
[3]
FOAM parallel run exiting
[3]
at line 236.
[7]
FOAM parallel run exiting
[7]
[1]
[1]
[1] --> FOAM FATAL IO ERROR:
[1] size 6977 is not equal to the given value of 840
[1]
[1] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor1/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[1]
[1] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[1] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[1]
FOAM parallel run exiting
[1]
[5]
[5]
[5] --> FOAM FATAL IO ERROR:
[5] size 6977 is not equal to the given value of 808
[5]
[5] file: /gpfs/home/xgcui/OpenFOAM/xgcui-2.0.0/run/test1/flow3d-movingmesh-f-3/processor5/0/pointMotionU::boundaryField::WALL1 from line 26 to line 7013.
[5]
[5] From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
[5] in file /usr/local/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/Field.C at line 236.
[5]
FOAM parallel run exiting


Does anybody have any ideas on it? Would you please give me some hints on it?

Best wishes!

Tobi May 6, 2013 14:32

Hi,

as you wrote in the PM you have an error while decomposing.

Like I interprete the error you have the files in 0 always initialised with a other mesh. Maybe thats the reason!

flying May 6, 2013 22:16

Hey Tobi:

Many thanks for your reply. In this case, how may I solve the problem? Please give me some hints on it.

Quote:

Originally Posted by Tobi (Post 425637)
Hi,

as you wrote in the PM you have an error while decomposing.

Like I interprete the error you have the files in 0 always initialised with a other mesh. Maybe thats the reason!


Tobi May 7, 2013 12:25

1. use decomposePar -force
2. check in your folder 0 the files pointMotionU if there are any lists in it. If yes you have to create that folder new. I am not familiar with moving meshes

flying May 7, 2013 21:14

Dear Tobi:

Thanks so much for your reply. It stil doesn't work. However, I found that the problem comes from the number of p0 is not equal to the mesh point number. If I change the data in the pointMotionU and make the value uniform and delete the number of value. It will work.

Quote:

Originally Posted by Tobi (Post 425900)
1. use decomposePar -force
2. check in your folder 0 the files pointMotionU if there are any lists in it. If yes you have to create that folder new. I am not familiar with moving meshes


flying May 7, 2013 21:36

2 Attachment(s)
Hey Bruno and all fomers:

I upload a simple case, it is orginally downloaded from the link as follows:

http://www.tfd.chalmers.se/~hani/kur...atchDeform.tgz

It is orginally solved with icoFoam, but I have changed it to the pimpleDyMFoam.

The lib file is for the moving boundary.

As my case is very large and it is changed based this case, then I uploaded this case. My problem is the same as it.

It will be great for any further suggestions.

Quote:

Originally Posted by flying (Post 425978)
Dear Tobi:

Thanks so much for your reply. It stil doesn't work. However, I found that the problem comes from the number of p0 is not equal to the mesh point number. If I change the data in the pointMotionU and make the value uniform and delete the number of value. It will work.


wyldckat May 19, 2013 07:02

Hi Xinguang Cui,

I've finally taken a look into this and I cannot find any problems. I've tested on OpenFOAM 2.2.x, 2.0.x and 2.0.1 and I had no problems in performing the following steps:
Code:

wmake libso libMyPolynomVelocity
cd movingCyl1
blockMesh
decomposePar

I do not have an installation of OpenFOAM 2.0.0, so I cannot confirm if this is a version problem.

Best regards,
Bruno

flying May 19, 2013 09:51

DEAR BRUNO:

Thanks for the information. Would you please put up the decomposePar file? I would like to see the way to decompose the mesh.

bEST WISHES

Quote:

Originally Posted by wyldckat (Post 428519)
Hi Xinguang Cui,

I've finally taken a look into this and I cannot find any problems. I've tested on OpenFOAM 2.2.x, 2.0.x and 2.0.1 and I had no problems in performing the following steps:
Code:

wmake libso libMyPolynomVelocity
cd movingCyl1
blockMesh
decomposePar

I do not have an installation of OpenFOAM 2.0.0, so I cannot confirm if this is a version problem.

Best regards,
Bruno


wyldckat May 19, 2013 10:49

Hi Xinguang Cui,

I didn't change anything on the "decomposeParDict". I used the one provided in your test case.
All I did was clean up a bit the folder "0", by removing some strange files named ".goutputstream*" and one named "pointMotionU~".

Best regards,
Bruno

flying May 19, 2013 11:02

Hey Bruno:

Thanks sor your reply. Have ever tried to run it? I also can decompose it, however it shows problem when it runs the case using pimpleDyMFoam.

I also tried it in 2.2 0 and 2.1.1.

Thanks and best wishes!


Quote:

Originally Posted by wyldckat (Post 428519)
Hi Xinguang Cui,

I've finally taken a look into this and I cannot find any problems. I've tested on OpenFOAM 2.2.x, 2.0.x and 2.0.1 and I had no problems in performing the following steps:
Code:

wmake libso libMyPolynomVelocity
cd movingCyl1
blockMesh
decomposePar

I do not have an installation of OpenFOAM 2.0.0, so I cannot confirm if this is a version problem.

Best regards,
Bruno


wyldckat May 19, 2013 12:44

1 Attachment(s)
Hi Xinguang Cui,

:( The error was completely different from the one originally reported... and the case you prepared seems to be completely different from the initial report... and on top of that, the case was not fully prepared to run...

Anyway, the attached case "movingCyl1_22x.tar.gz" runs fine on OpenFOAM 2.2.x. To run it:
Code:

./Allrun
To clean it up:
Code:

./Allclean
Changes made:
  • I had to add the missing files "transportProperties" and "turbulenceProperties" to the "constant" folder.
  • Added the "All*" scripts, to make it easier to run the case. Keep in mind that the "run*" commands that are inside these scripts will only work inside them.
  • I added the "processor" block to the file "pointMotionU". After decomposition, the file has to be copied once again to all of the processor folders, because decomposePar does not fully understand what this boundary condition is.
For more information, study the tutorial "incompressible/pisoFoam/les/motorBike".

Best regards,
Bruno

marhamat May 21, 2013 01:19

Hi Bruno

It seems that the problem still exists. when I run the attached case in parallel I still see the reported problem in this page. I have same problem with my case, when I run it with pimpleDyMFoam in parallel.

has anybody found a solution for this problem?
Best Regards,
Marhamat

flying May 21, 2013 10:18

Dear BRUNO:

Thanks so much for your reply, what your mention is right. I attached a different case, which is different with my orginal case because its size is small enough to attach.

I will try the case you attached, and give you feedback ASAP.

3X

Quote:

Originally Posted by wyldckat (Post 428567)
Hi Xinguang Cui,

:( The error was completely different from the one originally reported... and the case you prepared seems to be completely different from the initial report... and on top of that, the case was not fully prepared to run...

Anyway, the attached case "movingCyl1_22x.tar.gz" runs fine on OpenFOAM 2.2.x. To run it:
Code:

./Allrun
To clean it up:
Code:

./Allclean
Changes made:
  • I had to add the missing files "transportProperties" and "turbulenceProperties" to the "constant" folder.
  • Added the "All*" scripts, to make it easier to run the case. Keep in mind that the "run*" commands that are inside these scripts will only work inside them.
  • I added the "processor" block to the file "pointMotionU". After decomposition, the file has to be copied once again to all of the processor folders, because decomposePar does not fully understand what this boundary condition is.
For more information, study the tutorial "incompressible/pisoFoam/les/motorBike".

Best regards,
Bruno


wyldckat May 21, 2013 17:44

Greetings to all!

@Marhamat:
Quote:

Originally Posted by marhamat (Post 428789)
It seems that the problem still exists. when I run the attached case in parallel I still see the reported problem in this page. I have same problem with my case, when I run it with pimpleDyMFoam in parallel.

Which specific OpenFOAM version are you using?


@Xinguang:
Quote:

Originally Posted by flying (Post 428919)
Thanks so much for your reply, what your mention is right. I attached a different case, which is different with my orginal case because its size is small enough to attach.

I will try the case you attached, and give you feedback ASAP.

OK :)

Best regards,
Bruno

flying May 21, 2013 22:40

Hey Bruno:

Many thanks for your reply and help. I have test in 2.2.0 and it works in this way. However, I found another bug in this case. When I reconstuctPar -lastestTime, and then I decomposePar it
Code:

Decomposing mesh region0

Create mesh

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 0.01 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
Number of cells = 4000
Number of faces shared with processor 1 = 160
Number of faces shared with processor 2 = 250
Number of processor patches = 2
Number of processor faces = 410
Number of boundary faces = 1210

Processor 1
Number of cells = 4000
Number of faces shared with processor 0 = 160
Number of faces shared with processor 3 = 250
Number of processor patches = 2
Number of processor faces = 410
Number of boundary faces = 1210

Processor 2
Number of cells = 4000
Number of faces shared with processor 0 = 250
Number of faces shared with processor 3 = 80
Number of faces shared with processor 4 = 250
Number of processor patches = 3
Number of processor faces = 580
Number of boundary faces = 1180

Processor 3
Number of cells = 4000
Number of faces shared with processor 1 = 250
Number of faces shared with processor 2 = 80
Number of faces shared with processor 5 = 250
Number of processor patches = 3
Number of processor faces = 580
Number of boundary faces = 1180

Processor 4
Number of cells = 4000
Number of faces shared with processor 2 = 250
Number of faces shared with processor 5 = 160
Number of processor patches = 2
Number of processor faces = 410
Number of boundary faces = 1210

Processor 5
Number of cells = 4000
Number of faces shared with processor 3 = 250
Number of faces shared with processor 4 = 160
Number of processor patches = 2
Number of processor faces = 410
Number of boundary faces = 1210

Number of processor faces = 1400
Max number of cells = 4000 (0% above average 4000)
Max number of processor patches = 3 (28.5714% above average 2.33333)
Max number of faces between processors = 580 (24.2857% above average 466.667)

Time = 0.08


--> FOAM FATAL IO ERROR:
size 0 is not equal to the given value of 121

file: /home/cui/OpenFOAM/cui-2.2.0/run/test1/movingCyl1_22x/0.08/pointMotionU.boundaryField.cubeY from line 45 to line 51.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /opt/openfoam220/src/OpenFOAM/lnInclude/Field.C at line 236.

FOAM exiting

If you like, please give me some hints. Of course, it is not necessary to debug it.


Quote:

Originally Posted by wyldckat (Post 429008)
Greetings to all!

@Marhamat:

Which specific OpenFOAM version are you using?


@Xinguang:

OK :)

Best regards,
Bruno


marhamat May 22, 2013 02:18

Dear Bruno
Now when I run the attached case "movingCyl1_22x.tar.gz" on OpenFOAM 2.1.1. by using the Code: ./Allrun
I get the below error:
Code:

*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : pimpleDyMFoam -parallel
Date  : May 22 2013
Time  : 02:08:08
Host  : "hydrocoeff-System-Product-Name"
PID    : 11868
Case  : /home/hydrocoeff/Downloads/movingCyl1_22x
nProcs : 4
Slaves :
3
(
"hydrocoeff-System-Product-Name.11869"
"hydrocoeff-System-Product-Name.11870"
"hydrocoeff-System-Product-Name.11871"
)

Pstream initialized with:
    floatTransfer    : 0
    nProcsSimpleSum  : 0
    commsType        : nonBlocking
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
// using new solver syntax:
cellMotionU
{
    solver          PCG;
    preconditioner  DIC;
    tolerance      1e-08;
    relTol          0;
}

// using new solver syntax:
motionU
{
    solver          PCG;
    preconditioner  DIC;
    tolerance      1e-06;
    relTol          0;
}

Selecting motion solver: velocityLaplacian
[0]
[0]
[0] --> FOAM FATAL IO ERROR:
[0] keyword diffusivity is undefined in dictionary "/home/hydrocoeff/Downloads/movingCyl1_22x/processor0/constant/dynamicMeshDict"
[0]
[0] file: /home/hydrocoeff/Downloads/movingCyl1_22x/processor0/constant/dynamicMeshDict from line 18 to line 31.
[0]
[0]    From function dictionary::lookupEntry(const word&, bool, bool) const[3]
[3]
[3] --> FOAM FATAL IO ERROR:
[3] keyword diffusivity is undefined in dictionary "/home/hydrocoeff/Downloads/movingCyl1_22x/processor3/constant/dynamicMeshDict"
[3]
[3] file: /home/hydrocoeff/Downloads/movingCyl1_22x/processor3/constant/dynamicMeshDict from line 0 to line 0.
[3]
[3]    From function dictionary::lookupEntry(const word&, bool, bool) const
[3]    in file db/dictionary/dictionary.C at line 400.
[3]
FOAM parallel run exiting
[3]

[0]    in file db/dictionary/dictionary.C at line 400.
[0]
FOAM parallel run exiting
[0]
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[1]
[1]
[2]
[2]
[2] --> FOAM FATAL IO ERROR:
[1] --> FOAM FATAL IO ERROR:
.
.
.

Regards,
Marhamt

marhamat May 22, 2013 05:40

By updating my OF version to OF-2.2.0, now I can run the attached case in parallel. but in my own case I get the below error:
Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian
[0]
[0]
[0] --> FOAM FATAL IO ERROR: [2]
[2]
[0] keyword velocityLaplacianCoeffs is undefined in dictionary "/home/hydrocoeff/Desktop/MyDocuments/pimpleDymFoam/Elips1Par/processor0/constant/dynamicMeshDict"
[0]
[0] file: /home/hydrocoeff/Desktop/MyDocuments/pimpleDymFoam/Elips1Par/processor0/constant/dynamicMeshDict from line 18 to line 23.
[0]
[0]    From function dictionary::subDict(const word& keyword) const
[0]    in file db/dictionary/dictionary.C at line 608.
[0]
FOAM parallel run exiting
.
.
.

There is not dynamicMeshDict in each processor files.
so what is the reason of this error?
Thanks alot,
Marhamat.

marhamat May 22, 2013 08:54

By changing the dynamicMeshDic the problem solved.
Thanks,
Marhamat

wyldckat May 22, 2013 19:29

1 Attachment(s)
Hi Marhamat and Xinguang,

Marhamat sent me a private message with pretty much the same problem that Xinguang has got right now.

The problem is not an easy one to solve and attached is only the first part of the solution, namely a case that should work... but doesn't work because of the broken "libMyPolynomVelocity" library.
I'm not sure when I'll be able to look into this library code... I'll try to look at it tomorrow.

In the meantime, please study attached case file.
And please also study the post from the second link in my signature... namely this one: How to post code using [CODE]

Best regards,
Bruno

wyldckat May 26, 2013 08:43

2 Attachment(s)
Hi Marhamat and Xinguang,

I've finally managed to look at this and make things work.

A description of the necessary changes:
  • On "libMyPolynomVelocity", I had to fix the missing entries at the method "write()". It was missing the keywords such as "RR".
  • On the case itself:
    • It no longer needs to use changeDictionary, since it now properly writes all of the necessary keywords.
    • I had to modify "decomposeParDict" to use:
      • "preservePatches", so that the patches that use "libMyPolynomVelocity" will not be broken between processors.
      • Changed the decomposition method from "simple" to "scotch". This is to make it easier for "preservePatches" to work properly.
Attached are the zip files with the working code and case.

----
edit: I had a look at how it would be possible to avoid the need for "preservePatches". From what I can understand, the problem is that the
"libMyPolynomVelocity" library does not implement all of the necessary methods and constructors. Compare with the class "sixDoFRigidBodyDisplacementPointPatchVectorFi eld" of the same kind of mesh manipulation:
Code:

src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H
src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C

----

Best regards,
Bruno


All times are GMT -4. The time now is 12:50.