Question #653503 on Yade changed:
https://answers.launchpad.net/yade/+question/653503

Jan Stránský proposed the following answer:
in binary representation:
1 means stress controlled direction
0 means strain controlled direction

you can use this functions to play with:
##########
def array2mask(xx,yy,zz,yz,zx,xy):
        ret = 0
        ret |= xx << 0
        ret |= yy << 1
        ret |= zz << 2
        ret |= yz << 3
        ret |= zx << 4
        ret |= xy << 5
        return ret

def pprint(v):
        print "0b{:06b}".format(v)
pprint(array2mask(0,0,0, 0,0,0)) # everything strain controlled
pprint(array2mask(1,1,1, 1,1,1)) # everythin stress controlled
pprint(array2mask(0,1,1, 1,1,1)) # xx strain controled, otherwise stress 
controled. With goal=(v,0,0, 0,0,0) = uniaxial strain with all stress 0 except 
axial xx stress
pprint(array2mask(0,0,1, 0,1,0)) # something random
##########

label.stressMask=0b000011:
stress controlled: xx,yy
strain controlled: zz,yz,zx,xy

label.stressMask=0b100001
stress controlled: xx, xy
strain controlled: yy,zz,yz,zx

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to