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

[blockMesh] Meshing a space between convergent plates

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By avila.vc
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2016, 14:41
Default Meshing a space between convergent plates
  #1
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Dear Foamers

My problem seems easy, however I can not solve it (till now at least).

I want to grid a space between to converging plates.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5                                   |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.01;

vertices        
(
/*  (-0.5 -0.5 -0.01)
    (0.5 -0.5 -0.01)
    (0.5 0.5 -0.01)
    (-0.5 0.5 -0.01)
    (-0.5 -0.5 0.01)
    (0.5 -0.5 0.01)
    (0.5 0.5 0.01)
    (-0.5 0.5 0.01)
*/
    (0      5  0.1)//0
    (0      0  0.1)//1
    (0.25 0  0.1)//2
    (1    5  0.1)//3
    (0    5 -0.1)//4
    (0    0 -0.1)//5
    (0.25 0 -0.1)//6
    (0.25 5 -0.1)//7
  

);

blocks          
(
    hex (0 1 2 3 4 5 6 7) (300 30 1) simpleGrading (1 1 1)
);

edges           
(
);
boundary
(
    INLET
    {
        type patch;
        faces
        (
            (0 3 7 4)
        );
    }
    front
    {
        type empty;
        faces
        (
            (0 1 2 3)
        );
    }
    back
    {
        type empty;
        faces
        (
            (4 5 6 7)
        );
    }
    OUTLET
    {
        type patch;
        faces
        (
            (1 2 6 5)
        );
    }
    Electrode
    {
        type wall;
        faces
        (
            (0 4 5 1)
            
        );
    }
     WALL
    {
        type wall;
        faces
        (
            (3 7 6 2)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
how can I get rid of this skewed lines in this grid?
I just want straight lines that create a structured grid.


Attached Images
File Type: jpg grid.jpg (102.3 KB, 12 views)
babakflame is offline   Reply With Quote

Old   April 1, 2016, 15:20
Default
  #2
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
Hi,

Maybe I'm reaching here, but have you sliced a plan of your mesh for this printscreen? If so, could you show the original mesh?

Also, could you post a printscreen of the whole paraview window? so we can take a look at the configurations

edit:
obs: point 3 isnt supposed to be 0.25 5 0.1?

(0 5 0.1)//0
(0 0 0.1)//1
(0.25 0 0.1)//2
(1 5 0.1)//3
(0 5 -0.1)//4
(0 0 -0.1)//5
(0.25 0 -0.1)//6
(0.25 5 -0.1)//7
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 15:29
Default
  #3
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi,

Thanks for your reply.
Yeah, this is a slice.

I have attached a screen shot of paraview.

My wondering is the presence of skewed lines? how this happnes?
Attached Images
File Type: jpg screenshot.jpg (126.2 KB, 17 views)
babakflame is offline   Reply With Quote

Old   April 1, 2016, 15:32
Default
  #4
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
When you slice you get triangles. It is just a viewing issue.

"People usually tend to use the filters Slice and Clip to diagnose the interior mesh of a case. Although it's an idea in the right direction (wanting to look inside the mesh), it will not give you the best results for assessing if the mesh is OK or not. This is because these filters require that the polyhedral cells in the mesh be decomposed to tetrahedral cells and the resulting surfaces will all be composed by triangles."

https://openfoamwiki.net/index.php/FAQ/Postprocessing
babakflame likes this.
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 15:39
Default
  #5
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
thanks for your nice reply.

I hope that its the issue. I am going to read this page.

Regards
babakflame is offline   Reply With Quote

Old   April 1, 2016, 16:41
Default
  #6
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
I tried to use "Extract cells by region", However it was not clear for the settings required to see a slice of the grid with this filter.

This is a picture of my paraview screen shot, can you help me with hints?
I can send my case as well.

I uploaded it.
Regards
Attached Images
File Type: jpg snap.jpg (86.2 KB, 8 views)
babakflame is offline   Reply With Quote

Old   April 1, 2016, 16:48
Default
  #7
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
How I do it, step-by-step:

1-select "Use VTKPolyhedron"
2-extract the cells by region
3-select "Extract only intersected" and "Extract intersected"
4-Apply.

Any problems, send a printscreen of paraview, specially the properties bar options on the left

Obs: There was no image attached on your last post
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 17:30
Default
  #8
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Quote:
Originally Posted by avila.vc View Post
How I do it, step-by-step:

1-select "Use VTKPolyhedron"
2-extract the cells by region
3-select "Extract only intersected" and "Extract intersected"
4-Apply.

Any problems, send a printscreen of paraview, specially the properties bar options on the left

Obs: There was no image attached on your last post
Hi
where is the location of "Use VTKPolyhedron"
My paraview version is 3.12.
Does it related to version?
I can not see it.
babakflame is offline   Reply With Quote

Old   April 1, 2016, 17:33
Default
  #9
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
Hi Bobi, if you managed to use extract cells it was probably already selected.

Anyway, it is right above mesh parts (on your "initialSimulation" mesh), like the pictures at the link I gave you show.

Try now
3-select "Extract only intersected" and "Extract intersected" (the last boxes on the left menu on your last printscreen)
4-Apply

It should work.
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 17:56
Default
  #10
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi Vinicius

I found it. However, still can not visualize the grid in a way to show a slice of it. It gives me nothing. As the last picture I uploaded in previous post.
I want to have a picture showing that my grid is a rectangular-type structured grid.

I learned from your link that what I receive is an illusion due to slice filter that we should use "Extract cells by region" filter. However, this new filter gives me nothing.
babakflame is offline   Reply With Quote

Old   April 1, 2016, 18:13
Default
  #11
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
Hi. I think I got it. You must have your initialsimulation selected when extracting cells. Then it will be deselected automatcally when the extracted cells are generated. Post prints of your steps if you still dont manage to do it.

Select wireframe to visualize also.
Are you managing to visualize the original mesh, with inlet, outlet etc?

Take a better look até that link too.. Maybe there is something that we are not noticing with your case
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 18:39
Default
  #12
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
I tested what I said here with a tutorial. It worked Just fine. (same paraview version). You are accessing paraview with paraFoam command right?

Sorry I could not help more. If you get me your printscreens with the steps you are following I might have some other idea.

Best luck.
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 1, 2016, 19:03
Default
  #13
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Just one thing:

Is the mesh representation by "Extract Cells by Region" filter is 3D or 2D?

From the provided link, it seems that it is 3D; however, for showing that my grid is rectangular-typed, I need a 2D pic (or slice) anyway.

A 3D visualization does not help.


Regards
babakflame is offline   Reply With Quote

Old   April 1, 2016, 20:48
Default
  #14
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 10
avila.vc is on a distinguished road
Hi

with step 3-select "Extract only intersected" and "Extract intersected", you get a slice of the mesh with one cell size thickness
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   April 10, 2016, 14:02
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all, hi bobi,

I was in vacation; so I am sorry for delay (:
If you make slice or clip you should deselect the "split polyhedrals", its left in the options of the slice or clip.

I did not read all posts due to the fact that there are so many messages I have to replay.

Cheers
babakflame likes this.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; April 11, 2016 at 04:08.
Tobi is offline   Reply With Quote

Old   April 10, 2016, 15:35
Default
  #16
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Thanks Bro.

You are always helpful.

Regards
babakflame is offline   Reply With Quote

Old   April 10, 2016, 16:18
Default
  #17
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
So was it your solution? Or you had it already?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 11, 2016, 04:13
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Just to complete this topic.

You also can visual your cells in several ways.
For example you can use threshold for the coordsX and set the threshold to the limit you need.

Further more you can use a slice and select "Crinkle slice"
The method I mentioned above is called "Triangulate the slice" you should de-select this option.

And at last, "decompose polyhedrals". You find this option in the properties tree for your loaded case.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply


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
Map of this Meshing (sub-)Forum wyldckat OpenFOAM Meshing & Mesh Conversion 0 April 27, 2019 09:33
Meshing software comparison Wikie Mesh Generation & Pre-Processing 5 September 29, 2014 06:09
Help me to choose between Ansys Meshing, Fluent Meshing or ICEM ? pipolaki ANSYS 0 December 6, 2013 08:12
Sliding Meshing dam114 FLUENT 0 October 1, 2013 15:00
[ICEM] Meshing problem in Formula one Far ANSYS Meshing & Geometry 113 April 23, 2013 12:36


All times are GMT -4. The time now is 17:57.