You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using pygmsh to create a mesh and save it using mesh.write('mesh.geo_unrolled). I use a nested for loop for the creation of my geometry which is a half channel with a cube at the bottom wall. I take user input for a bunch of parameters and the output is nx and nz number of cubes in x and z direction respectively and a half channel around it.
In the loop, the creation of nodes, line loops, surfaces, surface loops, volumes, transfinite line, surface, volume and surface recombination takes place. However, this is done not for the whole domain at once - but it is done cube by cube.
Because of this this, I run in to the risk of duplicate elements - since after the creation of one channel, when the code moves to the next channel, the order of creation is such that either the first two or the last two elements invariably overlap.
Since I could not find a work around for this while creating, I decided to use Coherence Mesh; in my *.geo file after it is written out by the pygmsh API. This does not seem to work, since I am still getting a face ordering problem when I use gmshToFoam <filename.msh> and sometimes, the faces are different on opposite sides of the domain (I need to set them to cyclic)
Is there any workaround for this? Any command I can probably use in pygmsh or perhaps there is a more elegant way of creating 'repeating units' which I am not able to see? Attached my code here for reference. automate_gmsh.zip
The text was updated successfully, but these errors were encountered:
Right. So I have a very recent version of pygmsh API. However, I wanted to work on the mesh by picking it up later in gmsh. Which is why I went through the process of creating a .*geo file. Actually, another reason to do it was it forcefully remove duplication. Let me try another way for this.
Hi,
I am using pygmsh to create a mesh and save it using
mesh.write('mesh.geo_unrolled
). I use a nested for loop for the creation of my geometry which is a half channel with a cube at the bottom wall. I take user input for a bunch of parameters and the output is nx and nz number of cubes in x and z direction respectively and a half channel around it.In the loop, the creation of nodes, line loops, surfaces, surface loops, volumes, transfinite line, surface, volume and surface recombination takes place. However, this is done not for the whole domain at once - but it is done cube by cube.
Because of this this, I run in to the risk of duplicate elements - since after the creation of one channel, when the code moves to the next channel, the order of creation is such that either the first two or the last two elements invariably overlap.
Since I could not find a work around for this while creating, I decided to use Coherence Mesh; in my *.geo file after it is written out by the pygmsh API. This does not seem to work, since I am still getting a face ordering problem when I use
gmshToFoam <filename.msh>
and sometimes, the faces are different on opposite sides of the domain (I need to set them to cyclic)Is there any workaround for this? Any command I can probably use in pygmsh or perhaps there is a more elegant way of creating 'repeating units' which I am not able to see? Attached my code here for reference.
automate_gmsh.zip
The text was updated successfully, but these errors were encountered: