CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] Inner patch boundary badly reconstructed by mesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2019, 21:39
Default Inner patch boundary badly reconstructed by mesh
  #1
New Member
 
Join Date: Mar 2019
Posts: 23
Rep Power: 2
celestial is on a distinguished road
Hi to all

I first created in Salome, a 2m x 2m x 2m cube with one face containing a .5m x .5m square in its center.

Then, always in Salome, this inner square became one patch, the box face minus that inner patch became the outer patch the rest of the cube enclosure another patch. (using Create Groups under Geometry)

Next, I performed the python script extraFeatureEdges, then computed the mesh with the NetGen 1D-2D algorithm and added the 3 patches and feature edges to it.

Then, the python script salomeTriSurf yielded the .fms file. After converting .fms to .vtk, Paraview can display the triangular mesh.

Finally, in meshDict (called by the cartesianMesh command of cfMesh)
I set

maxCellSize = .4;

I observe that the sum of the values of nFaces for the inner and outer patch in polyMesh/boundary equals the number of faces that are displayed for that side of the cube.
When the polyMesh data was opened in Paraview, I thought I would see the boundary between the inner and outer patches completely covered by edges of some of these faces (or edge parts). Instead, I only see edges crossing it.

The mesh is somewhat altered (but not improved) by setting either keepCellsInserctingBoundary to 1 or keepCells to 1 for the inner patch in the keepCellsInserctingPatches dictionary. And no amount of tweaking with localRefinement, objectRefinements dictionaries has any effect on the mesh.

On the other hand, the outline of this boundary becomes more faithfully reproduced by the mesh as the value of maxCellSize or the value of minCellSize decreases. Unfortunately for me, I will soon need a refinement of some sort around a much smaller (.005m x .03m) patch on an airplane wing that is housed in a wind tunnel, I don't want to waste memory space or execution time on a mesh consisting of say ten billion cells.

Frankly, I don't know if cfMesh can handle this problem.

Regards,
Marc
celestial is offline   Reply With Quote

Old   October 29, 2019, 02:50
Default
  #2
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 105
Rep Power: 3
Krao is on a distinguished road
Hi,

By seeing the post I would consider it as a simple case and cfMesh can handle it easily, but if you can add some pictures and meshDict of course you can get useful inputs from the community. As the old saying goes, 'a picture is worth a thousand words'!

K. Rao
Krao is offline   Reply With Quote

Old   October 29, 2019, 16:41
Default With pictures and other useful details
  #3
New Member
 
Join Date: Mar 2019
Posts: 23
Rep Power: 2
celestial is on a distinguished road
First, test112.jpg (conversion from the input test112.fms - this is what I see in Paraview)

(test112.fms can be seen at top of meshDict.txt)

My inner patch is called topelec in meshDict.txt (As an aside, I also tried the removeCellsIntersectingPatches dictionary
after this post but again to no avail.)

And this is an excerpt from the top of file polyMesh/boundary:

the outer patch to inner patch on one box side is named aroundtiny
the farfield patch includes all other box sides

3
(
aroundtiny
{
type wall;
nFaces 32;
startFace 876;
}

farfield
{
type wall;
nFaces 180;
startFace 908;
}

topelec
{
type wall;
nFaces 8;
startFace 1088;
}

)

)

in badface.jpg you can see that the 8 faces of topelec do not make up a .5m x .5m square

Any comments welcome

Marc
Attached Images
File Type: jpeg test112.jpeg (33.1 KB, 4 views)
File Type: jpeg badface.jpeg (39.7 KB, 3 views)
Attached Files
File Type: txt meshDict.txt (1.6 KB, 1 views)

Last edited by celestial; October 29, 2019 at 16:43. Reason: typo in title
celestial is offline   Reply With Quote

Old   October 30, 2019, 02:40
Default
  #4
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 105
Rep Power: 3
Krao is on a distinguished road
Your grid size is greater than the feature itself, reduce your max cell size. Use patch refinements. Go through the cfMesh manual, you'll find a lot.

As of now reduce the max cell size from 0.4 to 0.1 at least.

Last edited by Krao; October 30, 2019 at 05:15. Reason: typo
Krao is offline   Reply With Quote

Old   October 31, 2019, 15:46
Default
  #5
New Member
 
Join Date: Mar 2019
Posts: 23
Rep Power: 2
celestial is on a distinguished road
Thanks for replying twice Kmeti, but I had already read the whole cfMesh user guide before starting this thread. To me, regardless of the maxCellSize (or boundaryCellSize) value, it would make sense to be able to do a local refinement. Right now, I started investigating meshDict in all of their tutorials and I hope it will eventually bear fruit. Best, Marc.
celestial is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Wind turbine simulation Saturn CFX 57 February 6, 2018 06:09
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


All times are GMT -4. The time now is 16:31.