Jump to content

Recommended Posts

Hi,

I need to create nodes for elements of user specified sizes. For eg, If the user specifies size 6 for the element, the nodes should be created at (0,0), (0,6), (6,0), (6,6). If the user specifies size 8 for the element, the nodes should be created at (0,0), (0,8), (8,0), (8,8). This is to be repeated to generate a geometry 830 mm*450 mm . therefore, if the element is of size 8, 830/8 elements must be created along the length and 450/8 elements along the width with their corresponding nodes. Please tell me how to automate this? Also, I need flexibility to change 830*450 mm dimensions to user specified dimensions (say 500*250 or 1000*600 etc etc). How do I incorporate this??

 

thanks,

Kushal. 

Share this post


Link to post
Share on other sites

Hi kushal

 

it is not possible to create element of same size within that dimensions i.e 830*450 until element size completely divide dimension 830 & 450 

user specified size say 8 , does not divide 830 completely so every element size can't be 8..

 

#####Script 

 

set length [hm_getint Length "Enter the length"]
set width [hm_getint Width "Enter the Width"]
set elemSize [hm_getint size "Enter the element size"]

set length_count 0
set width_count 0

while {$length_count < $length} {
    while {$width_count < $width} {
        *createnode $length_count $width_count 0 0
        incr width_count $elemSize
        if {$width_count >= $width} {
            *createnode $length_count $width 0 0
        }
    }
    set width_count 0
    incr length_count $elemSize
    if {$length_count >= $length} {
            while {$width_count < $width} {
                *createnode $length $width_count 0 0
                incr width_count $elemSize
                if {$width_count >= $width} {
                    *createnode $length $width 0 0
                }
            }
        }


}

 

 

 

 

 

Share this post


Link to post
Share on other sites
On 03/04/2018 at 2:11 PM, Kushgen said:

Hi,

I need to create nodes for elements of user specified sizes. For eg, If the user specifies size 6 for the element, the nodes should be created at (0,0), (0,6), (6,0), (6,6). If the user specifies size 8 for the element, the nodes should be created at (0,0), (0,8), (8,0), (8,8). This is to be repeated to generate a geometry 830 mm*450 mm . therefore, if the element is of size 8, 830/8 elements must be created along the length and 450/8 elements along the width with their corresponding nodes. Please tell me how to automate this? Also, I need flexibility to change 830*450 mm dimensions to user specified dimensions (say 500*250 or 1000*600 etc etc). How do I incorporate this??

 

thanks,

Kushal. 

 

Hi,

 

You can create one big element with that dimension for example 830x450mm, do a remesh on that element with 8mm mesh size/all quads then get all the nodes.

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...