Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

how to get a .msh file after optimization with adjoint solver

    • Dimitri
      Subscriber

      hi, i have done shape optimzation with adjoint solver and export a stl file( the only i can).


      I want to relaunch the calculation on fluent to reassure myself of the effect of my optimization. but unfortunately I had an error when I tried to read the stl file on fluent, on the other hand it worked on SpaceClaim, I want to know how to obtain the .msh,  to be able to make again the volume mesh and launched the computation.


      Thanks in advance for any suggestions.

    • Aras karimi
      Subscriber
      Hi dear friend, Did you manage to export the .msh file ? How to mesh the .msh file ? I don't think this is possible.
    • peteroznewman
      Subscriber

      Hello Dimitri,

      I am not an expert at Fluent, but I believe you can use the File menu to write a .cas file.  The .cas file contains both the model and the mesh. You can open Fluent, read in the .cas file and you will have the model including the mesh to run the calculation.

      If you want a mesh without the model, follow these steps to get a .msh.h5 file separate from the .cas file:
      1. Launch Fluent in the Meshing Mode by ticking “Meshing Mode” in the Fluent Launcher
      2. Read the .cas file just saved by File>Read>Mesh… then it prompts “Reading a case file as a mesh file results in loss of boundary conditions.” Press OK.
      3. Write the mesh file by File>Write>Mesh…

      • Aras karimi
        Subscriber

        Hello Dear Peter, Thank you for your guidance.

        I got the .msh.h5 file, but according to Mr. Dimitri, I don't know how it is possible to create a volumetric mesh on the mesh file? In fact, it is better to ask what is the use of the mesh file obtained from the case file?

        The point is that the geometry deformed by the adjoint solver needs to be meshed because the optimizer has lowered its mesh quality and the mesh is stretched in some areas.

    • peteroznewman
      Subscriber

      The .msh.h5 file is the volumetric mesh used by the adjoint solver.  The .cas file is the complete model definition. These files allow recalculating the last solution or doing some model editing to calculate a different inlet condition such as a different angle of attack or a different velocity for example.

    • Aras karimi
      Subscriber
      If the goal is only to change the input speed or different attack angles, you can use the .cas file. Therefore, I think extracting the .msh.h5 file is useless.
       
      The problem of users in using the adjoint solver is the lowering of the mesh quality and the loss of the orthogonality of the mesh elements during the optimization. Therefore, the deformed geometry needs to be meshed in order to ensure the result obtained by the optimizer using the low-quality mesh provided.
    • peteroznewman
      Subscriber

      One would extract the .msh.h5 file to create a new mesh with higher quality elements.

    • Aras karimi
      Subscriber

      Exactly the goal is to create a new mesh with higher quality elements on the deformed geometry after the optimization. How to create a new mesh on the  .msh.h5  file?

    • Rob
      Forum Moderator

      Have a look at Fluent Meshing: read in the deformed boundary mesh and go from there. 

      • Aras karimi
        Subscriber

        The .cas and .dat file and deformed geometry are available. The mesh is of the structure type, how can I create a new mesh with quality elements on the deformed geometry ? Is Fluent Meshing able to create a mesh with the structure ?

    • Rob
      Forum Moderator

      Fluent Meshing will allow you to remesh the .msh easily enough. The .cas is the mesh but with a lot more information, so it should work.  I'm not sure what tutorials there are as I suspect you may need to use the Outline tools rather than a workflow. 

      • Aras karimi
        Subscriber

        Does Fluent Meshing improve only the poor quality hexahedral elements of the structure mesh in the .msh.h5 file or does it Re-mesh the entire .msh.h5 file?

        I have never used this software for meshing. I would be very grateful if you could guide me on what to do.

        Regards.

    • Rob
      Forum Moderator

       

      It would generally remesh the whole lot with tri elements. You then create the tet or poly volume mesh. 

      If you click on Help look for Fluent Meshing, and do the tutorials it'll give you an idea on where to start. 

       

      • Aras karimi
        Subscriber

        The elements of my geometry mesh are of hexahedral type. Does it Re-mesh the elements of this type of mesh?

        If it doesn't support this type of mesh, it's very disappointing.

        • Rob
          Forum Moderator

          Fluent Meshing has never supported hex meshes. It's in the process of getting multizone, but that'll most likely be a swept tri or poly mesh.  In CFD we tend to use a mix of elements. ICEM CFD has a hex option. 

        • Aras karimi
          Subscriber

          Hi rob,
          I explained the problem fully in the last message. did you see it ?

    • peteroznewman
      Subscriber

      In 2 days, Aras will have been searching for a way to remesh this volume for 2 months!  See this discussion, which includes several videos.

      /forum/forums/topic/how-to-convert-stl-file-to-step-geometry-file-in-spaceclaim/

      • Aras karimi
        Subscriber

        Hello Peter, good time
        I hope you are fine.

        After more than two months that I spent on it, I still could not find a solution. Do you know the specialists of Fluent's adjoint solver of Ansys group?  Can you introduce them to me?

    • Aras karimi
      Subscriber

      Oh Rob, I’m disappointed. I present the problem in full here. I hope you pay attention to it. I hope that a way will be found after 2 months, which took me a lot of time.

      I am optimizing the 3D shape of a wing using Fluent’s adjoint solver. My mesh is a structure type with hexahedral elements that I produced with ICEM. During the optimization, the mesh elements lose their quality and are stretched in some areas, which causes errors in the solution. Now, in order to ensure the result obtained by the optimizer, it is necessary to remesh the geometry.

      It was mentioned in the adjoint solver user guide ( Remeshing is required during optimization to achieve a reliable optimized geometry ).
      The adjoint solver automatically performs the remeshing process in 3D cases only on tetrahedral elements without a boundary layer, and unfortunately, it is not able to remesh on hexahedral elements, which is disappointing. Due to the lack of automatic remeshing of the adjoint solver for hexahedral elements, the deformed geometry must be manually meshed.

      (Meaning of Re-meshing: geometry meshing is deformed)

      Summary
      On the initial geometry, a structure mesh with hexahedral elements was created by ICEM. After the optimization process by the adjoint solver, STL files, .cas and .dat of the deformed geometry are available. We have three files that we can use for meshing the deformed geometry.

      According to the reviews, the software is not able to create a structured mesh on the STL file. But the ICEM software reads the STL files, but I could not convert it into a meshable geometry.

      I hope you will raise this issue in the Ansys group, what is the solution for remeshing the deformed geometry whose mesh is of the structured type with hexahedral elements. It is hoped that this challenge of many engineers in this field can be solved.

      Regards.

       

    • Rob
      Forum Moderator

      How badly distorted are the wing surfaces?  

      • Aras karimi
        Subscriber

        The mesh on the wing surface is slightly stretched in some areas. In order to be sure of the answer, I have to remash it.

    • Rob
      Forum Moderator

      So the blocking shouldn't need to be adjusted that much? 

      • Aras karimi
        Subscriber

        I do not know what you mean.

        To create a structure mesh with hexahedral elements on the STL wing, it must be blocked like the initial geometry (before optimization).

        My initial geometry was a solid body that I subtracted from the air domain and blocked it by ICEM and then created a structure mesh with hexahedral elements on it. Now, how can you create a structure mesh with hexahedral elements on the obtained STL geometry?

        If photos or information are needed, I will send them.

        Regards.

         

    • Rob
      Forum Moderator

      From checking with a colleague you should be able to block the stl. 

      • Aras karimi
        Subscriber

        Who do you mean by colleague?

        So far, no information has been obtained about the possibility of creating blocks on STL geometry.

    • Rob
      Forum Moderator

      Colleague - person I work with who hasn't got been signed off for the site.  Have you tried and failed to block the stl? 

      • Aras karimi
        Subscriber

        I opened the wing STL file in ICEM through the following command:

        File => Import Geometry => Faceted => STL.

        But I can't select the wing geometry lines.As if they are locked. The geometry wing is displayed on the software screen, but nothing can be done on it.

        Has your colleague created a structure mesh with hexahedral elements by creating block on a 3D STL geometry?

    • Rob
      Forum Moderator

      I believe so. What edges are you not able to connect to? Surface edges or the guide/visualisation parts of the surfaces?

      • Aras karimi
        Subscriber

        None of the edges of the geometry can be selected.
        After importing the 3D STL wing into ICEM, none of the wing lines are selectable. They seem to be locked. I think there is a setting that enables locked geometry lines.
        Can I speak to your colleague?

        Regards.

      • Aras karimi
        Subscriber

        Hi Rob, I am waiting for your reply. Did you see my message?

    • Rob
      Forum Moderator

      I did, and pushed to second line. I'll check as we switched some channels over the weekend. 

      • Aras karimi
        Subscriber

        Rob, didn't you message me wrong?
        I did not understand what you meant.

    • Rob
      Forum Moderator

      I asked a colleague to have a look at this, but he's now got to find someone who can answer. Our (Ansys) expert team don't tend to post as they've not read the rules.

      • Aras karimi
        Subscriber

        Hello Dear Rob,

        Did your colleague manage to see the problem raised?

        I have explained the problem fully in a few posts above. Do I need to post it again or create a new discussion so that your colleague can better understand the issue?

    • Rob
      Forum Moderator

      I've just reminded him. 

      • Aras karimi
        Subscriber

        Maybe your colleague didn't see the problem correctly because the title of this discussion is slightly different from my problem. I'll post the my problem again in the message below, I hope you tell him that my problem is the message below.

      • Aras karimi
        Subscriber

        (I hope a way will be found after 3 months, I am very disappointed and worried.)

        I am optimizing the 3D shape of a wing using Fluent’s adjoint solver. My mesh is a structure type with hexahedral elements that I produced with ICEM. During the optimization, the mesh elements lose their quality and are stretched in some areas, which causes errors in the solution. Now, in order to ensure the result obtained by the optimizer, it is necessary to remesh the geometry.

        It was mentioned in the adjoint solver user guide ( Remeshing is required during optimization to achieve a reliable optimized geometry ).
        The adjoint solver automatically performs the remeshing process in 3D cases only on tetrahedral elements without a boundary layer, and unfortunately, it is not able to remesh on hexahedral elements, which is disappointing. Due to the lack of automatic remeshing of the adjoint solver for hexahedral elements, the deformed geometry must be manually remeshed.(Meaning of Re-meshing: geometry meshing is deformed)

        Summary
        On the initial geometry, a structure mesh with hexahedral elements was created by ICEM. After the optimization process by the adjoint solver, STL files, .cas and .dat of the deformed geometry are available. We have three files that we can use for meshing the deformed geometry.

        According to the reviews, the software is not able to create a structured mesh on the STL file. But the ICEM software reads the STL files, but I could not convert it into a meshable geometry.

        I hope you can help me, what is the solution for remeshing the deformed geometry whose mesh is of the structured type with hexahedral elements ?

        Regards.

Viewing 19 reply threads
  • The topic ‘how to get a .msh file after optimization with adjoint solver’ is closed to new replies.