Jump to content
GreatNate

Tetra dihedral quality check

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
}

 

 

Share this post


Link to post
Share on other sites

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!

tinh likes this

Share this post


Link to post
Share on other sites

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

 

1.JPG

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...