General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

3 Problems: Import .DXF and turn it 3d. Meshing problems. Import 2 models into 1

    • Nick Makaroglou
      Subscriber

      Hello everyone, I have 3 problems that I need help with. For my thesis I need to create 2 spur gears, 1 with 21 teeth and the other with 42, both module 5 and do simulations on them. I tried creating them but it's hard for me and some things I simply don't get, so I tried finding them online but there are many things I get stuck on there as well. I have found one website (this one: https://evolventdesign.com/pages/spur-gear-generator ) where I can create both on the same file, but I can only download the file as .DXF or .SVG and as far as I know Ansys doesn't support that. I have found some way older forums that say you can directly import the .DXF file to spaceclaim and then somehow make it 3d but they don't say how. So that's my 1st problem can I use that .DXF file and then turn it into a 3d model to use it on mechanical? If not I have found another website (https://www.stlgears.com/generators/3dprint) where I can create the gears separately and download them as .stl file which I can import easily to workbench. The problem now is when I try to create a mesh I have this error and I don't know how to solve it.

      Lastly, my final problem is how to import both of them into workbench again, line them up so that the small tooth in inside the 2 bigger ones, as to get them ready to apply torque and run the simulations which I know how to do. I think you import both of them like this:

      But when I open the model nothing shows up since I believe the mesh hasn't been created on the 2 parts. Any help will be greatly appreciated in figuring this out.

    • mjmiddle
      Ansys Employee

      It sounds like you just started using SpaceClaim and workbench. You will need to get some experience by going through training tutorials. For SpaceClaim:

      http://www.spaceclaim.com/en/Support/Tutorials/Essentials.aspx

      There are tutorials for Essentials, Modules, Extras sections.

      There is also a SpaceClaim introductory course on the Ansys Learning Hub (ALH) if you have a subscription:

      https://www.ansys.com/services/ansys-learning-hub

      The is no reason you can't create both gears in the same SpaceClaim session, positioned exactly how you want, but you could also choose to import a DXF and work in assembly mode if you want. When you import the DXF, if the curves make a closed loop it should automativcally make a surface and you can use the Pull tool to pull to a solid. If they don't make a closed loop, you can sketch some curves to close the loop at the gaps. If it doesn't automatically make a surface upon import of the DXF, you can use the Fill tool to maker a surface from the closed loop of curves. You'll probably want to toggle the "Patch fill" in the Fill tool options panel:

      If you make or import the two gears separately, and use assembly mode, it will import the mesh into the downstream assembled model, and synthesize the geometry. This means you must generate the mesh in the upstream component models. Then right click on the Model cell in each at workbench level to "Update." The Model cell will show a green check mark when it is ready to transfer the data downstream.

      See the following starting page in the Ansys help for model assembly:

      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v232/en/wb_sim/ds_mech_model_import.html

      Click the "Model Alignment" hyperlink at the bottom.

       

      • Nick Makaroglou
        Subscriber

        Hello once again,

        I recreated the steps on a different computer and it still froze although in a later step, I believe. What I mean is, it showed me an input of how much I want the extrusion to be I tried inputting a number but it was frozen for good. Is it a file problem or a software problem? Since I'm using the student version and it is more limited than the actual one. Because I know it should work as others have done the same thing.

    • mjmiddle
      Ansys Employee

      STL is composed of triangles. It can be messy geometry and may be a problem to mesh directly unless you clean it up in a software that can handle mesh-based geometry such as SpaceClaim. It also doesn't usually have well defined patches (faces), so the default patch based tetrahedral mesher wouldn't work. You could insert a mesh method and set to the patch independent tetrahedral method. Or maybe you got the error simply because you need to set appropriate element sizes. There is an introductory workbench meshing app training course in the Ansys Learning Hub.

      It's best not to work with STL when you don't need to. It complicates things. Mesh based data is normally only provided from a laser scan of a real part (reverse engneering). Or it may come from the deformed mesh of a previous analysis in Ansys or other analysis software.

      • Nick Makaroglou
        Subscriber

        Hello and thank you very much for answering! I haven't used SpaceClaim at all yes. I am using DesignModeler for everything since all the tutorials and videos I found were showcasing that. I brought up SpaceClaim because the forum I found said to use it in order to import the DXF file and turn it 3d. I know SpaceClaim is better and newer but I have already learnt how to use DesignModeler, so I plan on sticking with it unless necessary, like right now. Having said that I tried your suggestion but after I use the pull tool to make it 3d SpaceClaim simply freezes and nothing happens. The photo is after I have started to pull the image and the freeze happens.

        For the importing of the 2 gears I believe I understand what you mean but since they are in STL form and as you said it's not worth it on working with it, I won't continue finding a solution for it. From the start it was a back up let's say, since I prefer using the DXF method, considering I can have both gears set up to go and later if needed from the website I can create new ones easily with different dimensions etc, instead of starting from scratch. That's why I want to solve this problem instead of trying to create new gears myself. Thank you very much again for all the needed help you will provide me!

    • mjmiddle
      Ansys Employee

      SpaceClaim can be slow during a pull if there is a lot of data. If the curves are composed of thousands of tiny curve segments, it may cause a a long operation or a freezing. Or it may be a graphics display problem. Or there my be some problem with the data from DXF. Are you able to use Fill tool first to make a surface? Turn on the path fill option.

      You don't need to use assembly mode. You can open both DXF files into the same DesignModeler file or SpaceClaim file. For DM, just use "File > Attach to Active CAD Geometry" twice, or "File > Import External Geometry File" depending on whether you have the associative interface or direct reader installed for AutoCAD:

      For SpaceClaim, just use "Assembly > File" to import into the same file.

      Do the gear teeth have complex curvature? If not, it would be very easy to create the gears new. You can sketch one crest-and-trough and copy around to make the full gear.

      • Nick Makaroglou
        Subscriber

        Hello and thank you for answering. I believe the gears are composed of thousands of tiny curve segments as you said. As you can see in the photo all the curves are composed like this. That's why the program freezes. I left it running for 20 mins just in case and nothing changed.

        Yes I can use the patch fill, it takes 3 mins to load, click the checkmark and I get this result/error: "Could not replace faces with a single face"

        Before:

        After:

        Now for design modeler, I tried importing the file but it doesn't work there as well. For "Attach to Active CAD Geometry" I click it and then for source I put the DXF file and click generate and then I get those error messages: "No compatible interface found for this file type", "Geometry Interface not found", "Attach failed". For "Import External Geometry File" I get the same ones. My configuration manager looks like this:

        For the gears, i don't think their curvature is complex, I am using those measurements:

        From this website (https://evolventdesign.com/pages/spur-gear-generator). Now I was planning on creating them yes, but for my thesis I will need to run simulations on different tooth counts and different pressure angles as to get a variety of data. If it was just 2 gears I would have created them yes, but since a variety will be needed that's why I wanted to go with a spur gear generator website, to eliminate the time needed to create all those different ones and yet I am nowhere near close haha...

    • Nick Makaroglou
      Subscriber

      I have a new amazing update! Instead of trying to figure out why the DXF file was not working, I thought to convert it to a file that would work. So I used a website and changed it to a .dwg file and everything worked in SpaceClaim, thankfully! My only "issue" was that although I have my units set to metric the extrusion was showing inches, as shown in the photo.

      Now I have new problems. On mechanical, when I tried to create the mesh I got these errors:

    • mjmiddle
      Ansys Employee

      I think the problem with your Pull and patch Fill operations is that you are doing both gears at the same time, Since they touch it is trying to make one face or one body, which would be non-manifold. Do each gear separately for both the patch fill and Pull. For the Pull make sure to toggle on "No merge" in the options. This means you may need to carefully select curves where the gears touch so that you are only getting curves that belong to one side. For each Fill or Pull you want to select only one closed loop of curves at a time in this case.

      I can see that it is composed of a lot of tiny curve segments. You could try "Repair > Simplify" to see if it automatically makes good approximations. Or you could go into sketch mode and draw splines over the curves by clicking locations over the curves. The more locations you select, the more closely the spline will match. You only need to make one periodic portion (crest and through of a tooth). Then copt all around and delete the original DXF/DWG curves. Don't make just one spline to fit the entire crest and trough. Make a new spline for each great change in curvature. So the locations that look like sharper corners, but are really small fillets should be new splines.

      For DXF/DWG import, it comes from AutoCAD. So you need to select AutoCAD in the first tab of the CAD Configuration Manager, choose the direct reader or associative interface (AutoCAD installed)  and go to the last tab and press "Configure Selected CAD Products." Afterward, you can press "Display Configuration Log File" to see if there were problems. It needs to be run with an account that has administrative permissions as well as right click to "Run as Administrator."

      As far as meshing, you may need to set smaller element sizes, but most likely there are still some errors with the geometry. Try right clicking on the bodies in SpaceClaim and choosing "Check Geometry."

      • Nick Makaroglou
        Subscriber

        Hello! I didn't find out how to do the patch fill separately, since for everything I drag the selection and it grey's everything out. I tried that with the teeth that weren't close to the other one and then tried with control+ right click to grey the rest but that didn't work out. I still got the faces error. If I do the "Extend Fill" it works, also I did the pulls separately and also increased the clearance between the 2 gears from 0.05 to 0.5 mm and that worked. For the 0.05 clearance the errors still remain, so that clearance is problematic with the extend patch, since I do both they get connected. I do delete the connection that's created but still on workbench the mesh can't be created. For the 0.5 I can create the mesh no problem. My new problem is that, as you can see the mesh is way too detailed and since I have the student version the program can't solve.

        So is there any way to decrease the mesh? I tried putting a bigger element size, like 50 and 500 but the teeth were again the same. If not, then I can try and do a cross section (in SpaceClaim?) and just keep 3 teeth from each gear. Will that change the solution? I do the "Repair > Simplify", I don't see any differences. I understand about the splines but since it works I don't think that will be necessary, plus if I am going to go with that route I should just make them new. Thank you very much for the suggestion! I tried changing the settings of the "CAD Configuration Manager" to direct reader for AutoCAD, since I don't have it installed. Everything said success on "Configure Selected CAD Products" tab but when I closed the manager and reopened it it was back to associative interface. I am admin and I had opened it with run as admin, maybe because it's the student version I can't change it? Lastly, I did choose "Check Geometry" but it showed no errors there.

    • mjmiddle
      Ansys Employee

      If you set some smaller mesh edge sizings and it's still too small mesh on the teeth then it's got to be global controls responsible. If you have capture curvature turned on then increase the min size. Turn proximity off. Or use the adaptive mesh setting rather than curvature and proximity.

      For the CAD Configuration manager, the selection shown when you open it has no bearing on what you last set.

      • Nick Makaroglou
        Subscriber

        I had adaptive mesh on from the start. I tried using the capture curvature settings as you said but that made things worse. Lets say that the teeth weren't teeth any more, so I turned adaptive mesh on again. Is there any other option to decrease the mesh on the teeth? Just changing the element size doesn't change much.

    • mjmiddle
      Ansys Employee

      Have you gone over the mesh training course in the Ansys learning hub? There are other global parameters. There is a general element size. There is the span angle center for the adaptive sizing.

      If you use the capture curvature, adjust the minimum element size.

      Also, maybe you have created the gears as vert thin bodies, and the body thickness is affecting the elements size.

    • Nick Makaroglou
      Subscriber

      Hello and I am sorry for the late reply but it is exam season so I am having trouble finding time for my thesis.

      I haven't done the training course in the learning hub, since it needs a paid subscription and I am an uni student. I have done many Structures courses from the Innovation Space page. I know of the span angle center, I have set it to coarse. Also from the start, I am changing the general element size, but as I said the mesh was still the same with element size 5m or 200m.

      For example:

      Default Element size:

      500m Element Size

      I don't use capture curvature, as I have adaptive meshing on. I tried using it per your last message and also decreased the min element size, but the end result was not depicting a gear any more.

      Everything was set to default and I got this result:

      I changed the Element Size and Curvature Min Size:

      I don't know if the gears created from the web page are vert thin bodies, how can I check that? Also about the body thickness, should I decrease its size during the Pull/ Extraction, in SpaceClaim? As it stands it is set to 250mm.

    • mjmiddle
      Ansys Employee

      It was a typo when I wrote "vert thin bodies." It was meant to be "very thin bodies." The body thickness is something for you to determine. There should be some real gear thickness.  Or are you trying to analyze in 2D? For that, don't make solids in SpaceClaim. Just make the surfaces in the XY plane, and set probably "plane stress" on the surface bodies if the gears are meant to be thin relative to the other directions.

      Your remaining problems are all mesh sizing issues, and you really need more training with using the meshing in Mechanical. The geometry is Ok since it is able to generate a mesh, albeit too fine in your first case. For the adaptive sizing set that "Element size" near the top to a value. It is set to "default" in the first picture. Set it to the size you want most common throughout the bodies, at least a lot larger than the element size you see on the tooth. Your last picture show the affect, although 50.0 m is obviously too large. Maybe 0.4m would be more accurate. You can set a smaller local "edge size" on the edges around the circumference where the teeth are.

Viewing 9 reply threads
  • You must be logged in to reply to this topic.