CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Netgen] ideasUnvToFoam with inner parts (https://www.cfd-online.com/Forums/openfoam-meshing/103761-ideasunvtofoam-inner-parts.html)

anton_lias June 26, 2012 04:22

ideasUnvToFoam with inner parts
 
1 Attachment(s)
Hello All,

I have got a problem with my mesh and I hope, that you can help me.

1. I created a simple mesh with "Salome" and "Netgen 1D-2D-3D".
2. I exported it as *.unv (mesh_forum.unv.gz)
3. I tried to convert it with ideasUnvToFoam, but it fails (see the log-file)

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : ideasUnvToFoam mesh_long_0626_0845.unv
Date  : Jun 26 2012
Time  : 08:47:10
Host  : "Hans"
PID    : 9674
Case  : /home/paul/OpenFOAM/paul-2.1.0/run/mycases/fermenter_v18_forum
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Processing tag:2411
Starting reading points at line 3.
Read 1996 points.

Processing tag:2412
Starting reading cells at line 3998.
First occurrence of element type 11 for cell 1 at line 3999
First occurrence of element type 41 for cell 213 at line 4635
First occurrence of element type 111 for cell 2502 at line 9213
Read 10226 cells and 2289 boundary faces.

Processing tag:2467
Starting reading patches at line 29667.
For group 3 named defaultFaces trying to read 241 patch face indices.
For group 4 named wall trying to read 661 patch face indices.
For group 5 named outerSlider trying to read 545 patch face indices.
For group 6 named innerSlider trying to read 545 patch face indices.
For group 7 named stirrer trying to read 842 patch face indices.

Of 2289 so-called boundary faces 1387 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: defaultFaces is patch
1: wall is patch
2: outerSlider is faceZone
3: innerSlider is faceZone
4: stirrer is faceZone

Constructing mesh with non-default patches of size:
    defaultFaces        241
    wall        661

Adding cell and face zones
 Face Zone innerSlider  545
ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.

If I delete the inner parts, the conversion works fine. Could anybody please say me whats the mistake, or how I should do it?

Thanks a lot!

Picture: at the outside there is the "wall", the cylinder shuld be "innerSlider" and "outerSlider" and the block shuld be the "stirrer"

Edit: I forgot to add the picture

anton_lias July 3, 2012 07:35

Solved. If anybody has the same error:
To put all the geometries in one mesh, I used the operation "partition" instead of "cut". That was the mistake.

dzi November 2, 2012 06:36

Quote:

Originally Posted by anton_lias (Post 369503)
Solved. If anybody has the same error:
To put all the geometries in one mesh, I used the operation "partition" instead of "cut". That was the mistake.


Hi Anton / all
I ran into a similar problem with internal faces. My example uses a cylinder with an internal face created with Salome 6.5 to calculate a heat transfer problem. The mesh was created after partition operation and groups created for all walls, the interface and the interior.
Here is my geometry:

http://www.file-upload.net/download-...forum.hdf.html

Conversion with ideasUnvToFoam throws an error with internal faces:

...
Create timeProcessing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15

Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.
Processing tag:2411
Starting reading points at line 20.
Read 527 points.
Processing tag:2412
Starting reading cells at line 1077.
First occurrence of element type 11 for cell 1 at line 1078
First occurrence of element type 41 for cell 57 at line 1246
First occurrence of element type 111 for cell 853 at line 2838
Read 1860 cells and 796 boundary faces.
Processing tag:2467
Starting reading patches at line 6560.
For group 1 named wall_lower trying to read 296 patch face indices.
For group 2 named wall_upper trying to read 296 patch face indices.
For group 3 named top trying to read 68 patch face indices.
For group 4 named bottom trying to read 68 patch face indices.
For group 5 named interior trying to read 1860 patch face indices.
For group 6 named intersection trying to read 68 patch face indices.
Of 796 so-called boundary faces 68 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: wall_lower is patch
1: wall_upper is patch
2: top is patch
3: bottom is patch
4: interior is cellZone
5: intersection is faceZone
Constructing mesh with non-default patches of size:
wall_lower 296
wall_upper 296
top 68
bottom 68
Adding cell and face zones
Cell Zone interior 1860
Face Zone intersection 68
ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.
Aborted



Could you update/renew/provide your attached mesh_forum.unv, which worked finally for you? The link to your mesh has expired, and I would like to identify where I am wrong in my procedure.
Any help is appreciated, thanks!
dirk

anton_lias November 5, 2012 06:44

1. You can download it at http://www.file-upload.net/download-...um.unv.gz.html

2. try NOT to use the operation "partition". I would make two cylinders and use the operation "fuse" to combine them.

dzi November 5, 2012 11:19

Thanks anton! I tried your mesh, but got the same error. maybe a bug in ideasUnvToFoam of this version?

My output:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : ideasUnvToFoam mesh_forum.unv
Date : Nov 05 2012
Time : 16:46:51
Host : "simulation-HP"
PID : 20950
Case : /home/dirk/OpenFOAM/dirk-2.1.0/run/cht/planeWall2DSalome2
nProcs : 1
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

Processing tag:2411
Starting reading points at line 3.
Read 1996 points.

Processing tag:2412
Starting reading cells at line 3998.
First occurrence of element type 11 for cell 1 at line 3999
First occurrence of element type 41 for cell 213 at line 4635
First occurrence of element type 111 for cell 2502 at line 9213
Read 10226 cells and 2289 boundary faces.

Processing tag:2467
Starting reading patches at line 29667.
For group 3 named defaultFaces trying to read 241 patch face indices.
For group 4 named wall trying to read 661 patch face indices.
For group 5 named outerSlider trying to read 545 patch face indices.
For group 6 named innerSlider trying to read 545 patch face indices.
For group 7 named stirrer trying to read 842 patch face indices.

Of 2289 so-called boundary faces 1387 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: defaultFaces is patch
1: wall is patch
2: outerSlider is faceZone
3: innerSlider is faceZone
4: stirrer is faceZone

Constructing mesh with non-default patches of size:
defaultFaces 241
wall 661

Adding cell and face zones
Face Zone innerSlider 545
ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.
Aborted

I also tried to fuse two boxes instead of partitioning. After fusion also the interface has fused away and I cannot create a group in the meshing module from that face.

Maybe somebody could provide a working a salome script (py) with an inner wall to start before generation of the unv. file.

I also posted the same problem (2 cylinder) to a german forum:
http://ww3.cad.de/foren/ubb/Forum527/HTML/000308.shtml

Thanks all your for help!
dirk

Quote:

Originally Posted by anton_lias (Post 390310)
1. You can download it at http://www.file-upload.net/download-...um.unv.gz.html

2. try NOT to use the operation "partition". I would make two cylinders and use the operation "fuse" to combine them.


anton_lias November 6, 2012 06:03

I am sorry, I gave you the old file. http://www.file-upload.net/download-...20702.unv.html <-- this should work.

If your geometry is only this pipe, you can use blockmesh.

Or you could try to make two meshes and combine them with "mergeMeshes".

laurentb November 9, 2012 02:28

Hi all,

I encounter the same problem with openfoam version 2.1.1 :

ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.

But if i switch to the 2.0.1 version the ideasUnvToFoam utility works fine.

Does anybody can explain this ?

dzi November 9, 2012 03:24

hi laurent,
maybe this helps, (expanding a line in the unv file about one column, although it is more salome related)
http://www.openfoam.org/mantisbt/view.php?id=584
http://openfoamwiki.net/index.php/IdeasUnvToFoam
good luck
dirk
Quote:

Originally Posted by laurentb (Post 391155)
Hi all,

I encounter the same problem with openfoam version 2.1.1 :

ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.

But if i switch to the 2.0.1 version the ideasUnvToFoam utility works fine.

Does anybody can explain this ?


Dazzler November 26, 2012 19:58

No I cant explain it but more than that I cant replicate it.

I have a mesh with internal parts that fails conversion to openfoam from an ideasUnv format created with Salome that refuses to convert with the same error message :-

ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.

This is driving me insane at 1.00am in the morning does anyone know the problem ?

jfoster533 December 16, 2012 11:27

I am new to both Salome and OpenFOAM and I seem to have run into the same problem with ideasUnvToFoam. I am trying to simulate a simple model consisting of a box with a short inlet pipe at the bottom and short outlet pipe at the top. I created a face with a small hole in the center to act as an orifice in the middle of the box with hopes of learning to explore how flow is affected by different baffle designs. I used the Partition tool in Salome along with the face to create geometry that would allow me to include this "baffle" as a group in my mesh. After exporting to .unv and using ideasUnvToFoam I get the following output:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : ideasUnvToFoam baffle.unv
Date : Dec 16 2012
Time : 10:55:36
Host : ""
PID : 30004
Case : /state/partition1/home/jfoster533/run/baffle
nProcs : 1
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

Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15


Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.

Processing tag:2411
Starting reading points at line 20.
Read 15447 points.

Processing tag:2412
Starting reading cells at line 30917.
First occurrence of element type 11 for cell 1 at line 30918
First occurrence of element type 41 for cell 452 at line 32271
First occurrence of element type 111 for cell 15877 at line 63121
Read 69975 cells and 15425 boundary faces.

Processing tag:2467
Starting reading patches at line 203073.
For group 1 named baffle trying to read 1833 patch face indices.
For group 2 named inlet trying to read 68 patch face indices.
For group 3 named outlet trying to read 68 patch face indices.
For group 4 named wall trying to read 13456 patch face indices.

Of 15425 so-called boundary faces 1833 belong to two cells and are therefore internal
Sorting boundary faces according to group (patch)
0: baffle is faceZone
1: inlet is patch
2: outlet is patch
3: wall is patch

Constructing mesh with non-default patches of size:
inlet 68
outlet 68
wall 13456

Adding cell and face zones
Face Zone baffle 1833
ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed.
Aborted

I would greatly appreciate any advice as to how to work around this problem. I have also tried to seperate the model into two solids: one above the baffle and one below and build a compound solid from the two. I was able to export this to .unv as well with the very same failure as listed above.

anton_lias December 17, 2012 05:00

Quote:

Originally Posted by anton_lias (Post 390310)
2. try NOT to use the operation "partition".

"ideasUnvToFoam: ideasUnvToFoam.C:1269: int main(int, char**): Assertion `noveau > -1' failed." I got that error too, when I used "parition".

l_r_mcglashan December 24, 2012 07:11

1 Attachment(s)
Apply this patch to ideasUnvToFoam.C

You should be able to view the baffle as a faceZone in paraview. You can then use createBaffles to make the baffle patch.

There may be other issues though to do with internal faces, I'll have to think about it.

jfoster533 December 29, 2012 12:07

Laurence,
Your patch did the trick. I was able to successfully produce the internal zero thickness walls that I was after. Thanks for you help!

Pisolino February 12, 2013 18:11

Quote:

Originally Posted by l_r_mcglashan (Post 398894)
Apply this patch to ideasUnvToFoam.C

You should be able to view the baffle as a faceZone in paraview. You can then use createBaffles to make the baffle patch.

There may be other issues though to do with internal faces, I'll have to think about it.

Hi all, i'm quite a newbie, how can i use the patch file? i simply pasted the 2 lines in the ideasUnvToFoam.C file around line 909, then i saved. Despite of that my unv file, realized with partition doesn't work again... :(
the internal face is the error

jfoster533 February 19, 2013 21:27

I am new at this as well, but I will try to help you. Copy the ideasUnvToFoam.patch file to the folder containing ideasUnvToFoam.C. In a terminal, enter the command 'patch ideasUnvToFoam.C ideasUnvToFoam.patch. The code will be patched and you can recompile the application. Worked for me anyway.

gschaider March 13, 2013 15:15

Quote:

Originally Posted by l_r_mcglashan (Post 398894)
Apply this patch to ideasUnvToFoam.C

You should be able to view the baffle as a faceZone in paraview. You can then use createBaffles to make the baffle patch.

There may be other issues though to do with internal faces, I'll have to think about it.

Hi Lawrence!

As Lenin said: "Patching is good. Reporting is better". Have you ever reported this patch as a bug at http://www.openfoam.org/bugs/ ? I'm asking because the error which it fixes still occurs in 2.2.x

Please do so the next time. If not for everyone else then for your convenience: that way you won't have to patch your own installation once a new OF-version comes out

Bernhard

l_r_mcglashan March 14, 2013 05:01

I didn't add it before because I hadn't tested it and the code was hard to follow, but seeing as nobody has complained about the patch so far it has now been added to the repository.

Ledeniso June 12, 2013 05:02

ideasUnvToFoam
 
Quote:

Originally Posted by jfoster533 (Post 408874)
I am new at this as well, but I will try to help you. Copy the ideasUnvToFoam.patch file to the folder containing ideasUnvToFoam.C. In a terminal, enter the command 'patch ideasUnvToFoam.C ideasUnvToFoam.patch. The code will be patched and you can recompile the application. Worked for me anyway.


Hello JFoster,
i would like to know: How to recompile the appication,
i have alredy copied the ideasUnvToFoam into the directory containing ideasUnvToFoam.C

The step with/in the terminal is also alredy done, but it does not change anything, i do not know how to "recompile"

What is the next step afterthe step in the erminal?

To find the Folder, i just searched from the root after ideasUnvToFoam and find the folder under:
/opt/openfoam211/applications/utilities/mesh/conversion/ideasUnvToFoam

Thank you very much for your patch and for any help

Leden...

laurentb June 13, 2013 02:08

>cd /opt/openfoam211/applications/utilities/mesh/conversion/ideasUnvToFoam
>sudo su
#source /opt/openfoam211/etc/bashrc
#patch ideasUnvToFoam.c ideasUnvToFoam.patch
#wmake

Matt_h October 5, 2013 00:23

Thanks for the answers, I am having the same error.

I want to try and apply the patch but I don't have the privileges to access /opt..

I'm fairly new to linux and am trying to work out how to access that folder to apply the patch as described by the above post.

Any help much appreciated

Edit. Managed to apply the patch but still getting the error. Any ideas?


All times are GMT -4. The time now is 19:33.