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

[mesh manipulation] BlockMesh cellSet refineMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2014, 13:50
Default
  #21
Member
 
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12
90nash is on a distinguished road
I had created a tetrahedral mesh and want to refine the whole mesh. I looked through the code of refineMesh and from what I understand it runs for hexahedral mesh only. . Is that so?
90nash is offline   Reply With Quote

Old   April 11, 2014, 04:36
Default
  #22
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Actually you can refine along x and y but not along z. That's what the refineMeshDict is for.

In the source folder of refineMesh you find a commented version of the dictionary. This is the case for most utilities in OpenFOAM.
So, check out $FOAM_APP/utilities/mesh/manipulation/refineMesh
GerhardHolzinger is offline   Reply With Quote

Old   May 30, 2014, 16:31
Post problems with refinemesh
  #23
New Member
 
David Fuentes
Join Date: May 2014
Posts: 7
Rep Power: 12
fondexx is on a distinguished road
hi I´m new in openFoam, I´m trying to model a vessel to find the resistance coefficients, using the snappyhexmesh, I have some problems to make a refinement in the box where the ship should go using refinemesh but I can´t do it, need some help
fondexx is offline   Reply With Quote

Old   May 30, 2014, 17:49
Default
  #24
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi David,

Welcome to the forum.

First of all, please do no double or triple post almost identical questions across multiple theads. Secondly, you do not describe what you have tried and how you have failed. Please read the following link, as it will make your succes on forum more probable:

http://www.cfd-online.com/Forums/ope...-get-help.html

Kind regards,

Niels
fondexx likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   June 2, 2014, 13:41
Default refining region inside blockMesh
  #25
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by idefix View Post
Hello,

do you want to refine your whole mesh or only a part?
Dear indefix,
I saw your post and I think you can help me. I am using OF2.1.1. I am using blockMesh to generate mesh and now I want to refine a specific region inside it... so what should I get or do.. please any help because I am so confused
best regards,
Sandy13,
sandy13 is offline   Reply With Quote

Old   June 5, 2014, 02:13
Default
  #26
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
idefix is on a distinguished road
Hello Sandy13,

could you give me some more information?
how is the grid looking like and the area you want to refine?

See you
idefix
idefix is offline   Reply With Quote

Old   June 5, 2014, 12:02
Default
  #27
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by idefix View Post
Hello Sandy13,

could you give me some more information?
how is the grid looking like and the area you want to refine?

See you
idefix
Dear Idefix,
Thank you so much for accepting to help me. The mesh is as in the posted picture. I have a long cuboid domain and I want to simulate liquid jet coming from a circular patch from top to bottom through the domain. because I need a high resolution around the liquid through the domain, I want to to refine a specific region along the all domain just a bit bigger than the diameter of the circular patch, so I do not have to increase the mesh all over the domain which runs my case very slow. I tried blockMeshDG but still not that efficient, I want some thing like what snappyHexMesh has... refinementRegions but works on block dict. If you have any syfisticated way to do please help me. I attched my blockMesh file as well..
best wishes,
Sandy13,
Attached Images
File Type: jpg 1.jpg (15.5 KB, 146 views)
File Type: jpg 2.jpg (30.7 KB, 183 views)
File Type: jpg 3.jpg (26.8 KB, 222 views)
File Type: jpg 4.jpg (18.8 KB, 192 views)
amolrajan likes this.
sandy13 is offline   Reply With Quote

Old   June 10, 2014, 17:07
Default
  #28
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
idefix is on a distinguished road
Hello,
am I wrong or did you forget to upload the blockMesDict?

Do you have any access to ICEM CFD?

Did I understand it correct that you want to refine a volume which has the shape of a hollow cylinder?

Greetings
idefix
idefix is offline   Reply With Quote

Old   June 18, 2014, 05:10
Default
  #29
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by idefix View Post
Hello,
am I wrong or did you forget to upload the blockMesDict?

Do you have any access to ICEM CFD?

Did I understand it correct that you want to refine a volume which has the shape of a hollow cylinder?

Greetings
idefix
Dear idefix,
I am sorry, it was my fault, I did not upload, so here we go below my blockMesh details. What I want exactly is to refine region in the centre has the same height of my domain(z-axis) but the smaller in the length and width(x and y axis).

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1.0;

vertices
(

(-0.00106 -0.00106 0)//0 // points 0-7 for centerral hex
(0.00106 -0.00106 0)//1
(0.00106 0.00106 0)//2
(-0.00106 0.00106 0)//3

(-0.00106 -0.00106 0.2625)//4
(0.00106 -0.00106 0.2625)//5
(0.00106 0.00106 0.2625)//6
(-0.00106 0.00106 0.2625)//7

(0.00106 0.005 0)//8 // thes points relevent for the back hex
(-0.00106 0.005 0)//9
(0.00106 0.005 0.2625)//10
(-0.00106 0.005 0.2625)//11

(-0.005 0.005 0)//12 // thes points relevent for back left hex
(-0.005 0.00106 0)//13
(-0.005 0.005 0.2625)//14
(-0.005 0.00106 0.2625)//15

(-0.005 -0.00106 0)//16 // thes points relevent for left hex
(-0.005 -0.00106 0.2625)//17

(-0.005 -0.005 0)//18 // thes points relevent for front left hex
(-0.00106 -0.005 0)//19
(-0.005 -0.005 0.2625)//20
(-0.00106 -0.005 0.2625)//21

(0.00106 -0.005 0)//22 // thes points relevent for front hex
(0.00106 -0.005 0.2625)//23

(0.005 -0.005 0)//24 // thes points relevent for front right hex
(0.005 -0.00106 0)//25
(0.005 -0.005 0.2625)//26
(0.005 -0.00106 0.2625)//27

(0.005 0.00106 0)//28 // thes points relevent for right hex
(0.005 0.00106 0.2625)//29

(0.005 0.005 0)//30 // thes points relevent for back right hex
(0.005 0.005 0.2625)//31
);

blocks
(
hex (0 1 2 3 4 5 6 7) (8 8 800) simpleGrading (1 1 1) //0 centeral hex

hex (3 2 8 9 7 6 10 11) (8 8 800) simpleGrading (1 1 1) //1 back center
hex (3 9 12 13 7 11 14 15) (8 8 800) simpleGrading (1 1 1) //2 back left corner
hex (0 3 13 16 4 7 15 17) (8 8 800) simpleGrading (1 1 1) //3 left center
hex (0 16 18 19 4 17 20 21) (8 8 800) simpleGrading (1 1 1) //4 front left corner
hex (1 0 19 22 5 4 21 23) (8 8 800) simpleGrading (1 1 1) //5 front
hex (1 22 24 25 5 23 26 27) (8 8 800) simpleGrading (1 1 1) //6 front right corner
hex (2 1 25 28 6 5 27 29) (8 8 800) simpleGrading (1 1 1) //7 right
hex (2 28 30 8 6 29 31 10) (8 8 800) simpleGrading (1 1 1) //8 back right corner

);

edges
(
arc 2 3 (0.0 0.0015 0)
arc 3 0 (-0.0015 0.0 0)
arc 0 1 (0.0 -0.0015 0)
arc 1 2 (0.0015 0.0 0)

arc 6 7 (0.0 0.0015 0.2625)
arc 7 4 (-0.0015 0.0 0.2625)
arc 4 5 (0.0 -0.0015 0.2625)
arc 5 6 (0.0015 0.0 0.2625)

);

boundary

(


outlet
{
type patch;

faces
(
(0 3 2 1)

(2 3 9 8) //lower patches
(3 13 12 9)
(3 0 16 13)
(0 19 18 16)
(0 1 22 19)
(1 25 24 22)
(1 2 28 25)
(2 8 30 28)

);
}

inlet
{
type patch;
faces
(
(4 5 6 7)
);
}

walls
{
type patch;
faces

(
(13 15 14 12) //left wall
(16 17 15 13)
(18 20 17 16)


(18 19 21 20) // front
(19 22 23 21)
(22 24 26 23)

(24 25 27 26) //right
(25 28 29 27)
(28 30 31 29)

(12 14 11 9) //back
(9 11 10 8)
(8 10 31 30)

(7 6 10 11) // upper patches
(7 11 14 15)
(4 7 15 17)
(4 17 20 21)
(5 4 21 23)
(5 23 26 27)
(6 5 27 29)
(6 29 31 10)

);
}

);



mergePatchPairs
(
);

//.................................................. ................//#

thanks again for helping me.
Best wishes,
Sandy13
sandy13 is offline   Reply With Quote

Old   June 19, 2014, 05:15
Default
  #30
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
idefix is on a distinguished road
Dear Sandy13,

thanks for the information. I assumed that the cylinder in the middle is not hollow.
What I did is the following:
I created a cylinderInner.stl-file with the geometry of the cylinder. Inside thise cylinder the cells will be refinded. If you do it, you must be careful. I don´t know why but only if the normals of the surfaces point outside the refinement later will work.
Put the file cylinderInner.stl in your case-folder (like constant and system).
Use the command:
insideCells cylinderInner.stl innerSet
(the name innerSet is chosen from me)

If there is a problem in this step, create a folder "sets":
constant/polyMes/sets
then try it again
now there is a new cell set in constant/polyMesh/sets which is called "innerSet"
you can look at it with:

foamToVTK -cellSet innerSet
or
foamToVTK -constant -cellSet innerSet

now you need the file refinementMesh in system:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Cells to refine; name of 'cellSet'
set innerSet;


// Type of coordinate system:
// - global : coordinate system same for every cell. Usually aligned with
// x,y,z axis. Specify in globalCoeffs section below.
// - patchLocal : coordinate system different for every cell. Specify in
// patchLocalCoeffs section below.
coordinateSystem global;

// Specifies 2 directions by a name and a vector. The normal direction is
// calculated as tan1^tan2
globalCoeffs
{
//Verfeinerung in x-Richtung
tan1 ( 1 0 0 );
tan2 ( 0 1 0 );
// Verfeinerung in y-Richtung
// tan1 ( 0 1 0 );
// tan2 ( 1 0 0 );
// Verfeinerung in z-Richtung
// tan1 ( 0 0 1 );
// tan2 ( 0 1 0 );

}

patchLocalCoeffs
{
// Normal direction is face normal of zero'th face of patch
patch outside;
tan1 ( 1 0 0 );
tan2 ( 0 0 1 );
}

// Specifies the direction to be refined by the name used above
// To refine in the third direction, use the keyword 'normal'
directions
(
tan1
tan2
normal
);

// Whether to use hex topology. This will
// - if patchLocal: all cells on selected patch should be hex
// - split all hexes in 2x2x2 through the middle of edges.
useHexTopology yes;

// Cut purely geometric (will cut hexes through vertices) or take
// topology into account. Incompatible with 'useHexTopology'
geometricCut no;

// Write meshes from intermediate steps
writeMesh no;



here:
// Cells to refine; name of 'cellSet'
set innerSet;

you have to use the same name as the cellSet (created with "insideCells ...")

in the next step just use
refineMesh –dict

a new time step will be created which contains your new grid.

The refineMeshDict refines the cells in every direction. If you just want to refine in one direction you have to change it.
If you want to refine the cells several time I suggest that you use at a first step a bigger cylinder for the first refinement. For the second refinement use a smaller cylinder. Otherwise the cells don´t look nice any more.

I hope it helps, otherwise feel free to ask again.
I had to zip the *.stl file because otherwise I couldn´t upload it.

See you
idefix
Attached Files
File Type: zip cylinderInner.zip (17.4 KB, 53 views)
Milad06 and amolrajan like this.
idefix is offline   Reply With Quote

Old   June 19, 2014, 11:18
Default
  #31
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by idefix View Post
sorry this was doubled - I don´t know where to delete
Dear idefix,
Thank you very much for supporting me, I do not know how to thank you, I will try the suggestion you posted to me and let you know If I had success..
best wishes,
Sandy13,
sandy13 is offline   Reply With Quote

Old   June 19, 2014, 11:43
Default
  #32
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by idefix View Post
Dear Sandy13,

thanks for the information. I assumed that the cylinder in the middle is not hollow.
What I did is the following:
I created a cylinderInner.stl-file with the geometry of the cylinder. Inside thise cylinder the cells will be refinded. If you do it, you must be careful. I don´t know why but only if the normals of the surfaces point outside the refinement later will work.
Put the file cylinderInner.stl in your case-folder (like constant and system).
Use the command:
insideCells cylinderInner.stl innerSet
(the name innerSet is chosen from me)

If there is a problem in this step, create a folder "sets":
constant/polyMes/sets
then try it again
now there is a new cell set in constant/polyMesh/sets which is called "innerSet"
you can look at it with:

foamToVTK -cellSet innerSet
or
foamToVTK -constant -cellSet innerSet

now you need the file refinementMesh in system:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Cells to refine; name of 'cellSet'
set innerSet;


// Type of coordinate system:
// - global : coordinate system same for every cell. Usually aligned with
// x,y,z axis. Specify in globalCoeffs section below.
// - patchLocal : coordinate system different for every cell. Specify in
// patchLocalCoeffs section below.
coordinateSystem global;

// Specifies 2 directions by a name and a vector. The normal direction is
// calculated as tan1^tan2
globalCoeffs
{
//Verfeinerung in x-Richtung
tan1 ( 1 0 0 );
tan2 ( 0 1 0 );
// Verfeinerung in y-Richtung
// tan1 ( 0 1 0 );
// tan2 ( 1 0 0 );
// Verfeinerung in z-Richtung
// tan1 ( 0 0 1 );
// tan2 ( 0 1 0 );

}

patchLocalCoeffs
{
// Normal direction is face normal of zero'th face of patch
patch outside;
tan1 ( 1 0 0 );
tan2 ( 0 0 1 );
}

// Specifies the direction to be refined by the name used above
// To refine in the third direction, use the keyword 'normal'
directions
(
tan1
tan2
normal
);

// Whether to use hex topology. This will
// - if patchLocal: all cells on selected patch should be hex
// - split all hexes in 2x2x2 through the middle of edges.
useHexTopology yes;

// Cut purely geometric (will cut hexes through vertices) or take
// topology into account. Incompatible with 'useHexTopology'
geometricCut no;

// Write meshes from intermediate steps
writeMesh no;



here:
// Cells to refine; name of 'cellSet'
set innerSet;

you have to use the same name as the cellSet (created with "insideCells ...")

in the next step just use
refineMesh –dict

a new time step will be created which contains your new grid.

The refineMeshDict refines the cells in every direction. If you just want to refine in one direction you have to change it.
If you want to refine the cells several time I suggest that you use at a first step a bigger cylinder for the first refinement. For the second refinement use a smaller cylinder. Otherwise the cells don´t look nice any more.

I hope it helps, otherwise feel free to ask again.
I had to zip the *.stl file because otherwise I couldn´t upload it.

See you
idefix
Daer idefix,
I tried to do as you told me exactly. So I saved the the stl file you done and saved it in both constant and systemfolder, then ran the command you sent after blockMesh, but I got this error message
Create time

Create polyMesh for time = 0

Reading surface from "cylinderInner.stl"


--> FOAM FATAL ERROR:
Cannnot read "cylinderInner.stl"

From function triSurface::read(const fileName&, const word&, const bool)
in file triSurface/triSurface.C at line 369.

FOAM exiting
Then I did sets folder inside poly folder and put the stl file you sent as you said and ran the same command but it did not run and I got the same error message. I am using OF2.1.1 version. As the error message says I need to red this file from triSurface, so inside constant folder I done triSurface and put the stl file, but still I get the same error message when I run the command you sent.. Do you please have any solution?
best wishes,
Sandy13,
sandy13 is offline   Reply With Quote

Old   June 19, 2014, 12:12
Default
  #33
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sandy13 View Post
Daer idefix,
I tried to do as you told me exactly. So I saved the the stl file you done and saved it in both constant and systemfolder, then ran the command you sent after blockMesh, but I got this error message
Create time

Create polyMesh for time = 0

Reading surface from "cylinderInner.stl"


--> FOAM FATAL ERROR:
Cannnot read "cylinderInner.stl"

From function triSurface::read(const fileName&, const word&, const bool)
in file triSurface/triSurface.C at line 369.

FOAM exiting
Then I did sets folder inside poly folder and put the stl file you sent as you said and ran the same command but it did not run and I got the same error message. I am using OF2.1.1 version. As the error message says I need to red this file from triSurface, so inside constant folder I done triSurface and put the stl file, but still I get the same error message when I run the command you sent.. Do you please have any solution?
best wishes,
Sandy13,
Dear idefix,
Okay - prolbem solved

the STL has to be in the "case" diroctory. Not in the triSurface.
best wishes,
Sandy13,
sandy13 is offline   Reply With Quote

Old   June 20, 2014, 10:22
Default
  #34
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sandy13 View Post
Dear idefix,
Okay - prolbem solved

the STL has to be in the "case" diroctory. Not in the triSurface.
best wishes,
Sandy13,
Dear idefix,
I tried using the method you suggested, It works very well, but not as I want because this utility refine the all mesh across the all domain not like I want. I want to refine just a cuboid smaller than my domain inside it and keep the rest of mesh as it is. Please help me if you have any Idea...
best wishes,
Sandy13
sandy13 is offline   Reply With Quote

Old   August 19, 2014, 05:54
Default
  #35
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi Sandy,

the magic is in
// Cells to refine; name of 'cellSet'
set innerSet;
when using refineMesh. You can create all kinds of cellSets to select the cells you want to refine, for example only choosing certain cells that contain a certain range of flow velocity or pressure, by using topoSet. once you have created a cellSet with topoSet that contains the cells you want to refine, you can control wether you want to split the cells in x, y or x y and z directions in the refineMeshDict dependent on the presence of tan1, tan2 and normal in
directions
(
tan1 // x
tan2 // y
normal // z
);
But you have to be aware that you call refineMesh as 'refineMesh -dict system/refinemeMeshDict' in OF 2.3
fsifsi likes this.
vonboett is offline   Reply With Quote

Old   February 8, 2016, 10:31
Default
  #36
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 14
Maimouna is on a distinguished road
Hi all,

in the attached picture, I have two blockMeshDict file one for fluid and another for solid as following
Code:
/*--------------------------------*- C++ -*----------------------------------*\ 
| =========                 |                                                 | 
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \\    /   O peration     | Version:  2.2.2                                 | 
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      | 
|    \\/     M anipulation  |                                                 | 
\*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       dictionary; 
    object      blockMeshDict; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
 
convertToMeters 1;//dimensions in meters --> conversion 1 
 
vertices 
( 
(0 0 0) //vertex 0 
(5 0 0) //vertex 1 
(6 0 0) //vertex 2 
(10 0 0)//vertex 3 
(20 0 0) //vertex 4 
 
(0 4 0) //vertex 5 
(5 4 0) //vertex 6 
(6 4 0)//vertex 7 
(10 4 0) //vertex 8 
(20 4 0) //vertex 9 
 
(0 7 0) //vertex 10 
(5 7 0)//vertex 11 
(6 7 0) //vertex 12 
(10 7 0) //vertex 13 
(20 7 0) //vertex 14 
 
(0 11 0)//vertex 15 
(5 11 0) //vertex 16 
(6 11 0) //vertex 17 
(10 11 0) //vertex 18 
(20 11 0)//vertex 19 
 
(0 0 11) //vertex 20 
(5 0 11) //vertex 21 
(6 0 11) //vertex 22 
(10 0 11)//vertex 23 
(20 0 11) //vertex 24 
 
(0 4 11) //vertex 25 
(5 4 11) //vertex 26 
(6 4 11)//vertex 27 
(10 4 11) //vertex 28 
(20 4 11) //vertex 29 
 
(0 7 11) //vertex 30 
(5 7 11)//vertex 31 
(6 7 11) //vertex 32 
(10 7 11) //vertex 33 
(20 7 11) //vertex 34 
 
(0 11 11)//vertex 35 
(5 11 11) //vertex 36 
(6 11 11) //vertex 37 
(10 11 11) //vertex 38 
(20 11 11)//vertex 39 
 
); 
 
blocks 
( 
hex (0 1 6 5 20 21 26 25) (20 15 20) simpleGrading (1 1 1) //block 0 
hex (1 2 7 6 21 22 27 26) (20 15 20) simpleGrading (1 1 1) //block 1  
hex (2 3 8 7 22 23 28 27) (20 15 20) simpleGrading (1 1 1) //block 2 
hex (3 4 9 8 23 24 29 28) (20 15 20) simpleGrading (1 1 1) //block 3 
hex (5 6 11 10 25 26 31 30) (20 15 20) simpleGrading (1 1 1) //block 4 
hex (6 7 12 11 26 27 32 31) (20 15 20) simpleGrading (1 1 1) //block 5 
hex (7 8 13 12 27 28 33 32) (20 15 20) simpleGrading (1 1 1) //block 6 
hex (8 9 14 13 28 29 34 33) (20 15 20) simpleGrading (1 1 1) //block 7 
hex (10 11 16 15 30 31 36 35) (20 15 20) simpleGrading (1 1 1) //block 8 
hex (11 12 17 16 31 32 37 36) (20 15 20) simpleGrading (1 1 1) //block 9 
hex (12 13 18 17 32 33 38 37) (20 15 20) simpleGrading (1 1 1) //block 10 
hex (13 14 19 18 33 34 39 38) (20 15 20) simpleGrading (1 1 1) //block 11 
); 
 
edges 
( 
); 
 
patches 
( 
 
patch top 
( 
(0 5 6 1) 
(3 8 9 4) 
(5 10 11 6) 
(8 13 14 9) 
(10 15 16 11) 
(11 16 17 12) 
(12 17 18 13) 
(13 18 19 14) 
) 
 
patch bottom 
( 
(20 25 26 21) 
(23 28 29 24) 
(25 30 31 26) 
(28 33 34 29) 
(30 35 36 31) 
(31 36 37 32) 
(32 37 38 33) 
(33 38 39 34) 
) 
 
patch output //right 
( 
(19 14 34 39) 
(14 9 29 34) 
(9 4 24 29) 
) 
 
patch input //left 
( 
(15 10 30 35) 
(10 5 25 30) 
(5 0 20 25) 
) 
 
patch cylinder 
( 
(1 6 7 2) 
(6 11 12 7) 
(21 26 27 22) 
(26 31 32 27) 
) 
 
wall plate 
( 
(2 7 8 3) 
(7 12 13 8) 
(22 27 28 23) 
(27 32 33 28) 
) 
 
patch frontPlane 
( 
(0 1 21 20) 
(1 2 22 21) 
(2 3 23 22) 
(3 4 24 23) 
) 
 
patch backPlane 
( 
(15 16 36 35) 
(16 17 37 36) 
(17 18 38 37) 
(18 19 39 38) 
) 
 
); 
 
mergePatchPairs 
( 
); 
 
// ************************************************************************* //
solid
Code:
/*--------------------------------*- C++ -*----------------------------------*\ 
| =========                 |                                                 | 
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \\    /   O peration     | Version:  2.2.2                                 | 
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      | 
|    \\/     M anipulation  |                                                 | 
\*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       dictionary; 
    object      blockMeshDict; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
 
convertToMeters 1;//dimensions in meters --> conversion 1 
 
vertices 
( 
    (6 0 0) //vertex 0 
    (10 0 0)//vertex 1 
    (6 4 0)//vertex 2 
    (10 4 0) //vertex 3 
    (6 7 0) //vertex 4 
    (10 7 0) //vertex 5 
  
    (6 0 11) //vertex 6 
    (10 0 11)//vertex 7 
    (6 4 11)//vertex 8 
    (10 4 11) //vertex 9 
    (6 7 11) //vertex 10 
    (10 7 11) //vertex 11 
); 
 
blocks 
( 
      hex (0 1 2 3 4 5 6 7) (20 15 20) simpleGrading (1 1 1)  
 
    //hex (2 3 8 7 22 23 28 27) (20 15 20) simpleGrading (1 1 1) //block 2 
    //hex (7 8 13 12 27 28 33 32) (20 15 20) simpleGrading (1 1 1) //block 6 
); 
 
edges 
( 
); 
 
patches 
( 
     patch plateFix 
     ( 
         (3 7 4 0) 
     ) 
 
     //patch plate 
       wall plate 
     ( 
      (3 2 6 7) 
      (6 2 1 5) 
      (1 0 4 5) 
     ) 
 
     symmetryPlane frontPlane 
     ( 
     (0 1 2 3) 
     ) 
    
     symmetryPlane backPlane 
     ( 
     (7 6 5 4) 
     ) 
); 
 
mergePatchPairs 
( 
); 
 
// ************************************************************************* //
that because I'm working with FSI (fsiFoam solver).

The thickness of the plate (foil) is 0.06, I would like to refine the mesh near the foil. How could do that? Help me please by write all steps in order to do that.

Lots of thanks in advanced.

Maimouna
Attached Images
File Type: jpg Screenshot from 2016-01-25 16:07:10.jpg (66.2 KB, 70 views)
Maimouna is offline   Reply With Quote

Old   July 6, 2016, 12:48
Default
  #37
New Member
 
bangun
Join Date: Feb 2015
Posts: 16
Rep Power: 11
eb19 is on a distinguished road
Hi,

I am using refineMesh to refine the cells locally. But from this refinement, some tetrahedral cells with high skewness are generated. How to get rid of these elements?
Can I maintain the size of the original cells which are adjacent to the refined cells? Attached is the mesh after having been refined. You could see the tetrahedral cells at cell faces between the refined cells (right or upper cells) and the cells not being refined (left cells).

I would imagine if this can be done, eventually i will have some non-conformal cells or maybe some inner faces. This is what I want to have from my mesh. The local refinement but without any tetrahedral cells. Please anyone who had the same problem share your experience here. Thanks.


Best

ebb19
Attached Images
File Type: jpg mes.jpg (124.8 KB, 76 views)

Last edited by eb19; July 6, 2016 at 13:07. Reason: adding a figure
eb19 is offline   Reply With Quote

Old   September 6, 2017, 18:27
Default
  #38
New Member
 
bangun
Join Date: Feb 2015
Posts: 16
Rep Power: 11
eb19 is on a distinguished road
Hi,

I know this is an old post. Can you tell me how to generate an stl file from the program that idefix attached. I tried saving a file generated by that program in an stl file and I openned the file, but the content of the file is unreadable.

How do we then include this stl file into constant folder of OpenFOAM? I am confused about using this stl file. My intention is to specify a region to be refined. I can not use typical cellSources such as cylindertoCell, boxtoCell, etc because nono of them is exactly as I want. Can you please explain to me how you used the stl file to refine a specific region in your domain?
eb19 is offline   Reply With Quote

Old   January 21, 2019, 00:14
Default
  #39
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11
amuzeshi is on a distinguished road
Quote:
Originally Posted by emirust View Post
Tried, but doesnt serve my purpose of increasing the cell resolution in the central part (as seen in screenshot where I ran the utility three times)
A brief manual on refineMesh

Hello There
You've gone the wrong way. Follow the right method on the following, which differs only in one more topoSet.

Present case
As an example, I ran refining on cavity case. I created two sets named mediumCellSet and hiCellSet ; images are attached. We want to refine mediumCellSet less and hiCellSet more.

Wrong method
1- blockMesh
2- topoSet
3- refineMesh (on mediumCellSet)
4- refineMesh (on hiCellSet)
5- Result:wrongMethod.jpg (attached)

Right method
- before step 4 mentioned above, execute a topoSet again.
- Result:rightMethod.jpg (attached)
Attached Images
File Type: jpg hiCellSet.jpg (41.7 KB, 61 views)
File Type: jpg mediumCellSet.jpg (89.8 KB, 54 views)
File Type: jpg wrongMethod.jpg (139.4 KB, 57 views)
File Type: jpg rightMethod.jpg (148.4 KB, 58 views)
amuzeshi is offline   Reply With Quote

Old   August 29, 2019, 07:57
Default
  #40
New Member
 
zhaopeng
Join Date: Mar 2018
Posts: 3
Rep Power: 8
zp_chem is on a distinguished road
Hi:
I want to konw have you solved this problem?
zp_chem 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
[blockMesh] Multi-region Blockmesh - Refinemesh issues. Doug68 OpenFOAM Meshing & Mesh Conversion 3 February 18, 2016 21:09
[blockMesh] Multi-region Blockmesh - Refinemesh issues. Doug68 OpenFOAM Meshing & Mesh Conversion 0 February 17, 2016 04:39
[mesh manipulation] multiple calls to refineMesh parallel w/ dict failing Regis_ OpenFOAM Meshing & Mesh Conversion 2 June 4, 2015 14:44
[mesh manipulation] refineMesh from a cellSet issue gfilip OpenFOAM Meshing & Mesh Conversion 0 September 28, 2010 14:14
Bug in mesh tools: cellSet, refineMesh, ...? alexm OpenFOAM Bugs 0 August 10, 2009 13:46


All times are GMT -4. The time now is 06:56.