CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [cfMesh] Inner patch boundary badly reconstructed by mesh (https://www.cfd-online.com/Forums/openfoam-community-contributions/221751-inner-patch-boundary-badly-reconstructed-mesh.html)

celestial October 28, 2019 20:39

Inner patch boundary badly reconstructed by mesh
 
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

Krao October 29, 2019 01:50

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

celestial October 29, 2019 15:41

With pictures and other useful details
 
3 Attachment(s)
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

Krao October 30, 2019 01:40

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.

celestial October 31, 2019 14:46

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 November 18, 2019 22:18

please go to this other thread I started for my final reply:


https://www.cfd-online.com/Forums/op...integrity.html


All times are GMT -4. The time now is 00:13.