Hi,
at my university I use COMSOL for biomedical FEM simulations. The problem is that COMSOL uses it's own heuristic algorithm to divide surface of every imported model coming from 3D scanner or medical image segmentation. That results in terrible face division (elements are too big, merged and irregular) and it's impossible to set boundary conditions precisely. After long research I found out that the only way is to prepare model before importing it to COMSOL and only some expensive 3D modelling software (like GeoMagic for SolidWorks) can do it. However I've heard that there is also another method, which requires software available at my univeristy - MatLab. The idea is to write a script that would put a surface mesh on my 3D model and allow export in COMSOL-friendly format (LiveLink is not possible in this case - COMSOL is running on different university computers than MatLab).
Such a script should allow me to perform the following steps:
-
Start from model obtained by 3D scan. It can be in form of point cloud or solid model saved as stl/obj/ply
-
The script is putting surface mesh and performing face partitioning on my model
-
Export resulting model in CAD/mesh format (igs,stp,bdf or another one that contains information about surface divison and is accepted by COMSOL
So the question is - is it even possible ? Are there any scripts like that available for download ? I've never been using MatLab so I can't do it without help.
Here's an image showing desired effect. Blue triangles have boudary condition applied on them.
Thank you in advance for your help
Thanks for fast reply. So I can load and open my stl file in MatLab (I will probably skip point cloud form because so far I've only been working on solid models). But can I remesh it there and export it in format that will allow me to work on proper, regular mesh in COMSOL ?
Because when I open my stl model in, let's say, Meshmixer and work on its mesh, it shows me perfect surface division. But when I import it to COMSOL the program ignores that mesh (I thought it's because stl format doesn't keep any information about face partitioning) and devides faces automatically. It must be possible to avoid it because that bone model in attached picture was downloaded by my friend from grabcad and it was somehow prepared by its creator so that COMSOL shows face division correctly.
Find the treasures in MATLAB Central and discover how the community can help you!