How to restrict Aspect Ratio less than particular value?

Akshay Manthekar
Akshay Manthekar Altair Community Member
edited April 28 in Community Q&A

Hi Guys,

I wanted to know how should I proceed with this challenge? I have a geometry where I make split and in that splitted area I want to keep my aspect ratio of elements < 5 STRICTLY by also keeping 2 rows of elements as shown below. I make calculations for deciding element size, but some elements are still having aspect ratio > 5. 

Here are the calculations:
w0 = horizontal dist. = 7.5;
w1 = vertical dist. = 9.0;
AR = 5.0;
min(w0,w1) = 7.5
So, element length = floor(5.0 * (7.5/2)) = 18.0;

So I specify element size as 18 in automesh module and some elements have aspect ratio > 5.

Code snippet:

set AR 5.0; # aspect ratio  # CREATING LIST TO STORE WELD LENGTHS set weld_lengths [list $::WeldEdit::g_var(w0) $::WeldEdit::g_var(w1)]; set x [expr {[::tcl::mathfunc::min {*}$weld_lengths]/2.0 * $AR}]; set elem_length [expr floor($x)]; puts "Element global size: $elem_length"; *interactiveremeshsurf 2 $elem_length 4 4 2 1 1 set flatsurfs [hm_getmark surfs 2]; set flatsurfsqty [llength $flatsurfs]; # no of flat surfaces attached to the selected lines by user puts "No of flat surfaces: $flatsurfsqty"; for {set i 0} {$i < $flatsurfsqty} {incr i} { 	*set_meshfaceparams $i 2 4 0 0 1 0.5 1 1 	*automesh $i 2 4 }  *storemeshtodatabase 1 *ameshclearsurface

If you have anything in mind then please help me out here.

image

Tagged:

Answers