|
[Sponsors] |
May 24, 2017, 10:32 |
Problem in mesh saving
|
#1 |
Member
|
Hello everyone,
I am facing a minor problem while saving the mesh created from a Gmsh script file. I can see the complete mesh when I run the script (snapshot is attached named 'mesh_complete') however only part of the mesh is saved in the 'mesh.msh' file (snapshot named 'mesh_quarter'). The script I am using can be found below. Code:
cc = 6; cd = 4; cz = 8; cr=0.05; zmax=0.5; cx=Sqrt(cr*cr/2.0); sl=1/3.0; sx=sl/2.0; nc = cc + 1; nd = cd + 1; // Section 1 Point(1) = {0, 0, 0}; Point(2) = {cx, cx, 0}; Point(3) = {sx, sx, 0}; Point(4) = {-sx, sx, 0}; Point(5) = {-cx, cx, 0}; Line(1) = {2,3}; Line(2) = {3,4}; Line(3) = {4,5}; Circle(4) = {5,1,2}; Line Loop(1) = {1,2,3,4} ; Plane Surface(1) = {1}; Transfinite Line{1,3} = nd; Transfinite Line{2,4} = nc; Transfinite Surface{1} = {2,3,4,5}; Recombine Surface{1}; Rotate {{0, 0, 1}, {0, 0, 0}, Pi} { Duplicata { Surface{1}; } } Transfinite Line{8,6} = nd; Transfinite Line{9,7} = nc; Transfinite Surface{5} = {6,7,11,15}; Recombine Surface{5}; Rotate {{0, 0, 1}, {0, 0, 0}, -Pi/2} { Duplicata { Surface{1}; } } Transfinite Line{14,12} = nc; Transfinite Surface{10} = {2,3,11,15}; Recombine Surface{10}; Rotate {{0, 0, 1}, {0, 0, 0}, Pi/2} { Duplicata { Surface{1}; } } Transfinite Line{19,17} = nc; Transfinite Surface{15} = {4,5,6,7}; Recombine Surface{15}; // Extrusion in the third dimension Extrude{0,0,zmax}{ Surface{1,5,10,15}; Layers{cz};Recombine; } Physical Surface("fixed") = {1}; Physical Volume("volume") = {1,5,10,15}; Mesh 3; Coherence Mesh; Save "mesh.msh"; Many thanks
__________________
Jibran Haider |
|
May 24, 2017, 12:17 |
|
#2 |
Senior Member
|
Hi,
You messed up physical surface and physical volume definitions. And since the only valid number in volume definition is 1, you got quarter of the mesh. |
|
May 24, 2017, 12:32 |
|
#3 | |
Member
|
Quote:
Hi Alexey, Many thanks for the prompt response. The volume definition was wrong. It should have been Code:
Physical Volume("volume") = {1,2,3,4};
__________________
Jibran Haider |
||
Tags |
gmsh, mesh 3d |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[ICEM] ICEM Structured Mesh Problem | OMJT | ANSYS Meshing & Geometry | 3 | March 22, 2013 11:06 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |