@geuzaine ,@Remacle If I understand correctly, the curvature is evaluated on the curves/edges and based on this, a 3D size field is computed which naturally propagate the size field to the surface. Am I right ? That would explain why I have these problems. Evaluating the curvature on the whole geometry and not on the edges only would probably result in better results. I would see two different methods :
What do you think ?
As a quick-fix, I will add edges on the geometry to make sure the curvature is evaluated where I'm interested.
Kind regards,
Lionel
Hi Christophe @geuzaine, Thanks for the tip. Unfortunately, it did not help on this case.
You can find attached the step file used to produce the above plots. The code is the same as the one in the issue description. I just changed the MeshSizeMax to 5.
Thanks in advance, kind regards,
Lionel
hello everyone, I'm trying to create the surface mesh of a 3D hydrofoil with gmsh but I have some troubles with curvature adaption.
It seems the software does not see the high curvature region near the leading edge and does not refine the mesh there. A workaround is to add a small face around the leading edge in the geometry (see top foil on the image) and then everything is meshed properly. I'm just trying to figure out if :
I used the Python API to import a step file and mesh it :
file = "wings_example_solid"
step_file = file+'.stp'
stl_file = file+'.stl'
import gmsh
gmsh.initialize()
gmsh.option.setNumber("Mesh.MeshSizeMax",20)
gmsh.option.setNumber("Mesh.MeshSizeFromCurvature",20) # number of elements on a circle's boundary
gmsh.option.setNumber("Mesh.Algorithm", 6) # Frontal-Delaunay
gmsh.model.occ.importShapes(step_file,format="step")
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(2) # surface mesh
gmsh.write(stl_file)
gmsh.clear()
Do you have an idea of what is happening ?
Thanks in advance,
Kindly,
Lionel