Creating RBE3 element with 1946 independent nodes

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello all,

 

I am trying to create rbe3 element with 1.0 weight to independent nodes , however, following code generates 0.0 weight for independent nodes.

 

my tcl code is ;

 

##################################################################

*createmark nodes 1 'by sphere' -341.255 -75.946 6.482 0.25 inside 1 all 0
*appendmark nodes 1 'by face'
set rbl [hm_getmark nodes 1]
set nrbl [llength $rbl]

 

for {set i 0} {$i < $nrbl} {incr i 1} { 
lappend dofl 123456
}
*createarray $nrbl [puts $dofl]

for {set i 0} {$i < $nrbl} {incr i 1} { 
lappend wgh1 1.500000
}

*createdoublearray $nrbl [puts $wgh1]
*createnode -341.761 9.994e-02 1.549 0 0 0
*createmark nodes 2 'by sphere' -341.761 9.994e-02 1.549 0.2 inside 1 all 0
*rbe3 1 1 $nrbl 1 $nrbl [hm_getmark nodes 2] 123456 0

 

########################################################################
 

At the end of the day, I want to generate following RBE3;

 

 

<?xml version="1.0" encoding="UTF-8"?>rbe.PNG

Answers

  • Merula_20758
    Merula_20758 Altair Community Member
    edited May 2017

    Hey,

     

    as help says:

    *rbe3 mark_id independent_dofs dof_size independent_weights weight_size dependent_node dof weight

     

    the last parameter is the weight, which is zero in your case.

     

    If you bother, here is my way of creating rbe3:

     

    eval *createmark nodes 1 {'by box'} [expr $x-$delta] [expr $y-$delta] [expr $z-$delta] [expr $x+$delta] [expr $y+$delta] [expr $z+$delta] 0 inside 0 0 0
    hm_createmark nodes 2 [expr $nodeId]
    *markdifference nodes 1 nodes 2
    set numberOfNodes [hm_marklength node 1]
    #Arrays
    set arrI() [lrepeat $numberOfNodes 123]
    set arrD() [lrepeat $numberOfNodes 1.0]
    eval *createarray $numberOfNodes $arrI()    ;
    eval *createdoublearray $numberOfNodes $arrD();

    eval *rbe3 1 1 $numberOfNodes 1 $numberOfNodes $nodeId 123456 1;

     

    Best regards,

    Merula

     

  • tinh
    tinh Altair Community Member
    edited May 2017

    He was wrong at 'puts dofl' and 'puts wgh1', the puts command returns nothing

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    Hi Merula,

     

    Tank you for support. I have developed following code based on your suggestions. Finally it works :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />. 

     

    Hi Tinh,

     

    Thank you for your help.

     

    ######################################################################

    *clearmark nodes all
    *createmark nodes 1 'by sphere' -341.255 -75.946 6.482 0.25 inside 1 all 0
    *appendmark nodes 1 'by sphere' -341.252 76.398 -3.898 0.25 inside 1 all 0
    *appendmark nodes 1 'by face'
    set nrbl [hm_marklength node 1]
    set dofl [lrepeat $nrbl 123456]
    set wgh1 [lrepeat $nrbl 1]
    eval *createarray $nrbl $dofl
    eval *createdoublearray $nrbl $wgh1
    *createnode -341.761 9.994e-02 1.549 0 0 0
    *createmark nodes 2 'by sphere' -341.761 9.994e-02 1.549 0.2 inside 1 all 0
    eval *rbe3 1 1 $nrbl 1 $nrbl [hm_getmark nodes 2] 123456 1
    *nodecleartempmark 

    ###################################################################