|
[Sponsors] |
[mesh manipulation] How to use refineHexMesh just in 2 direction? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2013, 15:58 |
How to use refineHexMesh just in 2 direction?
|
#1 |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 15 |
Hi all,
I am simulating a case with a very large mesh (>40 million). I need to generate a coarse mesh first, and decompose it, and then refine the mesh using refineMesh. Unfortunely, refineMesh just "refine" the mesh but it can not interpolate the initial value so I need to use refineHexMesh instead. But again, refineHexMesh will automatically refine the mesh in all x,y,z direction, which is not what I want. In wall-normal direction (y), I need to control the mesh directly and I will specify the mesh distribution in the coarse mesh and I just want to refine in the x, and z direction. I can just refine in x,z direction using refineMesh (I can add some lines in refineMeshDict), but I can not do similar thing by using refineHexMesh. So is there any way I can do it? I tried many ways but all failed... Tons of thanks in advance! Best regards, Last edited by ripperjack; November 2, 2013 at 20:14. |
|
October 28, 2013, 16:52 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Ping,
Just a quick question: have you tried looking at the source code of refineMesh and refineHexMesh to see if it would be possible to add the map fields feature to refineMesh? On the other hand, do you want to only refine in 2 directions because the case is in 2D or is there another reason? Best regards, Bruno
__________________
|
|
October 29, 2013, 09:37 |
|
#3 | |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 15 |
Quote:
Thanks very much, I took a look at the source code of refineMesh, refineHexMesh. They are very different, I took a shoot to add something into refineMesh but no success yet, I will keep trying. Anyway it is a good suggestion thanks! BTW: I want to just refine in x, z direction because in y direction, the mesh is not uniform, and I want to explicitly control the grid distribution, e.g., the first grid above the wall, how many grid below y+=10, etc. I do not know if I can get the same grid distribution by using refineMesh in y direction. Regards, Last edited by ripperjack; November 2, 2013 at 20:14. |
||
November 2, 2013, 18:17 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ping,
I gave it a try myself, but refineMesh uses one way of cutting meshes that seems to be very different from the refineHexMesh one, where the latter relies on polyTopoChange to map the fields from one mesh to the other. Therefore, it's not possible to easily adapt the code from one to another Nonetheless, have you tried using mapFields with these options? Code:
mapFields -parallelSource -parallelTarget Best regards, Bruno
__________________
|
|
November 2, 2013, 20:13 |
|
#5 | |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 15 |
Quote:
Wow, this works perfect, and it is exact what I need! Tons of thanks! Have a great weekend! Regards, |
||
April 8, 2014, 17:19 |
|
#6 |
New Member
Dr. Chatur Ramalingum
Join Date: Jul 2012
Posts: 5
Rep Power: 14 |
Dear Mr. Wyldcat:
Sir, I would to understand the differences between refineMesh and refineHexMesh. It seems that refineMesh can be run soon after we run blockMesh to create the initial coarse mesh. With refineHexMesh, it appears that we are required to run cellSet before running refineHexMesh. Is this true? Is there an example that shows how to use refineHexMesh and cellSet. I checked the tutorials in OF2.3.x, but was not able to find an example. Thanking you, Chatur |
|
April 13, 2014, 16:19 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Chatur,
On the wiki there is a bit more information: Essentially the refineHexMesh utility is a specific implementation of some features used in refineMesh, more specifically, it only takes care of refining hexahedral cells. As for a tutorial that demonstrates using refineHexMesh, run this command: Code:
find $FOAM_TUTORIALS -name Allrun | xargs grep refineHexMesh Best regards, Bruno
__________________
|
|
May 21, 2014, 19:53 |
|
#8 |
Member
Lucas Mutti
Join Date: Aug 2013
Posts: 47
Rep Power: 14 |
Hey guys,
I have a mesh that I have developed in Fluent - roughly 2 million cells - and I was wondering if I could use refineMesh settings to refine it even more in OpenFOAM. The reason why I do not want to refine it in Fluent is because I cannot control the number of elements of refinement. On top of the that I am dealing with an unstructured grid meshed as tets. Would it be possible to do so? Cheers |
|
May 31, 2014, 14:43 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Lucas,
I would advise you against using tetrahedral cells for OpenFOAM simulations cases. They can be used, but additional care must be taken into account when generating the mesh... well, in general, one should be always careful when generating a mesh, but with tets more care is required. To give you an idea of what I'm talking about, have a look into this blog post: OpenFOAM: Interesting cases of bad meshes and bad initial conditions Nonetheless, although I have not tested this yet, I do believe that refineMesh should be able to refine tetrahedral cells, i.e. decompose them into smaller tetrahedral cells. Best regards, Bruno
__________________
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ERROR: Flow direction on the boundaries must not be tangential to the boundary. | turbomax | CFX | 3 | October 27, 2024 07:19 |
Advective BC with specified direction (outlet-velocity) | uckmhnds | OpenFOAM Running, Solving & CFD | 0 | August 19, 2018 21:50 |
Flow Direction: normal to boundary!!! | Atit | CFX | 1 | August 2, 2015 14:42 |
Changing inflow velocity direction deteriorates lift and drag | ziggo | FLUENT | 3 | July 24, 2013 09:39 |