def pcklcreate(workdir, name): # ABAQUS/PYTHON POST PROCESSING SCRIPT # Run using abaqus python / abaqus viewer -noGUI / abaqus cae -noGUI print("Initiation of pckl creation: " + name + ".pckl") print # Opening the Odb File odb = openOdb(workdir + '/' + name + '.odb') print("odb = openOdb(workdir + '/' + name + '.odb')") # Finding back the position of the reference node of the indenter. Its number is stored inside a node set named REF_NODE. ref_node_label = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'RP_INDENTER'].nodes[0].label print( "ref_node_label = odb.rootAssembly.instances['I_INDENTER'].nodeSets['RP_INDENTER'].nodes[0].label" ) # Getting back the reaction forces along Y (RF2) and displacements along Y (U2) where they are recorded. RF2 = gho(odb, 'RF2') U2 = gho(odb, 'U2') print("RF2 = gho(odb, 'RF2')") print("U2 = gho(odb, 'U2')") # Packing data data = {'ref_node_label': ref_node_label, 'RF2': RF2, 'U2': U2} print("data = {'ref_node_label': ref_node_label, 'RF2':RF2, 'U2':U2}") # Dumping data dump(data, workdir + '/' + name + '.pckl') print("dump(data, workdir + '/' + name + '.pckl')") # Closing Odb odb.close() print("odb.close()") print print("ERROR REPORT:")
# Run using abaqus python / abaqus viewer -noGUI / abaqus cae -noGUI # Packages (Abaqus, Abapy and built-in only here) from odbAccess import openOdb from abapy.misc import dump from abapy.postproc import GetHistoryOutputByKey as gho # Setting up some pathes workdir = 'workdir' name = 'indentation_axi' # Opening the Odb File odb = openOdb(workdir + '/' + name + '.odb') # Finding back the position of the reference node of the indenter. Its number is stored inside a node set named REF_NODE. ref_node_label = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'REF_NODE'].nodes[0].label # Getting back the reaction forces along Y (RF2) and displacements along Y (U2) where they are recorded. RF2 = gho(odb, 'RF2') U2 = gho(odb, 'U2') # Packing data data = {'ref_node_label': ref_node_label, 'RF2': RF2, 'U2': U2} # Dumping data dump(data, workdir + '/' + name + '.pckl') # Closing Odb odb.close()
] fo['PEEQ'] = [ gfo(odb=odb, instance='ISAMPLE', step=0, frame=-1, original_position='INTEGRATION_POINT', new_position='NODAL', position='node', field='PEEQ', sub_set_type='element', delete_report=True), ] # History Outputs data['history'] = {} ho = data['history'] ho['disp'] = gho(odb, 'U2') ho['force'] = gho(odb, 'RF2') ho['allse'] = gho(odb, 'ALLSE').values()[0] ho['allpd'] = gho(odb, 'ALLPD').values()[0] ho['allwk'] = gho(odb, 'ALLWK').values()[0] ho['volume'] = gho(odb, 'EVOL') # Mesh data['mesh'] = GetMesh(odb, "ISAMPLE") else: data['completed'] = False # Closing and dumping odb.close() dump(data, file_name + '.pckl')
step=2, frame=-1, original_position='INTEGRATION_POINT', new_position='NODAL', position='node', field='PEEQ', sub_set_type='element', delete_report=True) ] # History Outputs data['history'] = {} ho = data['history'] ref_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'REF_NODE'].nodes[0].label ho['force'] = gho(odb, 'RF2')['Node I_INDENTER.' + str( ref_node )] # GetFieldOutputByKey returns all the occurences of the required output (here 'RF2') and stores it in a dict. Each dict key refers to a location. Here we have to specify the location ('Node I_INDENTER.1') mainly for displacement which has been requested at several locations. ho['disp'] = gho(odb, 'U2')['Node I_INDENTER.' + str(ref_node)] tip_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'TIP_NODE'].nodes[0].label ho['tip_penetration'] = gho(odb, 'U2')['Node I_INDENTER.' + str(tip_node)] ho['allse'] = gho(odb, 'ALLSE').values()[0] ho['allpd'] = gho(odb, 'ALLPD').values()[0] ho['allfd'] = gho(odb, 'ALLFD').values()[0] ho['allwk'] = gho(odb, 'ALLWK').values()[0] #ho['carea'] = gho(odb,'CAREA ASSEMBLY_I_SAMPLE_SURFACE_FACES/ASSEMBLY_I_INDENTER_SURFACE_FACES').values()[0] # CONTACT DATA PROCESSING ho['contact'] = Get_ContactData(odb=odb, instance='I_SAMPLE', node_set='TOP_NODES')
step=2, frame=-1, original_position='INTEGRATION_POINT', new_position='NODAL', position='node', field='PEEQ', sub_set_type='element', delete_report=True) ] # History Outputs data['history'] = {} ho = data['history'] ref_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'REF_NODE'].nodes[0].label # GetFieldOutputByKey returns all the occurences of the required output (here 'RF2') and stores it in a dict. Each dict key refers to a location. Here we have to specify the location ('Node I_INDENTER.1') mainly for displacement which has been requested at several locations. ho['force'] = gho(odb, 'RF2')['Node I_INDENTER.' + str(ref_node)] ho['disp'] = gho(odb, 'U2')['Node I_INDENTER.' + str(ref_node)] tip_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets[ 'TIP_NODE'].nodes[0].label ho['tip_penetration'] = gho(odb, 'U2')['Node I_INDENTER.' + str(tip_node)] ho['allse'] = gho(odb, 'ALLSE').values()[0] ho['allpd'] = gho(odb, 'ALLPD').values()[0] ho['allfd'] = gho(odb, 'ALLFD').values()[0] ho['allwk'] = gho(odb, 'ALLWK').values()[0] #ho['carea'] = gho(odb,'CAREA ASSEMBLY_I_SAMPLE_SURFACE_FACES/ASSEMBLY_I_INDENTER_SURFACE_FACES').values()[0] # CONTACT DATA PROCESSING ho['contact'] = Get_ContactData(odb=odb, instance='I_SAMPLE', node_set='TOP_NODES')
# Run using abaqus python / abaqus viewer -noGUI / abaqus cae -noGUI # Packages (Abaqus, Abapy and built-in only here) from odbAccess import openOdb from abapy.misc import dump from abapy.postproc import GetHistoryOutputByKey as gho # Setting up some pathes workdir = 'workdir' name = 'indentation_axi' # Opening the Odb File odb = openOdb(workdir + '/' + name + '.odb') # Finding back the position of the reference node of the indenter. Its number is stored inside a node set named REF_NODE. ref_node_label = odb.rootAssembly.instances['I_INDENTER'].nodeSets['REF_NODE'].nodes[0].label # Getting back the reaction forces along Y (RF2) and displacements along Y (U2) where they are recorded. RF2 = gho(odb, 'RF2') U2 = gho(odb, 'U2') # Packing data data = {'ref_node_label': ref_node_label, 'RF2':RF2, 'U2':U2} # Dumping data dump(data, workdir + '/' + name + '.pckl') # Closing Odb odb.close()
delete_report = True), gfo(odb = odb, instance = 'I_SAMPLE', step = 2, frame = -1, original_position = 'INTEGRATION_POINT', new_position = 'NODAL', position = 'node', field = 'PEEQ', sub_set_type = 'element', delete_report = True)] # History Outputs data['history'] = {} ho = data['history'] ref_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets['REF_NODE'].nodes[0].label ho['force'] = gho(odb,'RF2')['Node I_INDENTER.'+str(ref_node)] # GetFieldOutputByKey returns all the occurences of the required output (here 'RF2') and stores it in a dict. Each dict key refers to a location. Here we have to specify the location ('Node I_INDENTER.1') mainly for displacement which has been requested at several locations. ho['disp'] = gho(odb,'U2')['Node I_INDENTER.'+str(ref_node)] tip_node = odb.rootAssembly.instances['I_INDENTER'].nodeSets['TIP_NODE'].nodes[0].label ho['tip_penetration'] = gho(odb,'U2')['Node I_INDENTER.'+str(tip_node)] ho['allse'] = gho(odb,'ALLSE').values()[0] ho['allpd'] = gho(odb,'ALLPD').values()[0] ho['allfd'] = gho(odb,'ALLFD').values()[0] ho['allwk'] = gho(odb,'ALLWK').values()[0] #ho['carea'] = gho(odb,'CAREA ASSEMBLY_I_SAMPLE_SURFACE_FACES/ASSEMBLY_I_INDENTER_SURFACE_FACES').values()[0] # CONTACT DATA PROCESSING ho['contact'] = Get_ContactData(odb = odb, instance = 'I_SAMPLE', node_set = 'TOP_NODES') else: data['completed'] = False # Closing and dumping
] fo['PEEQ'] = [ gfo(odb = odb, instance = 'ISAMPLE', step = 0, frame = -1, original_position = 'INTEGRATION_POINT', new_position = 'NODAL', position = 'node', field = 'PEEQ', sub_set_type = 'element', delete_report = True), ] # History Outputs data['history'] = {} ho = data['history'] ho['disp'] = gho(odb,'U2') ho['force'] = gho(odb,'RF2') ho['allse'] = gho(odb,'ALLSE').values()[0] ho['allpd'] = gho(odb,'ALLPD').values()[0] ho['allwk'] = gho(odb,'ALLWK').values()[0] ho['volume'] = gho(odb,'EVOL') # Mesh data['mesh'] = GetMesh(odb, "ISAMPLE") else: data['completed'] = False # Closing and dumping odb.close() dump(data, file_name+'.pckl')