Tetra dihedral quality check

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

How can I find the angle between face pairs (or face normals) in a tet element? There is the tria faces min and max in the 3D check elements, but that is not quite what I'm looking for as those measure face angles and not the true angle between the face pairs. Warpage seems very similar to what i want to check, but that's only for quads. Thanks.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hmm,

    I have a template to check that angles. I will post the code later.

    Don't understand why altair did not make that angle checking in hm, i know that some people must use ansa to check it

    A script on exchange can do it, but very slowly i think

  • Beta
    Beta New Altair Community Member
    edited August 2018

    Hi,

     

    I think the quality you want to check is corresponding to the 'tet collapse'. this criterion represents the height of tetra hence it could partly show you how small the angle between a surface pair could be. 

     Anyway, as Tinh said, a direct checking function is still not available for now.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hi Toan, I agree that there are probably other tools that also find similarly bad tet elements. However I use another FEA solver that uses the dihedral angles for quality and need an analogous check for my HM meshes. It seems like a very basic check that should be available for any 3D element.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited August 2018

    When this such checking does not available in Hypermesh, I don't think that Altair's engineers don't KNOW this quality checking. But maybe they think there's already another similar (and enough) checking in Hypermesh. Who knows maybe this feature will be available within the next release? :P/emoticons/default_tongue.png' srcset='/emoticons/tongue@2x.png 2x' title=':P' width='20' />

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi,

    Anyone need to check DA for tetra can use this proc

    it's shot, easy using but a bit slow with big model (30ms/id, suitable for <100,000ids) 

     

     proc ::p_CheckDA {minTet maxTet} { 	set pi 3.1415926535898 	set getvector3 {{x1 y1 z1 x2 y2 z2 x3 y3 z3} {list [expr {($y2-$y1)*($z3-$z1)-($y3-$y1)*($z2-$z1)}] [expr {($z2-$z1)*($x3-$x1)-($z3-$z1)*($x2-$x1)}] [expr {($x2-$x1)*($y3-$y1)-($x3-$x1)*($y2-$y1)}]}} 	set FailElems {} 	set FailNodes {} 	set Min 180 	set Max 0 	*createmark elems 1 displayed 	*createmark elems 2 'by config' tetra4 	*markintersection elems 2 elems 1 	if {[set imax [hm_marklength elems 2]]} { 		set ElemIdList [hm_getmark elems 2] 		set ElemNodesList [join [hm_getvalue elems mark=2 dataname=nodes]] 		set CoordList [join [hm_getvalue nodes user_ids=$ElemNodesList dataname=coordinates]] 		set minc [expr {cos((180-$minTet)*$pi/180)}] 		set maxc [expr {cos((180-$maxTet)*$pi/180)}] 		set min 1 		set max -1 		foreach ElemId $ElemIdList {n1 n2 n3 n4} $ElemNodesList {x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4} $CoordList { 			if {[incr i]%5000==0} { 				hm_usermessage 'Checking DA ([format %.1f [expr 100.0*$i/$imax]]%)...' 				update 			} 			set v1 [apply $getvector3 $x1 $y1 $z1 $x3 $y3 $z3 $x2 $y2 $z2] 			set v2 [apply $getvector3 $x2 $y2 $z2 $x3 $y3 $z3 $x4 $y4 $z4] 			set v3 [apply $getvector3 $x3 $y3 $z3 $x1 $y1 $z1 $x4 $y4 $z4] 			set v4 [apply $getvector3 $x4 $y4 $z4 $x1 $y1 $z1 $x2 $y2 $z2] 			foreach {vi vj} [list $v1 $v2 $v1 $v3 $v1 $v4 $v2 $v3 $v2 $v4 $v3 $v4] {ni nj} [list $n2 $n3 $n3 $n1 $n1 $n2 $n3 $n4 $n2 $n4 $n1 $n4] { 				set cos [eval hm_triplecos $vi $vj] 				if {$cos<$minc} { 					lappend FailElems $ElemId 					lappend FailNodes $ni $nj 				} 				if {$cos>$maxc} { 					lappend FailElems $ElemId 					lappend FailNodes $ni $nj 				} 				set min [expr $cos<$min?$cos:$min] 				set max [expr $cos>$max?$cos:$max] 			} 		} 		set min [expr 180-acos($min)*180/$pi] 		set max [expr 180-acos($max)*180/$pi] 		set Min [expr $min<$Min?$min:$Min] 		set Max [expr $max>$Max?$max:$Max] 	} 	*clearmark elems 1 	*nodecleartempmark 	if {[llength $FailElems]} { 		eval *createmark elems 2 $FailElems 		hm_highlightmark elems 2 h 		eval *createmark nodes 1 $FailNodes 		*nodemarkaddtempmark 1 	} 	list $Min $Max }

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Thank you tinh!

     

    What I'm thinking I'll do is a hybrid approach. Taking Toan's advice, I'll trim down the number of elements by running a tet collapse first, then run your dihedral code over the remaining elements. That way I'm not running the dihedral check over elements that are good. Since the tet collapse check is so fast, it makes the dihedral check not too slow, even for large numbers of elements. It does make me wonder how Altair optimized it's quality checks.

     

    Thanks again!

  • Alex Nguyen
    Alex Nguyen Altair Community Member
    edited June 2019

    Dear everyone

    Now I have a problem with dihedral angle of face elems too small. I've already checked and found these elems ( tria elems). But I don't know how to modify them.

    Do I have to remesh or use any tool in order to modify directly?

    Please help me

    Thank you and Best Regards

     

    <?xml version="1.0" encoding="UTF-8"?>1.JPG

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2019

    @Alex Nguyen : Refine your mesh!