Latest Netgen is better than previous versions

I had a model I couldn't mesh without having to make additional cuts in it. This caused a lot of elements where I didn't want them. The latest version can mesh the model now without the added cuts. So they must have improved something, but it's not listed in the change logs. The version that works good is 6.2.2105. If you have been having similar problems, you might want to test the new version. It can be found here, https://github.com/NGSolve/ngsolve/releases

Comments

  • Thank you for posting this.
  • you're welcome. i hope it works out for you. i was really surprised that model finally meshes. for a long time, i've had to use a special version of the model, to get it to mesh. now i can use the real model. the weirdest thing is there is nothing obviously wrong with the original model. i never knew why it wouldn't mesh it. hopefully, whatever they improved will stay that way going forward. it could always revert back to not meshing certain models.
  • Is it possible to replace the version of netgen comming with Mecway (i mean use it from inside Mecway) or must it be used as standalone program.

    For gmsh there is a way the user can select the path to his prefered gmsh release.


  • As far as I know we cannot replace the version of netgen that is included with Mecway. Would be nice to have a way to do it, so we could chose mesher program and version, the same as today with the solver.
    There is a very usefull feature on Netgen standalone for fixing geometry, the CAD Doctor, it was needed for meshing some complex models in my case.
  • It's possible that you might be able to just drop in nglib.dll and all its dependencies to the ngmesh or ngmesh6 folder in Mecway. However, I've made some small modifications to Netgen to make it compatible with Mecway so it might not work properly.

    If anyone is willing to go to the trouble of compiling it, here's the modified source code.

    Overview: Mecway uses Netgen by starting the external program ngmesh.exe which calls functions in Netgen's nglib.dll. Ngmesh.exe is a wrapper I made to interface Netgen to Mecway. Meshing parameters are transferred from Mecway to ngmesh.exe by a dropfile and the mesh is returned by a .vol file created by Netgen.

    I don't know how you would enable the geometry healing or other tools since they're not exposed by the nglib library. Perhaps newer Netgen versions have improved this or you can find the relevant functions in the main part of Netgen.
  • Can ngmesh.exe be run as a stand-alone program? If so --
    • On what file(s) does it operate (the liml file or what)?
    • Can you give an example of syntax / optional parameters?
  • I don't know the answer to your question. I download the Windows version of Netgen. There is a GUI for it. That's what I use. You import a *.step file. You export a *.vol file. Then import the *.vol file to Mecway. It's more of a pain to work with a *.vol file in Mecway. So I only do this if I can't get a mesh to work in Mecway.

    I have a video, showing how I use it. Since the video was made, I asked Victor about the midside node option in Mecway. He said that was something he added. He said Netgen always has that option checked. There is no option in Netgen to turn it off. However, that seems to be a good thing. With that option off, the new Mecway shell elements don't work right.

    Link to the video; https://youtu.be/6amu7J26kqY

    I generally only work on single parts. So I'm not sure what the process would be for an assembly.
  • I agree with prop_design that it's probably better to use Netgen's own application if you want to do it separately from Mecway. It takes a STEP file, or maybe STL too??

    However, if you do want to use Mecway's ngmesh, then yes, it can be run standalone. It needs:

    Command line parameters:

    ngmesh.exe {file name to mesh} {parameters file name}
    eg:
    ngmesh myfile.step parameters.txt

    Parameters file:

    Text file that contains these parameters in this order:
    uselocalh
    maxh
    minh
    fineness
    grading
    elementsperedge
    elementspercurve
    closeedgeenable
    closeedgefact
    secondorder
    quad_dominated
    optsurfmeshenable
    optvolmeshenable
    optsteps_3d
    optsteps_2d
    
    optionally followed by local refinement data. For an example, see the parameters.txt file that appears in the temporary folder when you mesh something in Mecway.
  • Where can I find some documentation about meaning and format of each of those parameters and the format of the refinement data fo netgen?
  • edited June 2023
    The ones in the list are all text format single numbers - either double precision or integer.

    As for their meaning. I'm, not sure there's really one source. Most or all are also parameters for Netgen's nglib interface, so you can probably find them there, but I seem to remember there wasn't much documentation.

    Refinement data is:
    Number of points
    x
    y
    z
    max. element size.
    
    The last 4 lines are repeated for each point.

    Units are always mm.

    In case it's not clear, this file format is only used by Mecway to communicate between its own processes. Netgen doesn't know about it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!