Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Poor man's import geometry

Please login with a confirmed email address before reporting spam

I was wondering if anybody here could suggest, if possible, how I may create a 3D geometry in Comsol from an imported STL file. The STL file is a scan of a femur, with two distinct regions: the inner bone marrow canal and the outer layer of cortical bone. I know that this would not be an issue with the CAD import module, but I am not bleeding money to be able to afford that.

Every time I have tried thus far, I receive warning messages about intersecting faces and trouble with edges. I have tried generating an extremely fine mesh in SOLIDWORKS only for Comsol to crash due to the file size. Even when reducing this super mesh to something more agreeable, Comsol still has issues with faces and edges.

Is there another piece of software out there that can render an STL file in such a way that Comsol would happily use it? OR is the STL file format just no good for setting up a FEM simulation?

Thank you,

David


1 Reply Last Post Nov 6, 2018, 1:11 p.m. EST
Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Nov 6, 2018, 1:11 p.m. EST

Hello David, The STL file describes parts via a triangular tesselation of the surfaces. That is, the surfaces of the domains are approximated as a set of triangular patches. Now, this format is good for some purposes, in particular for 3D printing, which is what it was designed for. However, for transferring CAD data for meshing, it is not as good. One issue in particular is that the data in the file itself can have small gaps or overlaps, where the triangles do not line up exactly. This is an issue on the part of the software that was used to write the STL file, and once such a "bad" STL file has been created, it can be hard to fix.

This is not to say that the STL file format itself is "bad", it just depends upon the source of the STL file itself, and how precise that data is. There are thousands of different software programs out there than can generate an STL file, and it is (unfortunately) possible that any of them could generate an imprecise file. You may find the tips here useful: https://www.comsol.com/blogs/improved-functionality-and-tips-for-importing-stl-and-nastran-files/

Alternatively, since this is scan data, you may want to look to a tool such as Simpleware: https://www.synopsys.com/simpleware.html which can read in scan data and directly write out a valid COMSOL mesh file.

Hello David, The STL file describes parts via a triangular tesselation of the surfaces. That is, the surfaces of the domains are approximated as a set of triangular patches. Now, this format is good for some purposes, in particular for 3D printing, which is what it was designed for. However, for transferring CAD data for meshing, it is not as good. One issue in particular is that the data in the file itself can have small gaps or overlaps, where the triangles do not line up exactly. This is an issue on the part of the software that was used to write the STL file, and once such a "bad" STL file has been created, it can be hard to fix. This is not to say that the STL file format itself is "bad", it just depends upon the source of the STL file itself, and how precise that data is. There are thousands of different software programs out there than can generate an STL file, and it is (unfortunately) possible that any of them could generate an imprecise file. You may find the tips here useful: https://www.comsol.com/blogs/improved-functionality-and-tips-for-importing-stl-and-nastran-files/ Alternatively, since this is scan data, you may want to look to a tool such as Simpleware: https://www.synopsys.com/simpleware.html which can read in scan data and directly write out a valid COMSOL mesh file.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.