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

[Gmsh] Gmsh to Openfoam cylinder

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2015, 13:31
Default Gmsh to Openfoam cylinder
  #1
New Member
 
S Atkinson
Join Date: Mar 2015
Posts: 14
Rep Power: 11
satkinson is on a distinguished road
Hi All,

I am looking to create a multiphase or baffled model and the first step for an initial model is to import a mesh. I prefer to use Gmsh due to the easy layering feature so I creased a simple two cylinders inside of each other.

Point(1) = {0,0,0};

Point(2) = {0.635,0,0};
Point(3) = {0,0.635,0};
Point(4) = {-0.635,0,0};
Point(5) = {0,-0.635,0};

Point(6) = {2,0,0};
Point(7) = {0,2,0};
Point(8) = {-2,0,0};
Point(9) = {0, -2 ,0};

Circle(1) = {2,1,3};
Circle(325) = {3,1,4};
Circle(649) = {4,1,5};
Circle(973) = {5,1,2};

Circle(10) = {6,1,7};
Circle(3250) = {7,1,8};
Circle(6490) = {8,1,9};
Circle(9730) = {9,1,6};

Line Loop(100) = {1,325,649,973};
Line Loop(101) = {10,3250,6490,9730};

Plane Surface(1000) = {100};
Plane Surface(1001) = {101, 100};


surfaceVector[] = Extrude {0, 0, 16} {
Surface{1000};
Layers{1};
Recombine;
};

surfaceVector4[] = Extrude {0, 0, 16} {
Surface{1001};
Layers{1};
Recombine;
};

Physical Volume("fuel") = surfaceVector[1];


Physical Volume("block") = surfaceVector4[1];

Physical Surface("blockboundary") = {surfaceVector4[2], surfaceVector4[4], surfaceVector4[3], surfaceVector4[5]};
Physical Surface("cylinder") = {surfaceVector4[9], surfaceVector4[8], surfaceVector4[7], surfaceVector4
[6]};


Mesh.RemeshParametrization=4;
Mesh.RemeshAlgorithm=1;
Mesh.Algorithm = 6;
Mesh.Algorithm3D = 6;
Mesh.SubdivisionAlgorithm = 0;

When I visualise this structure in gmsh I see all of the surfaces individually, which I want to turn into boundaries later. Unfortunately no matter what I try when I use gmshToFoam on this, the surfaces are never transferred and they are always grouped together in defaultFaces.

I have also tried to extrude each volume separately however using this method the surfaces don't fully surround the cylinder when opened in paraview and the faces are placed in defaultFaces again.

One way to get around this is to use splitmesh which gives me two sets of default faces which I can rename and this is an option for creating multiphase designs, however I think that Openfoam is trying to phase out multiphase designs for thermal calculations and move everything to baffles instead? I have not seen an example for baffled programs using splitmesh yet in the tutorials. Eventually I will have conduction and turbulent convection (k-epsilon model) in the model so I am looking for the easiest method to accommodate all of these properties if there are any suggestions.

Cheers,

Satkinson
satkinson is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
Tube with cylinder inside in OpenFoam orxan.shibli OpenFOAM Running, Solving & CFD 1 September 6, 2015 12:53
CAD -> gMsh -> enGrid -> OpenFOAM Problem AlGates OpenFOAM 7 August 6, 2010 13:46
[Gmsh] Error converting Gmsh mesh to OpenFOAM format Martin_ OpenFOAM Meshing & Mesh Conversion 3 December 9, 2009 10:35


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