🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

tcl script for rbe3

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

I want to make a tcl script which will generate an rbe3 element inside a cylindrical surface. I made one, first creating faces and adding nodes present on the inner surfaces to an array. The problem is while defining an rbe3 element it asks for the no. of indepent and dependent nodes, which I'm extracting from the size of an array (used to select nodes) using (llength) and assigning it to a variable, but while defining rbe3 it doesn't accept variables even though the variable is assigned a numerical value. How to overcome this problem ?

 

 

Also, instead of creating faces and selecting nodes by face, is there any other way to select nodes present only on the cylindrical surface (defining some cyl doman/region something?) ?  so that it'll be easy to implement in script.

 

Thanks !

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    check whether or not you already have '$' before the variable

     

    also you have to prepare arrays for weight and dof, in this case 'lrepeat' is useful

     

    please check on help (hypermesh reference guide) about *createmark commmand, with option to select by cylinder

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Here is my code:


    proc make_RBE3 { nid nodeList } {
    set num [ llength $nodeList ]
    set arrI {};
    set arrD {};
    for {set i 1} {$i < $num} {incr i} {
    lappend arrI 123;
    lappend arrD 1.0;
    }

    eval *createmark nodes 1 $nodeList;
    eval *createarray $num $arrI;
    eval *createdoublearray $num $arrD;
    eval *rbe3 1 1 $num 1 $num $nid 123456 1;

    set eid [hm_getmark elems 1]
    *clearmark nodes 1;
    return $eid;
    }
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    from tcl8.5 you can save time generating a list by

    set arrI [lrepeat $num 123]

    set arrD [lrepeat $num 1.0]

     

     

    image/emoticons/default_wink.png' alt=';)' srcset='/emoticons/wink@2x.png 2x' width='20' height='20'>

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi

    check whether or not you already have '$' before the variable

     

    also you have to prepare arrays for weight and dof, in this case 'lrepeat' is useful

     

    please check on help (hypermesh reference guide) about *createmark commmand, with option to select by cylinder

    Thanks ! Using *createmark cmd 'by cylinder', it is also selecting the nodes on the side faces of the cylinder.. Any way to remove these side faces nodes and retain only curved surface nodes  ?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Thanks ! Using *createmark cmd 'by cylinder', it also selecting the nodes on the side faces of the cylinder.. Any way to remove these side faces nodes and retain only curved surface nodes  ?

    I do not much understand your question

    but please read help about *createmark thoughtfully, there are some relevant options you may concern

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    I do not much understand your question

    but please read help about *createmark thoughtfully, there are some relevant options you may concern

    Nevermind.. figured it out.. Thanks  image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>