tcl script for rbe3
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 !
Answers
-
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
0 -
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;
}0 -
Hi
from tcl8.5 you can save time generating a list by
set arrI [lrepeat $num 123]
set arrD [lrepeat $num 1.0]
/emoticons/default_wink.png' alt=';)' srcset='/emoticons/wink@2x.png 2x' width='20' height='20'>
0 -
Altair Forum User said:
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 ?
0 -
Altair Forum User said:
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
0 -
Altair Forum User said:
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 /emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>
0