in abaqus/cae mode ,i use getMassProperties() function to query the volume,but in viewr mode(visualization module only),that not work..
Asked
Active
Viewed 2,712 times
0
-
Why not just use cae mode? I'd assume certain functionality is restricted in view only mode for licensing reasons. – agentp Dec 23 '15 at 16:00
-
Sometimes,we get everything ready in hyperworks,and use generated .inp files for solution.so we only get .odb file to handle. – zssng Dec 25 '15 at 03:21
-
you can open the odb in cae. (actually I have never used the visualization module, always run cae) – agentp Dec 26 '15 at 01:26
-
what object are you using the getMassPropertes on? are you sure you are importing the correct modules at the beginning of your script. – will Jan 05 '16 at 23:17
-
like this mdb.models['Handling_Bushing_A25-SF-20160106165108'].rootAssembly.getMassProperties() – zssng Jan 06 '16 at 09:08
-
i open the odb in cae.it's remain the same..cae module still got nothing .so the getMassProperties() command not working too. – zssng Jan 06 '16 at 09:16
-
i haven't find a command in odb module yet.if the problem can't be solved,i will restore the volume data in cae module ,so i can retrive it latter. – zssng Jan 06 '16 at 09:21
1 Answers
1
Part volume in CAE:
from abaqus import *
mask=mdb.models['Model'].parts['part'].cells.getMask()
cellobj_sequence=mdb.models['Model'].parts['part'].cells.getSequenceFromMask(mask=mask)
part_volume=mdb.models['Model'].parts[part'].getVolume(cells=cellobj_sequence)
Assembly volume in CAE:
from abaqus import *
prop=mdb.models['Model'].rootAssembly.getMassProperties()
(Now, the 'prop' variable is a dictionary object. prop[volume] should give your desired result.
Option #2: If you want to access volumes of only certain part instances, create a part instance object and call that in your getMassProperties()
m=mdb.models['Model'].rootAssembly
inst=m.instances['instance']
mask=inst.cells.getMask()
partinstance_obj1=inst.cells.getSequenceFromMask(mask=mask)
prop1=mdb.models['Model'].rootAssembly.getMassProperties(regions=(partinstance_obj1,)) #Regions here will accept only a sequence of part instance obj