How to improve the mesh quality?

130 views
Skip to first unread message

Wen LUO

unread,
May 6, 2022, 1:50:23 PM5/6/22
to iso2mesh-users
Dear Dr. Fang,

Hope this email finds you well.
I have recently started to use iso2mesh to create a mesh for the ct image of CFRP composites. However, the mesh at the fiber/matrix interface is bumpy (please see the attached figure). I was wondering if there are ways to further improve the mesh quality at the interface without refining the mesh?

Many thanks for your help,
Wen

vol_mesh.png

Qianqian Fang

unread,
May 7, 2022, 1:27:58 AM5/7/22
to iso2mesh-users
you can call 

[nbbx, fbbx]=meshabox(...);
etubes=elem(elem(:,5)==0, 1:4);  % assume tubes have label 0, if not, replace 0 by the actual label
ftubes=volface(etubes);
[ntubes, etubes] = removeisolatednode(node(:,1:3), ftubes(:,1:3));
[no, fc]= surfboolean(nbbx, fbbx, 'first', ntubes, etubes)
[node, elem]=s2m(no, fc, 1, ...)

to create flat boundaries along the bounding box. the meshabox() call should define a new bounding box that is slightly inside of your current mesh bounding box, say by 1-2 voxels.

use the latest github version of iso2mesh to ensure the correct orientation of the triangles for a successful surfboolean.

feel free to upload your mesh or volume data to a downlodable url and I will be happy to take a look

Wen LUO

unread,
May 11, 2022, 2:08:25 PM5/11/22
to iso2mesh-users
Hi Dr. Fang,

Sorry for the late reply and thank you for your comments. The volume data, element, and, node data can be found from the following url:
https://drive.google.com/drive/folders/10lSj2mCeDVQqFgIBWysvo849QYZoZOq0?usp=sharing
I appreciate if you could kindly take a look.

Thanks again for your help,
Wen

Qianqian Fang

unread,
May 11, 2022, 5:55:39 PM5/11/22
to iso2mes...@googlegroups.com, Wen LUO
hi Wen,

I tried your data, the approach I suggested is not robust enough.

However, I tried the new cgalmesh code updated by Laurent Rineau, who is the maintainer of the CGAL project, in this PR


I was able to obtain perfectly flat bounding box meshes, see attached plot.

in order for this to work, you must recompile cgalmesh executable currently stored in iso2mesh/bin using the source code located under iso2mesh/tools/cgalmesh. When you type "cmake . " inside the folder and receive the below error (I got it on Ubuntu 20.04):

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
-- NOTICE: This program requires Boost >= 1.34.1, and will not be compiled.

you will need to modify CMakeLists.txt to get around this issue.

if you can find a machine with 64bit Linux, you can directly download the below file, unzip it, and copy/paste it under iso2mesh/bin and overwrite the existing file. Make sure it is set with executable permission (chmod +x cgalmesh.mexa64)



then, running the below command will produce something similar to what's shown in the attached figure. It took about 5 min on my machine to finish though.


One question for Laurent:

the generated mesh seems to very refined near media boundaries. In the past, I have been setting the `facet_distance` parameter via iso2mesh's opt.distbound to control the adaptiveness of meshes, but I tried a few values, I am not able to see setting opt.distbound making any impact. any thoughts? from the C++ code, it looks like it has been set in the Facet_criteria.

Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/acd7e0ed-aa9f-4876-812a-9be039c791a5n%40googlegroups.com.


ctimage.png

Wen LUO

unread,
May 12, 2022, 2:06:07 AM5/12/22
to iso2mesh-users
Thank you, Dr. Fang!
The mesh around the circles indeed looks much better than my previous mesh. As you mentioned, the mesh near the boundaries is too dense and would be inappropriate for the subsequent FE analysis.
It would be really nice if you know of any solutions.
Thanks again,
Wen
Reply all
Reply to author
Forward
0 new messages