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/)
-   -   [mesh manipulation] How to create patch after snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing/61510-how-create-patch-after-snappyhexmesh.html)

bholbek December 15, 2008 08:14

Hi, an other problem relate
 
Hi,

an other problem related to the patch concerns curved surfaces. For example, i have an inlet which is a curved sufrace. Using snappyHexMesh, i can see that a important part of my inlet is made of holes! I think it comes form hexahedral cells which have been removed when 50% or more of their volume lies out of the region of interest.
Could it be due to bad snapping parameters?
I'm using this ones:
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;

//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;

//- Number of mesh displacement relaxation iterations.
nSolveIter 30;

//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
}

Could someone help me?

Thank you

Bastien

idrama January 15, 2010 17:09

Hello bholbek,

you mentioned an interesting point. What is supposed to to with defualtPatches defined by the blockMeshDict. Have you already gotten some answer or how you have solved this problem.

kind rigards

Elise February 17, 2012 09:14

help on creating patches
 
2 Attachment(s)
I'm trying to create patches from multiple stl files
I tried as posted in the previous post
but I get the error:

keyword castellatedMeshControl is undefined
Is there something wrong with the file?

danvica March 11, 2012 05:23

2 Attachment(s)
Dear All,
I'm new to snappyhexmesh and me too I hit the same problem (holes into the patches).

See pictures.


I'm still doing tests but if someone knows the solution I appreciate, thanks.

Daniele

Elise March 11, 2012 06:21

This is strange, did you set up different levels at the inlet?
Maybe try the same level of refinement and a bit higher level of refinement?

danvica March 11, 2012 09:45

Even with the same refinement setup I've got the same problem.

A little explanation of what I'm doing:

I'm trying to setup patches using a stl files.
It's just a simple pipe with an inlet and an outlet (oh, yes, what else...;))

I defined the faces in Salome and exported three different files: one is for full geometry, one for the inlet face and the other for the outlet one.

In snappyHexMeshDict I use:

Code:

geometry
{
    CFD_TUBO.stl
    {
        type triSurfaceMesh;
        name tubo;
    }
 
    inlet.stl
    {
        type triSurfaceMesh;
        name inlet;
    }
 
    outlet.stl
    {
        type triSurfaceMesh;
        name outlet;
    }
};

and

Code:

refinementSurfaces
  {
        tubo
        {
            level (2 3);
        }
        inlet
        {
            level (2 3);
        }
        outlet
        {
            level (2 3);
        }
    }

This way the meshing goes without errors and parafoam let me see the patches (but with the holes).

Maybe the holes are caused by the file of the full geometry that already contains the faces included in the inlet/outlet stl files.

I do this way because, in general, I think it would be more comfortable to define just the patches and leave the other faces undefined.

I don't know whether I was able to explain...
In order to define patches in stl geometry, do I have to export all and only the surfaces (sure, grouped by their function, in my case still 3 files) ?


Daniele

danvica March 11, 2012 10:17

Yes, you have to define a stl file for each of the patches.

No overlapping faces seem to be allowed.

This way I solved the holes problem.

Daniele

mihaipruna March 13, 2012 09:42

Quote:

Originally Posted by danvica (Post 348793)
Yes, you have to define a stl file for each of the patches.

No overlapping faces seem to be allowed.

This way I solved the holes problem.

Daniele

Does that mean that the option of having a single STL file with multiple solids does not work?

danvica March 13, 2012 10:06

Well, I'm just a beginner so be carefull with my advices.

Anyway ,my problem was having several overlapping surfaces.

I think there's no problem in having multiple not-overlapping patches.

Daniele

mihaipruna March 13, 2012 10:51

thanks Daniele

tjliang April 30, 2014 07:19

hi,Pei. I have the same problem with you. Have you solved your problem at last. If so, could you please tell me how is that solved?

student666 May 6, 2014 13:06

Hi Daniele,

I'm facing same problem, do you mean work-flow should be like this?

- realize your CAD geometry
- explode into faces
- make group of faces (inlet, outlet, walls)
- export every single group of faces as STL ascii
- write every geometry file into SHM dict.

sounds correct to you?

danvica May 6, 2014 14:49

Yes. These are the steps I follow.

Yeru July 17, 2017 08:15

Non-closedness after removing patch surfaces
 
1 Attachment(s)
Dear all,

2014 is long gone - still, I am thankful for your thread since I have the same issues: a fractured patch, just like user danvicas images show.

I have compressed a minimal working example (MWE) below.

Yes, I use individual .stl files for each patch.
Yes, I use the same refinement levels.

But geometrically speaking, it is impossible to remove overlapping surfaces - and that's a problem:
I have the whole geometry (wall+inlet+outlet) as an .stl file.

When I try to remove the outlet face in the whole file manually, e.g. by using blender, I create a non-closed geometry.
Code:

snappyHexMesh -checkGeometry
complains and cannot run.

I even tried redistributing the nodes in the whole geometry:
  1. compare whole.stl with inlet.stl (or outlet.stl)
    save difference in diff.stl
    (contains all inlet nodes)
  2. erase lines in diff.stl from whole.stl
    (s.t. whole.stl contains only non-inlet nodes)
  3. append diff.stl to whole.stl
    (s.t. all inlet nodes are in their own "solid/endsolid" wrapping.
And still, it doesn't work :(


How did you all get past this?
Thanks again for the previous discussion!
Yeru


All times are GMT -4. The time now is 22:04.