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()
ABAQUS/PYTHON POST PROCESSING SCRIPT Run using abaqus python / abaqus viewer -noGUI / abaqus cae -noGUI """ # Packages (Abaqus, Abapy and built-in only here) from odbAccess import openOdb from abapy.postproc import GetHistoryOutputByKey as gho from abapy.misc import dump #from misc import dump_data as dump from odbMaxMises import getMaxMises # Setting up some paths workdir = 'LK_Output_Testmodell' name = 'Biegebalken' # Opening the Odb File odb = openOdb(workdir + '/' + name + '.odb') # Get max. Mises stress maxM = getMaxMises(workdir + '/' + name + '.odb', '') #dump('output.json',maxM) dump(maxM, workdir + '/' + name + '.pckl') # Closing Odb #odb.close()
# Launch with 'abaqus viewer -noGUI MakeInp_abqpostproc.py' from odbAccess import openOdb from abapy.postproc import GetTensorFieldOutput_byRpt, GetMesh from abapy.misc import dump path_to_odb = 'workdir/' odb_name = path_to_odb + 'indentation_axi.odb' odb = openOdb(odb_name) S = GetTensorFieldOutput_byRpt( odb = odb, instance = 'I_SAMPLE', step = 0, frame = -1, original_position = 'INTEGRATION_POINT', new_position = 'NODAL', position = 'node', field = 'S', sub_set_type = 'element', delete_report = True) mesh = GetMesh(odb = odb, instance = 'I_SAMPLE' ) dump(S, path_to_odb + 'indentation_S.pckl') dump(mesh, path_to_odb + 'indentation_mesh.pckl')
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')
from abapy.indentation import Get_ContactData from odbAccess import openOdb from abapy.misc import dump # Odb opening Berk_name = 'workdir/indentation_berko' Axi_name = 'workdir/indentation_axi' Berk_odb = openOdb(Berk_name + '.odb') Axi_odb = openOdb(Axi_name + '.odb') # Getting data Berk_out = Get_ContactData( odb=Berk_odb, instance='I_SAMPLE', node_set='TOP_NODES') Axi_out = Get_ContactData( odb=Axi_odb, instance='I_SAMPLE', node_set='TOP_NODES') # Dumping data dump(Axi_out, 'ContactData_axi.pckl') dump(Berk_out, 'ContactData_berk.pckl')
from abapy.indentation import Get_ContactData from odbAccess import openOdb from abapy.misc import dump # Odb opening Berk_name = 'workdir/indentation_berko' Axi_name = 'workdir/indentation_axi' Berk_odb = openOdb(Berk_name + '.odb') Axi_odb = openOdb(Axi_name + '.odb') # Getting data Berk_out = Get_ContactData(odb = Berk_odb, instance = 'I_SAMPLE', node_set = 'TOP_NODES') Axi_out = Get_ContactData(odb = Axi_odb, instance = 'I_SAMPLE', node_set = 'TOP_NODES') # Dumping data dump(Axi_out, 'ContactData_axi.pckl') dump(Berk_out, 'ContactData_berk.pckl')
# 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()
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 odb.close() dump(data, file_name+'.pckl')
# Launch with 'abaqus viewer -noGUI MakeInp_abqpostproc.py' from odbAccess import openOdb from abapy.postproc import GetTensorFieldOutput_byRpt, GetMesh from abapy.misc import dump path_to_odb = 'workdir/' odb_name = path_to_odb + 'indentation_axi.odb' odb = openOdb(odb_name) S = GetTensorFieldOutput_byRpt(odb=odb, instance='I_SAMPLE', step=0, frame=-1, original_position='INTEGRATION_POINT', new_position='NODAL', position='node', field='S', sub_set_type='element', delete_report=True) mesh = GetMesh(odb=odb, instance='I_SAMPLE') dump(S, path_to_odb + 'indentation_S.pckl') dump(mesh, path_to_odb + 'indentation_mesh.pckl')