1 # % * The option nogui prevents the graphical user interface of opening therefore
accelerating the results.
2 import odbAccess 3 from time import* 4 from abaqus import* 5 from abaqusConstants import* 6 import math 7 print (asctime()) 8 time1=clock() 9 # Name of the odb file without the extension. Note that you can write as many names as required separated by commas. 10 # There will be as many output .dat files as .odb files. 11 # NameOfFileWithoutExtension='Teste'] 12 # It is assumed that Reactions, Displacements, Element/Nodal Stresses and Element/Nodal Strain are available at the Odb File 13 # Errors are writen to abaqus.rpy file in the same folder of this script 14 # Declaration start 15 names='wnfr'; names_1='wnfd' ; names_2='wefs'; names_3='wefe'; names_4='wefle'; names_5='wstress'; names_6='wnfs'; names_7='wnfe' ; names_8='tensor_vs_coord' 16 val='3' 17 text0='nodal displacement results for structure' 18 text0_1='nodal reaction results for structure' 19 text0_2='nodal stress results for structure' 20 text0_3='nodal strain results for structure' 21 text0_4='element stress results for structure' 22 text0_5='element strain results for structure' 23 text0_6='element LNstrain results for structure' 24 text1='step' 25 text2='loading test\n' 26 # Declaration end 27 # 28 # USER INPUT (START) 29 # 30 # name of odb file without extension, could be more than one file 31 names2=['seb_aw04_asreceived_okay'] # sebaw04_A533_rho01, rho01_fixIncrem, sebaw04_A533_rho005 32 #names2=input('name of odb file without extension:') 33 nameOfStep='Step-1' # Name of the step of interest. By default it is Step-1 34 ElementFailureNumber= [1,10] # Critical element number where is expected the initiation of ductile failure 35 #PartName = 'Part-1' # Name of the Part 36 #InstanceName = 'Part-1-1' # Name of the Instance 37 #Flag1=True # Flag used to write patran formatted files of displacements/stresses/strain/Reactions, Flag1 can take True or False. False value will not write Patran Fomratted Files 38 LoadSimmetry = 4 # Input the simmetry factor according to FEM to Calculate Force Reactions defined at specific Set 39 DisplSimmetry=2 # Input the simmetry factor according to FEM to Calculate Displacement defined at especific Set 40 LoadDirection=1 # Input the direction of Reaction Forces: 1=x direction, 2=y, 3=z 41 DisplDirection=2 # Input the direction of Displacement of interest: 1=x direction, 2=y, 3=z 42 PCMODFlag= False # Flag used to write P-CMOD, PCMODFlag can take True or False values. False value will not write P-CMOD curve 43 StressResults = False # Flag used to write patran formatted files of stresses, Flag can take True or False values. False value will not write Patran Fomratted Files 44 StrainResults = False # Flag used to write patran formatted files of strain, Flag can take True or False. False values value will not write Patran Fomratted Files 45 DisplResults = False # Flag used to write patran formatted files of displacements, Flag can take True or False values. False value will not write Patran Fomratted Files 46 ReactionResults = False # Flag used to write patran formatted files of Reactions, Flag can take True or False values. False value will not write Patran Fomratted Files 47 CriticalResults = False # Flag used to write results (PEEQ/TRIAX/LODE/MISES for critical elements, Flag can take True or False values. False value will not write results 48 JIntegralResults = True # Flag used to write results of J-Integral, Flag can take True or False values. False value will not write results 49 WstressResults = False # Flag used to write results of Wstress, Flag can take True or False values. False value will not write results. It is necessary that Coordinates, Elem_Volume to be requested in addition to strain/stress tensor. 50 NodalStressResults = False # Flag used to write patran formatted files of stresses, Flag can take True or False values. False value will not write Patran Fomratted Files 51 NodalStrainResults = False # Flag used to write patran formatted files of strain, Flag can take True or False. False values value will not write Patran Fomratted Files 52 TensorXCoordResults = True # Flag used to write strain/stress tensor versus distance from crack tip, Flag can take True or False. False values value will not write any results 53 # 54 # MECHANICAL PROPERTIES 55 # 56 sigma_yield = 720 57 E = 216000 58 # 59 # Weibull Parameters 60 # 61 m_shape = 10 62 V0 = 1 63 Su_scale = 1 64 Volume_symetry = 4 65 cut_parameter = 1 66 criteria_var = 'principal' # pricipal or mises stress 67 domain_var = 'principal' # pricipal or mises stress 68 # 69 # Finite Element Mesh / Geometry 70 # 71 crack_tip_node = [1255,837,1] 72 Crack_Propagation_Direction = 1 # Input the direction of crack propagation for tensor x distance results 1=x direction, 2=y, 3=z 73 Geometry = 'seb' # Geometry : seb,set,nrb. nrb stands for notched round bar. nrb can be used for defininf smooth round specimens. 74 #crack_tip_elem = [1,10] 75 # 76 # USER INPUT (FINISH) 77 # Definition of files names, i.e. wnfdxxxx, wnfrxxxxx,etc 78 # Only 999 output files are set to be written 79 # 80 NameOfFileRF=[] 81 NameOfFileU=[] 82 NameOfFileS=[] 83 NameOfFilenodeS=[] 84 NameOfFileE=[] 85 NameOfFilenodeE=[] 86 NameOfFileLE=[] 87 NameOfFilenodeLE=[] 88 NameOfFileWstress=[] 89 NameOfFileCriticalElement=[] 90 stringSplit_NodeNumber_Displ=[] 91 #a=len(names+'00000') 92 for j in range(4): 93 if j==1: 94 for k in range(0,10): 95 NameOfFileRF.append(names+'0000'+str(k)) 96 NameOfFileU.append(names_1+'0000'+str(k)) 97 NameOfFileS.append(names_2+'0000'+str(k)) 98 NameOfFilenodeS.append(names_6+'0000'+str(k)) 99 NameOfFileE.append(names_3+'0000'+str(k)) 100 NameOfFilenodeE.append(names_7+'0000'+str(k)) 101 NameOfFileLE.append(names_4+'0000'+str(k)) 102 NameOfFileWstress.append(names_5+'0000'+str(k)) 103 elif j==2: 104 for k in range(10,100): 105 NameOfFileRF.append(names+'000'+str(k)) 106 NameOfFileU.append(names_1+'000'+str(k)) 107 NameOfFileS.append(names_2+'000'+str(k)) 108 NameOfFilenodeS.append(names_6+'0000'+str(k)) 109 NameOfFileE.append(names_3+'000'+str(k)) 110 NameOfFilenodeE.append(names_7+'0000'+str(k)) 111 NameOfFileLE.append(names_4+'000'+str(k)) 112 NameOfFileWstress.append(names_5+'000'+str(k)) 113 elif j==3: 114 for k in range(100,1000): 115 NameOfFileRF.append(names+'00'+str(k)) 116 NameOfFileU.append(names_1+'00'+str(k)) 117 NameOfFileS.append(names_2+'00'+str(k)) 118 NameOfFilenodeS.append(names_6+'0000'+str(k)) 119 NameOfFileE.append(names_3+'00'+str(k)) 120 NameOfFilenodeE.append(names_7+'0000'+str(k)) 121 NameOfFileLE.append(names_4+'00'+str(k)) 122 NameOfFileWstress.append(names_5+'00'+str(k)) 123 elif j==4: 124 pass 125 # 126 ################################