3D Design

3D Design

Importing XYZ point data, making a surface for the bed of a CFD solution domain

    • Mahdi
      Subscriber

      Hello Ansys community,


      I have some XYZ data in ASCII format which comprise an irregular geometry of a bed of a channel. This data was recorded by a laser scanner. I would like to make a surface out of this points, and do simulations of flow over this surface using Ansys Fluent. What steps do you suggest for this process? 


       


      Thank you all for considering reading or helping my question.

    • peteroznewman
      Subscriber

      Hello Mahdi,


      Use one of the geometry programs included with ANSYS, either DesignModeler (DM) or SpaceClaim (SC).


      Both programs can plot 3D curves through XYZ coordinates stored in a file, but the file format is different for DM and SC.



      DM has a limitation on how many points can be in a file but I forget what that limit is.  I haven't found a limit in SC yet.


      It would be best if each scan line is easily separated, such as due to it having a constant increment on one coordinate direction. That way, you can draw a curve through each scan line, then fit a surface through all the 3D curves.


      You can also try some other programs that will attempt to put a surface through the cloud of points directly. One open source (free) program is called MeshLab. I have struggled to create a surface with XYZ point data in MeshLab.


      Does the Laser Scanner export the data in STL format?  SpaceClaim can open that directly and then you can convert it to a surface.


      If you want more guidance, feel free to attach the .txt file after you post a reply or put the file into a .zip file if the text file is large since there is a 120 MB limit.

    • Mahdi
      Subscriber

      Hi Peter,


      Thank you very much for your guidance. The scanner has produced some signals that must be converted to elevation with calibration. Actually, I imported the data to Matlab, and then produced the surface there, and wrote the result as STL file (Thanks to a MATLAB expert for sharing the code online). Then, I used the Spaceclaim to read the file. 


      Actually, I am not sure now if the surface has already been produced or it needs other processes in Spaceclaim. Also, still my surface has some "outliers". Is spaceclaim able to remove outliers too? 


      I have attached the spaceclaim file here if you can kindly have a look at. 


      Thank you.


       

    • peteroznewman
      Subscriber

      Hi Mahdi,


      You have a good long way to go before you can start meshing for a CFD model.  Best to do the cleanup of the outliers in the data in matlab.


      Did the scan data come into SpaceClaim at the right scale? Here is a rectangle in mm. Are the dimensions correct?  If not, SC can easily scale it.



      Next you need the sides of the channel, the inlet, outlet and top of the channel to make the other five sides of the box that will be the fluid volume.


      You do that with the Pull tool to turn the rectangle into a solid.



      On the Facets Tab, you Convert the solid to a Facet body, then use the Subtract tool to subtract the dimpled surface from the rectangle to get a watertight facet body.  I don't know which way is up so I may have kept the wrong half after the subtract, but it's quick to do these steps over.



       


      I used the Shrinkwrap tool to smooth the surface out at a 4 mm level of detail. This step is optional. It makes larger facets.


      Finally, you convert the Facet body to a Solid Body and check the Merge Faces box.



      This is a solid body that can be meshed for the fluid volume.


      Note that the Student license will not save this file because of the 300 face limit so you must have a Research license to do this work.

    • Mahdi
      Subscriber

      Thank you so much Peter for processing it in Spaceclaim. The dimensions are correct. I have got a Research liscensce. could you please attach the geometry you have perfromed above stages on so that I have a sample?


       


      Thank you.

    • peteroznewman
      Subscriber

      Unfortunately Mahdi, I performed those operations on a Student license on my laptop so was unable to save the final result. If you can't reproduce it, I will redo it on my Commercial license on my desktop.


      The images in my post above resulted in a bed of bumps. What is the correct shape of the bed of the channel, bumps or cups? 

    • Mahdi
      Subscriber

      Hi Peter,


      The correct shape is the bumps. They are some hemispheres on an irregular bed. In the second image, the correct domain is the part of the cube on the left. 


      I am trying to reproduce the domain you have created, although I have never used Spaceclaim for creating domain. Meanwhile, if you can re-create it on your Desktop computer whenever you have time, I really appreciate that. 


      Thank you. 


       

    • peteroznewman
      Subscriber

      Are you using 2019 R2?  I used that but if you are on an older version, you won't be able to open my file. 


      Attached is the full resolution facet representation. You can use the ShrinkWrap function on that to reduce number of facets.


      Attached is a zip file with the solid representation which is 320 MB when extracted from the zip file.

    • Mahdi
      Subscriber

      Hi Peter,


      Yes. I am using 2019 R2.

    • peteroznewman
      Subscriber

      Files attached above.

    • Mahdi
      Subscriber

      Thank you very much for your time Peter. It was a great help. 

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