CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

Internal patches with fluentMeshToFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 27, 2008, 16:33
Default Hello World. Due to a radiu
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hello World.

Due to a radius in one of my computational domains I forced an element-change in the surrounding of the radius. I used tetrahedron-elements to model the radius and used hexahedron-elements at the rest.

At the intersection of the two element-areas I had to define some faces in GAMBIT to make the distinction between the two areas possible.

Have a look at the image. I have marked the patches of concern.



How can I tread these internal patches in OpenFOAM?
Unfortunately OpenFOAM does not recognize the mesh as 2D or 3D. Maybe this is due to difficulties with the empty BC's I used for these internal patches ...

Do you have any ideas?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 28, 2008, 07:56
Default Hi Sebastian! You're trying
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sebastian!

You're trying to employ the axial-symmetry of your case? In that case

1. make a 2D-mesh (with rectangles and triangles)
2. convert it to OF (the elements become bricks and prisms)
3. Use http://openfoamwiki.net/index.php/Contrib_MakeAxialMesh to make an axialsymmetric mesh

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 28, 2008, 09:26
Default Hello Bernhard. Yes, this i
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hello Bernhard.

Yes, this is exactly what I want to do!

This sounds like a very good idea.
I will try this at once.

I created the first mesh in GAMBIT with three different volumes I did not connect.
May this be a problem regarding the internal patches?
(Just in case I have to go back to the first approach ...)
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 28, 2008, 10:15
Default So, back again - so soon ... :
  #4
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
So, back again - so soon ... :-(

I have done as suggested by Bernhard.
I created the 2D-geometry with GAMBIT, converted to OpenFOAM (fluentMeshToFoam) and used the MakeAxialMesh tool.

When running the paraFoam I get this message:

FOAM FATAL ERROR : wedge frontAndBackPlanes plane aligns with a coordinate plane.

So, I think there went something wrong with collapseEdge, which I used with arguments 0 180.
But I'm not sure what they mean ...

Want to have a look at the case?
Here it is:
http://www.familie-gatzka.de/sega/DO...AxiMesh.tar.gz

Thanks!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 28, 2008, 11:59
Default Hi Sebastian! I can't repro
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sebastian!

I can't reproduce your problem because the tar-file is corrupted (when extracting I only get a partial copy of the msh-file). Mesh-utilities write the resulting mesh to the NEXT time-step. Are you sure you copied everything from 1e-6/polyMesh to constant/polyMesh before proceeding to the next step?

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 28, 2008, 12:16
Default Hi Bernhard. Well, I did NO
  #6
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hi Bernhard.

Well, I did NOT copy the resulting mesh.
I actually wondered what the additional timestep directory was used for ...
(Maybe you should mention it in your usage wiki ... just for the beginner)

Will try it later.

Thanks so far!
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 28, 2008, 13:28
Default Well, maybe you could modify t
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Well, maybe you could modify the Wiki-page accordingly ....
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 29, 2008, 03:14
Default Hello, again. I still have
  #8
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Hello, again.

I still have some questions regarding this problem.

After running the makeAxialMesh tool, there are the frontAndBackPatches and two other patches frontAndBackPatches_pos and ..._neg.

To get rid of them is to use the collapseEdge tool?

So, I copied the new mesh into the constant directory and used collapseEdge.

But what arguements should I use?
In the usage wiki you say something like this:
For an application like this, you would want to use collapseEdges with a very small length scale argument and an angle argument near 180 degrees

What is the length scale argument?
The length of the whole edge?
And what is the 180 degrees good for?
Especially if I want an angle of 2.5 degrees?

Hope you can help me.
Thanks so far & have a nice day.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 29, 2008, 07:45
Default The collapseEdges-utility remo
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
The collapseEdges-utility removes edges that are ridiculously small. Like the edges on the "axis" patch.
Concerning the arguments: type "collapseEdges -h" and you will be enlightened

frontAndBackPatches are the "old" patches. If you look at the new boundary-file the sizhe of that is 0 after makeAxialMesh because all those faces either go to frontAndBackPatches_pos/neg. You'll have to add those patches to the boundaries in the field-file
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 29, 2008, 08:37
Default Ok, Thank you Bernhard. Now,
  #10
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Ok, Thank you Bernhard.
Now, I got it regarding the frontAndBackPatches_pos/neg.

I created new BC for the positive and negatice wedge faces and deleted the old entry.

The mesh looks good, but still I can't get the meaning of collapseEdges.
Running the collapseEdges -h gives me the familiar output:
Usage: collapseEdges <root> <case> <edge> <merge>


--> FOAM FATAL ERROR : Wrong number of arguments, expected 4 found 0
Invalid option: -h


But I'm still not enlighted.
Using the collapseEdge like "collapseEdge . . 30e-3 5" (30e-3 is the length of domain) gives a whole crowd of messages like this:

Cell:2516 uses faces:6(4975 38275 41439 60756 4498 4973) of which too many are marked for removal:
41439 60756 4498 4973


and at the end:

Morphing ...
Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:0.896123
Collapse area factor:1e-09
Collapse area:8.96123e-10
Collapsing 0 small high aspect ratio faces
Writing collapsed mesh to time 1e-06
End


Now I can use the funkySetFields to initialize my two phase problem and started to calculate with interFoam.
Strange to me, the simulation is running FAR to fast, but the interface is not moving at all.
I know the physical behavious from a similar case.

So, the mesh "looks" good but due to the fact that the interface is not moving I think there is still something wrong.

If you want to have a look.
This time the file should not be corrupt:
http://therealsega.th.funpic.de/open...AxiMesh.tar.gz
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   October 28, 2009, 12:51
Default
  #11
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8
florian_krause is on a distinguished road
Hi guys,

I want to re-open the discussion between Sebastian and Bernhard. I am using makeAxialMesh with some slight modifications to be able to compile it under my OF-1.6.x.

makeAxialMesh -axis ... -wedge ... -> runs without problems, grid look fine

collapseEdges 0.001 170 -> runs without problem, I got the following output

Create time

Create polyMesh for time = 0

Merging:
edges with length less than 0.001 meters
edges split by a point with edges in line to within 170 degrees

Collapsing 101 small edges
Morphing ...
Collapsing 0 small edges
Collapsing 0 in line edges
Max face area:0.00250237718349
Collapse area factor:1e-09
Collapse area:2.50237718349e-12
Collapsing 0 small high aspect ratio faces
Writing collapsed mesh to time 0.05
End


when I run the checkMesh on the new grid with the collapsed edges I get the following output

Mesh stats
points: 2121
internal points: 0
faces: 4010
internal faces: 1890
cells: 1000
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 900
prisms: 100
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
frontAndBackPlane 0 0 ok (empty)
InOutlet 20 42 ok (non-closed singly connected)
center 0 0 ok (empty)
pipe_wall 100 202 ok (non-closed singly connected)
frontAndBackPlane_pos1000 1111 ok (non-closed singly connected)
frontAndBackPlane_neg1000 1111 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 4.03063173324e-05) (5 0.5 0.0436596936827)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
***Number of edges not aligned with or perpendicular to non-empty directions: 2020
<<Writing 2121 points on non-aligned edges to set nonAlignedEdges

Boundary openness (5.05184045313e-19 -8.16550549354e-16 -5.37567505446e-16) OK.
Max cell openness = 1.65706464942e-16 OK.
Max aspect ratio = 22.9255856257 OK.
Minumum face area = 0.000109048468415. Maximum face area = 0.00250237718349. Face area magnitudes OK.
Min volume = 5.45242342075e-06. Max volume = 0.000103596044993. Total volume = 0.0545242342067. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.330801283002 OK.

Failed 1 mesh checks.


so somehow it seems that the collapseEdges didnt work properly with my options on my case. Or is this another problem?! Any ideas?

cheers,
Florian
florian_krause is offline   Reply With Quote

Old   October 28, 2009, 17:01
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by florian_krause View Post
I want to re-open the discussion between Sebastian and Bernhard. I am using makeAxialMesh with some slight modifications to be able to compile it under my OF-1.6.x.
Re-open: I realized I never answered to Sebastians last post. But I guess the problem went away in the mean-time

Quote:
Originally Posted by florian_krause View Post
makeAxialMesh -axis ... -wedge ... -> runs without problems, grid look fine

collapseEdges 0.001 170 -> runs without problem, I got the following output

<snip>

Failed 1 mesh checks.

so somehow it seems that the collapseEdges didnt work properly with my options on my case. Or is this another problem?! Any ideas?
checkMesh for the mesh after makeAxialMesh showed no such problems? Then try using the mesh without collapsing and set the axis boundary to symmetry (or zeroGradient)
gschaider is offline   Reply With Quote

Old   October 29, 2009, 09:11
Default
  #13
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8
florian_krause is on a distinguished road
Hi Bernhard,

I did a checkMesh on the grid and here is the output

Mesh stats
points: 2222
internal points: 0
faces: 4110
internal faces: 1890
cells: 1000
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 1000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
frontAndBackPlane 0 0 ok (empty)
InOutlet 20 44 ok (non-closed singly connected)
center 100 202 ok (non-closed singly connected)
pipe_wall 100 202 ok (non-closed singly connected)
frontAndBackPlane_pos1000 1111 ok (non-closed singly connected)
frontAndBackPlane_neg1000 1111 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 4.03063173324e-05) (5 0.5 0.0436596936827)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
***Number of edges not aligned with or perpendicular to non-empty directions: 2020
<<Writing 2222 points on non-aligned edges to set nonAlignedEdges

Boundary openness (5.07768106926e-19 -8.16550549354e-16 -5.37567505446e-16) OK.
Max cell openness = 1.65706464942e-16 OK.
Max aspect ratio = 22.9255856257 OK.
***Zero or negative face area detected. Minimum area: 0
<<Writing 100 zero area faces to set zeroAreaFaces

Min volume = 7.47743760209e-06. Max volume = 0.000103596044993. Total volume = 0.0561517870683. Cell volumes OK.
Mesh non-orthogonality Max: 76.4964690725 average: 12.7337115278
*Number of severely non-orthogonal faces: 32.
Non-orthogonality check OK.
<<Writing 32 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 83 faces are incorrectly oriented.

<<Writing 83 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 7.40663060245, 84 highly skew faces detected which may impair the quality of the results
<<Writing 84 skew faces to set skewFaces

Failed 4 mesh checks.


I am not sure about the first error message, for the second I guess its just collapsed faces from the axis patch, the third one I am again not sure about it, and the last one i guess is just that i have needle-like volumes.

so I guess I have to use collapseEdges, just with the proper option settings....

I attached the original polyMesh directory after I converted from fluent .cas to OF format. If you would have a minute to have a look at it, would be really nice and helpful,.... maybe there is something wrong with the original grid

thanks and best,
Florian
Attached Files
File Type: zip polyMesh_after_fluentMeshToFoam.zip (41.7 KB, 7 views)
florian_krause is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal faces from gmsh how to create patches in OpenFoam podallaire Open Source Meshers: Gmsh, Netgen, CGNS, ... 27 April 25, 2012 21:24
Extension of fluentMeshToFoam internal cells and faces gschaider OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 34 January 2, 2011 11:01
TGridFluent mesh with internal by prism layer and internal face for diagnostic sponiar OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 March 30, 2009 15:02
FluentMeshtoFoam with internal solid surface mayank OpenFOAM Meshing & Mesh Conversion 3 May 30, 2007 02:57
Undefined internal faces becoming default patches hjasak OpenFOAM Pre-Processing 1 June 16, 2006 10:25


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