All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM: To check the element quality. OBJECTIVE: Create element quality check macro for 2D and 3D elements. Create a button for each criterion. On pressing the button the elements should be highlighted using temp nodes. Entry boxes next to the buttons will accept the quality criteria value. PROCEDURE:…
sriram srikanth
updated on 16 Feb 2022
AIM:
To check the element quality.
OBJECTIVE:
PROCEDURE:
To check elements quality criteria hypermesh provides various commands. Using this command failing elements can be easily identified.
STEPS TO IDENTIFY AND CREATE TEMP NODES:
TCL_MODIFY COMMANDS:
*elementtestwarpage - Check warpage for elements.
*elementtestaspect - Check aspect ratio of elements.
*elementtestskew - Check skew anlge of elements.
*elementtestlength - Check Min/Max length with respect to selection.
*elementtestinterangle - Check Min/Max angle for Quad/Tria with respect to selection.
*elementtesttetcollapse - Check tet collapse for 3D elements.
CODE:
*clearmarkall 1 ; *clearmarkall 2
*unmaskall2
*nodecleartempmark
# $min_l
proc min_length {} {
*unmaskall2
*nodecleartempmark
# *clearmarkall 1 ; *clearmarkall 2
set min_l [hm_getstring "2D length <" ]
*createmark elems 1 "displayed"
*elementtestlength elems 1 $min_l 2 1 2 0 "2D length <"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
*unmaskall2
}
# $max_l
proc max_length {} {
*unmaskall2
*nodecleartempmark
set max_l [hm_getstring "2D length >" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestlength elems 1 $max_l 2 0 2 0 "2D length >"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
*unmaskall2
}
# $warp
proc warpage {} {
*unmaskall2
*nodecleartempmark
set warp [hm_getstring "warpangle" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestwarpage elems 1 $warp 2 2 0 "Warpage"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $asp_r
proc aspect_ratio {} {
*unmaskall2
*nodecleartempmark
set asp_r [hm_getstring "Aspect Ratio" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestaspect elems 1 $asp_r 2 2 0 "Aspect ratio "
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $skew
proc skewness {} {
*unmaskall2
*nodecleartempmark
set skew [hm_getstring "Skew" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestskew elems 1 $skew 2 2 0 "Skewness"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $jac
proc jacobian {} {
*unmaskall2
*nodecleartempmark
set jac [hm_getstring "Jacobian" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestjackobian elems 1 $jac 2 2 0 "jacobian"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $min_t_
proc min_t_angle {} {
*unmaskall2
*nodecleartempmark
set min_t [hm_getstring "minimum tria angle" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestinterangle elems 1 $min_t 1 2 1 2 0 "minimum tria angle"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $max_t
proc max_t_angle {} {
*unmaskall2
*nodecleartempmark
set max_t [hm_getstring "maximum tria angle" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestinterangle elems 1 $max_t 1 2 0 2 0 "maximum tria angle"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $min_q
proc min_q_angle {} {
*unmaskall2
*nodecleartempmark
set min_q [hm_getstring "minimum quad angle" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestinterangle elems 1 $min_q 0 2 1 2 0 "minimum quad angle"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# $max_q
proc max_q_angle {} {
*unmaskall2
*nodecleartempmark
set max_q [hm_getstring "maximum maximum angle" ]
*createmark elems 1 "displayed"
*createmark elems 2
*elementtestinterangle elems 1 $max_q 1 2 0 2 0 "maximum quad angle"
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
}
# #GUI
set a .element
catch [destroy $a]
toplevel $a
wm title $a "QUALITY CHECK WIZARD"
wm geometry $a 400x600+100+300;
wm resizable $a 0 0
wm deiconify $a
set C "min_length max_length warpage aspect_ratio skewness jacobian min_t_angle max_t_angle min_q_angle max_q_angle "
set R [llength $C]
set L " Min_length Max_length Warpage Aspectratio Skewness Jacobian Min_t_angle Max_t_angle Min_q_angle Max_q_angle "
set n 0
set a1 10
set a2 5
# puts $R
set b1 140
set b2 5
set n 0
# button loop
for {set i 1} {$i <= $R} {incr i} {
button $a.$i -text [lindex $L $n ] -bg grey -command [lindex $C $n ] ; place $a.$i -x $a1 -y $a2 -width 120 -height 40;
set n [expr {$n+1}]
set a2 [expr {$a2+55}]
}
OUTPUT:
RESULTS:
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week - 12 - Creating the locator, writing and reading the node data
CHALLENGE-12
30 Jul 2022 07:44 AM IST
Project 1- Building a Master TCL/TK Macro
PROJECT-1
30 Jul 2022 07:42 AM IST
Project - 2 - Generating the report for hypermesh file
PROJECT-2
30 Jul 2022 07:41 AM IST
Week - 11 - Element quality check
AIM: To check the element quality. OBJECTIVE: Create element quality check macro for 2D and 3D elements. Create a button for each criterion. On pressing the button the elements should be highlighted using temp nodes. Entry boxes next to the buttons will accept the quality criteria value. PROCEDURE:…
16 Feb 2022 11:29 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.