CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] refineMesh Problems: strange cells/cuts were added

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By wyldckat
  • 1 Post By wyldckat
  • 1 Post By bjoern1
  • 1 Post By wyldckat
  • 1 Post By Chief-CeTe
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2015, 06:01
Default refineMesh Problems: strange cells/cuts were added
  #1
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
Hello together!

I tried to refine my mesh via the refineMesh in OpenFoam 2.3.0. My mesh has a cylinder, surrounded by cuboid. As you can see in the pictures there is a problem with the inner cells.
I used patchLocalCoeffs as follows:
Code:
patchLocalCoeffs
{
    // Normal direction is face normal of zero'th face of patch
    patch           front;
    tan1            ( 1 0 0 );
    tan2            ( 0 1 0 );
}
CheckMesh -allGeometry -allTopology gives the following error:

Code:
 ***Concave cells (using face planes) found, number of cells: 142
  <<Writing 142 concave cells to set concaveCells
Does anyone have experience with the same error?

Thanks a lot for your help!
Attached Images
File Type: png refineM.png (141.1 KB, 269 views)
File Type: png refineM2.png (17.5 KB, 175 views)
File Type: png refineM3.png (29.9 KB, 191 views)
bjoern1 is offline   Reply With Quote

Old   December 19, 2015, 13:38
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick questions:
  1. What is the complete "refineMeshDict" you used?
  2. Can you share your case?
    • If not, can you reproduce this error with OpenFOAM's tutorial mesh "stressAnalysis/solidDisplacementFoam/plateHole/"?
__________________
wyldckat is offline   Reply With Quote

Old   December 21, 2015, 05:54
Default
  #3
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
Hello Bruno,

I created 2 reduced test-cases (One for both sides, because of the different amount of cells). The error can be reproduced with the following commands:

Code:
blockMesh
topoSet -dict system/topoSetDict_refine
refineMesh -dict system/refineMeshDict
I also tried to reproduce the error with my refineMeshDict in the plateHole case, but it refined without a problem.

Thanks a lot for your help!
Attached Files
File Type: gz refineMeshTestCase.tar.gz (23.4 KB, 83 views)
bjoern1 is offline   Reply With Quote

Old   January 2, 2016, 08:01
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Björn and a Happy New Year!

I finally bring good news on this! The solution is to change the referential you're using from this:
Code:
patchLocalCoeffs
{
    // Normal direction is face normal of zero'th face of patch
    patch           front;
    tan1            ( 1 0 0 );
    tan2            ( 0 1 0 );
}
To something like this:
Code:
patchLocalCoeffs
{
    // Normal direction is face normal of zero'th face of patch
    patch           front;
    tan1            ( 1 1 0 );
    tan2            ( -1 1 0 );
}
As for the actual problems, here is the diagnosis:
  1. In the first attached image "the_actual_problem_using_polyhedrons.jpg" is shown the actual cell shapes, when compared to the shapes you showed in the other images. The reason for the different renders is pretty much explained here: http://openfoamwiki.net/index.php/FA...is_in_ParaView
  2. The attached image "side_by_side_direction1.jpg" shows what happens if we only do the direction 1 "tan1" of the refinement. I only selected 2 cells to be refined.
  3. The attached image "Number_2D_points.png" shows the number of points each face has got in the shown image, after the "tan1" refinement occurred. The problem revealed here is that there are 2 cells are are in fact no longer hexahedral cells, i.e. each cell doesn't only have 6 faces. The faces tagged with the 5 marker have 5 points from our point of view, which equates to cells with 7 faces.
  4. The attached image "Number_2D_points_result.png" shows the result of the second cut over "tan2", which resulted in the faces tagged with 4 to be properly cut, but the one tagged with 5 got a bad cut.
    • The reason for the bad cut is actually very simple: the cut had to be done based on the centre of the cell and the plane that has the normal defined by the local "tan2" for this tagged "5" cell. Notice that the bad cut goes through the centre of that "tan1" refined cell.
The origin of the problem might not be very clear, but the problem is that given the original "tan1" and "tan2" directions, resulted in the actual cell cutting directions to depend on how they were aligned with each reference direction. That is demonstrated in the last 2 pictures, where the "tan1" refinement resulted in different direction cuts.

This is why using a different direction referential solved the problem, since the new referential is more closely aligned with the desired cuts.

As a fun fact, if we use the original referential and the 3 directions:
Code:
directions      
(
        tan1
        tan2
        normal
);
we get the result shown in the attached image "hilarious_3directions_pure_hex.jpg", because the pure hexahedral cutting is used and it gets confused with the given cutting directions


As for diagnosing this, it took me quite a while to debug it I assumed that this was a bug, so it took something like 4 to 6 hours to diagnose, spread across a few days (hence taking a bit longer to restart where I left off the day before). I spotted a few issues and I will propose a bug fix of it... even if it's just warning messages with a suggestion for a fix for the user.

edit: Bug/feature report submitted: http://www.openfoam.org/mantisbt/view.php?id=1960

Best regards,
Bruno
Attached Images
File Type: jpg the_actual_problem_using_polyhedrons.jpg (69.3 KB, 228 views)
File Type: jpg side_by_side_direction1.jpg (46.1 KB, 180 views)
File Type: png Number_2D_points.png (10.2 KB, 171 views)
File Type: jpg Number_2D_points_result.jpg (55.1 KB, 161 views)
File Type: jpg hilarious_3directions_pure_hex.jpg (69.4 KB, 200 views)
amolrajan and becher97 like this.
__________________

Last edited by wyldckat; January 2, 2016 at 11:15. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   January 4, 2016, 05:33
Default
  #5
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
Hi Bruno! Happy New Year!

thanks a lot for your time and help, I really appreciate it. So when I use refineMesh on the quadrant it works really well, but unfortunately I need to refine at least a semi-circle. This is because my geometry, in a bigger picture, doesnt have enough symmetry for a quadrant. As you can see in the attached pictures, the new patchLocalCoeffs only shift the problem to the global coordinates.(I have used parafoam -builtin for rendering now)

Do you think there is also an opportunity to mesh semi or full circles?

Many greetings!

Björn
Attached Images
File Type: png oldRefineMeshDict.png (27.3 KB, 82 views)
File Type: png newRefineMeshDict.png (27.8 KB, 75 views)
File Type: png bigPicture.png (29.8 KB, 168 views)
bjoern1 is offline   Reply With Quote

Old   January 4, 2016, 17:35
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
Quote:
Originally Posted by bjoern1 View Post
I have used parafoam -builtin for rendering now
That alone isn't enough. The detail is that you must use the Polyhedron representation. The wiki page explains how this is used for each reader (.OpenFOAM vs .foam).

Quote:
Originally Posted by bjoern1 View Post
Do you think there is also an opportunity to mesh semi or full circles?
I was afraid you might need that. Please try intermediate angles, such as:
Code:
tan1 (1 0.5 0);
tan2 (-0.5 1 0);
Or even:
Code:
tan1 (1 0.5 0);
tan2 (1 -0.5 0);
Hopefully this will work, because the Hex option is used, which should enforce pure hexahedral cuts, even if tan1 doesn't make 90 degrees with tan2.

If this doesn't work, then we'll need to implement some way to make the orientations uniform with the original mesh... something like refining all 2 or 3 directions at the same time, instead of doing each direction, one at a time
amolrajan likes this.
__________________
wyldckat is offline   Reply With Quote

Old   January 5, 2016, 05:17
Default
  #7
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
Hi Bruno!

I tried the following configurations for the patchLocalCoeffs (I attached the pictures):

Code:
A:
tan1            ( 1 0 0 );
tan2            ( 0 1 0 );
Code:
B:
tan1            ( 1 1 0 );
tan2            ( -1 1 0 );
Code:
C:
tan1 (1 0.5 0);
tan2 (-0.5 1 0);
Code:
D:
tan1 (1 0.5 0);
tan2 (1 -0.5 0);
Code:
E:
tan1 (1 0.1 0);
tan2 (1 -0.1 0);
Code:
F:
tan1 (1 0.5 0);
tan2 (-1 0.5 0);
C & D are the ones you suggested. I also tried some more intermediate angles. Sadly they all didnt work out. For some of them, the results are very similiar.
Attached Images
File Type: png coeffsA.png (25.7 KB, 72 views)
File Type: png coeffsB.png (27.1 KB, 61 views)
File Type: png coeffsC.png (25.5 KB, 60 views)
File Type: png coeffsD.png (27.8 KB, 53 views)
File Type: png coeffsE.png (26.7 KB, 61 views)
amolrajan likes this.
bjoern1 is offline   Reply With Quote

Old   January 5, 2016, 05:19
Default
  #8
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
and the picture of the latest formation...
Attached Images
File Type: png coeffsF.png (22.9 KB, 52 views)
bjoern1 is offline   Reply With Quote

Old   January 6, 2016, 18:00
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Björn,

Then the only solution I can think of, will require programming into OpenFOAM. I'll try to have a solution for this on the upcoming weekend.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 8, 2016, 08:31
Default
  #10
New Member
 
Björn N.
Join Date: Jun 2013
Posts: 11
Rep Power: 12
bjoern1 is on a distinguished road
Hi Bruno!

thank you so much for your help! By now I use a workaround, without refining the mesh. Of course it is still interesting how non-trivial meshes can be refined.

Best regards,

Björn
bjoern1 is offline   Reply With Quote

Old   February 21, 2016, 12:07
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Björn,

Sorry for the late reply, but only today did I finally manage to complete the contribution for refineMesh: http://www.openfoam.org/mantisbt/view.php?id=2004

A ton of details are provided there-in, but if you want, I can provide a custom utility that does the same features as the contribution. Although I need you to remind me which OpenFOAM version you are using, if you still need this.

Best regards,
Bruno
Sun likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 29, 2016, 06:44
Default
  #12
New Member
 
Thorben Schröder
Join Date: Feb 2016
Posts: 2
Rep Power: 0
Chief-CeTe is on a distinguished road
Hello Bruno,

I am working with Björn and answering in his behalf since he is not availlabe at the moment.
Thank you so much for your great work! It is great seing you put so much effort into this.
In fact, we are still interested eventhough we worked arround the problem in one case. There will be others following where we can't.
We use OF 2.3.0 at the moment but installing a newer version for the refineMesh would be possible as well.

Best regards ans thanks again,
Thorben
wyldckat likes this.
Chief-CeTe is offline   Reply With Quote

Old   October 2, 2017, 21:23
Default
  #13
Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 14
Sugajen is on a distinguished road
Hi all,

This looks like an old post but I thought you guys will be able to give some guidance on my similar issue.
I am trying to refine my entire geometry using refineMesh. But it throws a lot of warnings. It also creates a bunch of .obj files like anchors_169445.obj, cell_830619.obj,cellLoop_655655.obj while refining.
I tried changing the directions as done in posts above but no luck. Is there anything in particular that should be changed in the refineMeshDict ? or is it geometry specific ? Any help will be very helpful

refineMeshDict
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name forRefinement;
        type cellSet;
        action new;
        source boxToCell;
        sourceInfo
        {
            box (0.02411732 0.01826876 -0.09695647) (0.05348801 0.04984307 -0.05463678);
        }    
    }
    
);
Warnings
Code:
--> FOAM Warning : 
    From function void Foam::cellCuts::setFromCellCutter(const Foam::cellLooper&, const Foam::List<Foam::refineCell>&)
    in file meshCut/cellCuts/cellCuts.C at line 2241
    Found loop on cell 208 that resulted in an unexpected bad cut.
    Suggestions:
      - Turn on the debug switch for 'cellCuts' to get geometry files that identify this cell.
      - Also keep in mind to check the defined reference directions, as these are most likely the origin of the problem.
Thanks,
Sugajen
Sugajen is offline   Reply With Quote

Old   October 31, 2018, 09:52
Default
  #14
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 7
lukasf is on a distinguished road
Hi,

I want to address two issues with the refineMesh utility. I am using OpenFOAM 4.1.

1.)
First of all I, do not really understand the use of the patchLocalCoeffs after switching to coordinateSystem patchLocal.

At https://openfoamwiki.net/index.php/RefineMesh there is a description of a refineMeshDict.

On the one hand it states that the coordinate system is DIFFERENT for every cell when the patchLocalCoeffs is used and on the other and it states that the normal direction is the face normal of zero'th face of patch (hence all the cells have the SAME coordinate system). In my opinion, this would only be true if the normal direction of the face normal of the zero’th face of the patch is the same for all cells.

Therefore, I do not understand the comment of wyldckat with respect to bjoern1’s issue.
He uses the front patch to define the normal vector which should lead to a normal vector with the components of ( 0 0 1 ) in the example. Hence, this resulting normal vector would be the same if a global coordinate system is be used with the definition of tan1 ( 1 1 0 ) and tan2 ( -1 1 0 ).

Moreover, why is it necessary to define a second direction tan2? I thought to only define the patch to get the patches normal (either of the zero’th face of the path or of all cells) and to define tan1.
In an orthogonal coordinate system the direction tan2 would be defined due to tan1 and the defined normal vector.


2.)
I am trying to refine a mesh. My aim is to refine a mesh at custom locations as often as I want. I refine the locations of the mesh by selecting cells using a topoSetDict and then I use a refineMeshDict to cut those cells. By repeating this process I can get the refinement level I need. When refining a region the cells in the topoSet region are hexahedron cells but at the border of the topoSet the cells turn into polyhedron cells. I think that this is going to be the problem I have. The problem occurs when the cells are not perfectly rectangular to each other.


Hence, I have uploaded two test cases to show you my issue. The cases are called 0_understandRefineMesh and 1_understandRefineMesh. Use the Allrun script to create the final mesh. Basically I use these commands:

Quote:
topoSet -dict system/topoSetDict.globalRefinement1
refineMesh -dict system/refineMeshDict.globalRefinement1
topoSet -dict system/topoSetDict.globalRefinement2
refineMesh -dict system/refineMeshDict.globalRefinement2
The first globalRefinement1 marks a big region and globalRefinement2 marks a smaller region. If you run the commands the other way around (Allrun_wrong_command_order)

Code:
topoSet -dict system/topoSetDict.globalRefinement2
refineMesh -dict system/refineMeshDict.globalRefinement2
topoSet -dict system/topoSetDict.globalRefinement1
refineMesh -dict system/refineMeshDict.globalRefinement1
(note the change of the index 2 and 1), the issues arise when the cells are not perfectly rectangular.

Hence, there is no problem in the case 0_understandRefineMesh because there are only rectangular cells in the mesh. The case 0_understandRefineMesh represents a square cube (perf_cube_3).
In 1_understandRefineMesh one side of the cube is slightly skewed, which results in skewed cells on two sides of the cube. Here the order of the commands is important. (Allrun_wrong_command_order will not work perfectly and ugly cells are created!)
Attached Images
File Type: jpg perf_cube_3.jpg (83.2 KB, 104 views)
File Type: jpg skewed_block_3.jpg (80.2 KB, 94 views)
File Type: jpg skewed_block_wrong_command_order_3.jpg (80.4 KB, 96 views)
File Type: jpg skewed_block_wrong_command_order_2.jpg (63.0 KB, 117 views)
Attached Files
File Type: zip lukas_test_cases.zip (86.1 KB, 22 views)

Last edited by lukasf; November 6, 2018 at 02:40.
lukasf is offline   Reply With Quote

Old   November 1, 2018, 12:17
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Sugajen: I hope you've solved you issue since then. Without more specific details, it's nearly impossible to deduce what went wrong exactly.


@Lukas: Wow, OK, it's going to take me a while to answer to all of these... here we go:
Quote:
Originally Posted by lukasf View Post
1.)
First of all I, do not really understand the use of the patchLocalCoeffs after switching to coordinateSystem patchLocal.
OK, let's see what I can remember what I saw in it the last time I looked into it... without having to review it again...

Quote:
Originally Posted by lukasf View Post
At https://openfoamwiki.net/index.php/RefineMesh there is a description of a refineMeshDict.
Just as a reminder, since you are using a more recent version of OpenFOAM, the information there may be out of date, given that page was created for version 2.1... the updated one for OpenFOAM 4 is this one: https://github.com/OpenFOAM/OpenFOAM...refineMeshDict

Quote:
Originally Posted by lukasf View Post
On the one hand it states that the coordinate system is DIFFERENT for every cell when the patchLocalCoeffs is used and on the other and it states that the normal direction is the face normal of zero'th face of patch (hence all the cells have the SAME coordinate system). In my opinion, this would only be true if the normal direction of the face normal of the zero’th face of the patch is the same for all cells.
Oh... right, I guess that the original intent was both to make it progressive and to not be global-bound... but ended up being hard-coded to the first face on the mentioned patch.
Er... OK, the idea is that every cell will abide to the normal reference of the first face of the specified patch, instead of using the world reference (XYZ).

Quote:
Originally Posted by lukasf View Post
Therefore, I do not understand the comment of wyldckat with respect to bjoern1’s issue.
He uses the front patch to define the normal vector which should lead to a normal vector with the components of ( 0 0 1 ) in the example. Hence, this resulting normal vector would be the same if a global coordinate system is be used with the definition of tan1 ( 1 1 0 ) and tan2 ( -1 1 0 ).
If I remember correctly, my train of thought was that the half-direction was needed for capturing the actual angle, in function of the patch face... OK, not much of an explanation.
Imagine that the reference patch is at a 60 degree angle of the majority of the cells. This means that having an orthogonal angle would not properly catch the desired slicing directions; the detail here is that in that context, it was for an hex-cut, i.e. slice the cell in a perfect half in function of the slice plane.

Not much of an explanation, was it... sorry, let me know if you want me to draw an explanation in more detail on what I'm referring to.

Quote:
Originally Posted by lukasf View Post
Moreover, why is it necessary to define a second direction tan2? I thought to only define the patch to get the patches normal (either of the zero’th face of the path or of all cells) and to define tan1.
In an orthogonal coordinate system the direction tan2 would be defined due to tan1 and the defined normal vector.
The directions are for stating along which directions you actually want to slice, because it's possible to only slice along 1, 2 or 3 directions... which may or may not be all orthogonal to each other, depending on whether we are using pure-hex cutting or geometric cutting.


Quote:
Originally Posted by lukasf View Post
2.)
I am trying to refine a mesh. My aim is to refine a mesh at custom locations as often as I want. I refine the locations of the mesh by selecting cells using a topoSetDict and then I use a refineMeshDict to cut those cells. By repeating this process I can get the refinement level I need. When refining a region the cells in the topoSet region are hexahedron cells but at the border of the topoSet the cells turn into polyhedron cells. I think that this is going to be the problem I have. The problem occurs when the cells are not perfectly rectangular to each other.
They become polyhedra, because of the shared faces that were cut only along on one of the cells that share them... in other words, one cell wasn't cut, the other was, so the shared face was cut into 2 oe 4 faces, depending on the directions.

I vaguely remember that the only way to avoid problems on these interface regions, is to refine them Matrioska-dolls-style (one inside the other). Having a proportion higher than 1 cell to 4 faces can lead to serious simulation problems, so I believe that this is why it is not properly supported by refineMesh nor refineHexMesh.


Quote:
Originally Posted by lukasf View Post
Hence, I have uploaded two test cases to show you my issue. The cases are called 0_understandRefineMesh and 1_understandRefineMesh. Use the Allrun script to create the final mesh. Basically I use these commands:

The first globalRefinement1 marks a big region and globalRefinement2 marks a smaller region. If you run the commands the other way around (Allrun_wrong_command_order)

Code:
topoSetLRT10 -dict system/topoSetDict.globalRefinement2
refineMesh -dict system/refineMeshDict.globalRefinement2
topoSetLRT10 -dict system/topoSetDict.globalRefinement1
refineMesh -dict system/refineMeshDict.globalRefinement1
(note the change of the index 2 and 1), the issues arise when the cells are not perfectly rectangular.

Hence, there is no problem in the case 0_understandRefineMesh because there are only rectangular cells in the mesh. The case 0_understandRefineMesh represents a square cube (perf_cube_3).
In 1_understandRefineMesh one side of the cube is slightly skewed, which results in skewed cells on two sides of the cube. Here the order of the commands is important. (Allrun_wrong_command_order will not work perfectly and ugly cells are created!)
Excellent, test cases are always welcome!

OK, just by looking at the images, it's already possible to see the problems I've also pointed out...
I've inspected the cases and the respective refinement dictionary files and it is due to the algorithm not knowing what to do exactly with a non-hex cell, in order to try and divided it as if it were an hex, so it follows the default geometric-cut protocol that abides to the defined directions.

In pure-hex mode, it follows the directions as a rough guidance on which planes to cut across, i.e. if the mesh is orthogonal along (1 0 0) and you give the direction (0.95 0.05 0.05), it will still catch the direction (1 0 0) since it's the closest one.

This was also why I had to implement and contribute the custom direction field capabilities that were contributed on report https://bugs.openfoam.org/view.php?id=2004 - and which should already be present in OpenFOAM 4. This way you have more control over the direction of how each individual cell is divided.

I think I've answered to all your questions?

Best regards,
Bruno
lukasf likes this.
__________________
wyldckat is offline   Reply With Quote

Old   November 2, 2018, 05:18
Default
  #16
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 7
lukasf is on a distinguished road
Hi Bruno,

thank you very much for your quick and detailed reply. I really appreciate it.

Quote:
Just as a reminder, since you are using a more recent version of OpenFOAM, the information there may be out of date, given that page was created for version 2.1... the updated one for OpenFOAM 4 is this one: https://github.com/OpenFOAM/OpenFOAM...refineMeshDict
Quote:
Oh... right, I guess that the original intent was both to make it progressive and to not be global-bound... but ended up being hard-coded to the first face on the mentioned patch.
Er... OK, the idea is that every cell will abide to the normal reference of the first face of the specified patch, instead of using the world reference (XYZ).
Good reminder. The refineMesh utility has new functions in OpenFOAM 4.1 but the description of patchLocal is still wrong with respect to all cells having individual normal vectors. I will propose changes if possible.

Quote:
They become polyhedra, because of the shared faces that were cut only along on one of the cells that share them... in other words, one cell wasn't cut, the other was, so the shared face was cut into 2 oe 4 faces, depending on the directions.
The interesting thing is that by chance the "wrong command order" works for a mesh with only rectangular cells but not for other meshes with o-grids or skewed cells. Hence, no Matrioska-dolls-style is needed.

Quote:
I vaguely remember that the only way to avoid problems on these interface regions, is to refine them Matrioska-dolls-style (one inside the other). Having a proportion higher than 1 cell to 4 faces can lead to serious simulation problems, so I believe that this is why it is not properly supported by refineMesh nor refineHexMesh.
The Matrioska-dolls-style is really time consuming because of an exact planning of how to refine a mesh. There can also be issues with the tolerance of the selected cells by the topoSetDicts which can lead to an overlap of hexahedron and polyhedron cells or of them being neighbors.

My "wish" would be to be refine whereever the user needs it. One could prevent a flux of lots of small cells into a bigger cell by planning smooth transitions from high refined mesh regions to low refined regions using several topoSets. In my application I like to refine regions in just one direction and in other, adjacent regions to refine all three or just two directions. This is not possible in a mesh which does not have only rectangular cells.

Quote:
This was also why I had to implement and contribute the custom direction field capabilities that were contributed on report https://bugs.openfoam.org/view.php?id=2004 - and which should already be present in OpenFOAM 4. This way you have more control over the direction of how each individual cell is divided.
I will look into this.

Best regards,

Lukas

Last edited by lukasf; November 2, 2018 at 06:41.
lukasf is offline   Reply With Quote

Reply

Tags
refinemesh


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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
[mesh manipulation] checkMesh Erros after refineMesh mgdenno OpenFOAM Meshing & Mesh Conversion 10 October 14, 2014 05:16
Im having some strange problems here xTamx420 FLUENT 0 June 1, 2011 15:00
Problems initializing a turbulence model srinath OpenFOAM Running, Solving & CFD 3 November 27, 2008 10:06
[Commercial meshers] Tgrid tetra mehs with problems braennstroem OpenFOAM Meshing & Mesh Conversion 2 June 18, 2007 03:39


All times are GMT -4. The time now is 10:46.