def ESP_Session_P1_1_4(): import section import regionToolset import displayGroupMdbToolset as dgm import part import material import assembly import step import interaction import load import mesh import optimization import job import sketch import visualization import xyPlot import displayGroupOdbToolset as dgo import connectorBehavior #Gesamtliste der Elemente EL_Liste = [] #Listen der Element-Sets EL_CORE_1 = [] EL_CORE_2 = [] EL_CORE_3 = [] EL_LAYER_S10 = [] EL_LAYER_S9 = [] EL_LAYER_S8 = [] EL_LAYER_S7 = [] EL_LAYER_S6 = [] EL_LAYER_S5 = [] EL_LAYER_S4 = [] EL_LAYER_S3 = [] EL_LAYER_S2 = [] EL_LAYER_S1 = [] #Listen fuer ESP-Werte CORE_1 = [] CORE_2 = [] CORE_3 = [] LAYER_S10 = [] LAYER_S9 = [] LAYER_S8 = [] LAYER_S7 = [] LAYER_S6 = [] LAYER_S5 = [] LAYER_S4 = [] LAYER_S3 = [] LAYER_S2 = [] LAYER_S1 = [] #Werte X5 #Vorsicht, diese Werte sind alle in Polarkoordinaten, also bei Ueberlagerung mit Lastspannungen letztere vorher (!) transformieren! C1 = array([-3.069821714, -11.23221831, -117.7724357, ], 'f') C2 = array([-3.482968676, -17.08734764, -80.68601447, ], 'f') C3 = array([-13.32152927, -23.95147724, -72.01220364, ], 'f') S10= array([-48.6712434, -49.32424465, -88.11795724, ], 'f') S9 = array([-68.12477627, -59.15677209, -85.02037965, ], 'f') S8 = array([-46.33992122, -34.04990177, -46.50724344, ], 'f') S7 = array([5.039619329, 29.18410908, 13.40646085, ], 'f') S6 = array([52.82354412, 92.53243884, 67.40909267, ], 'f') S5 = array([37.16215916, 90.76270316, 65.02241867, ], 'f') S4 = array([-13.98612138, 53.51780499, 30.5085867, ], 'f') S3 = array([-87.14512942, -4.282414841, -24.1470521, ], 'f') S2 = array([-177.8422874, -78.88310391, -94.96276686, ], 'f') S1 = array([-281.7272767, -166.3255112, -178.0585199, ], 'f') #Werte X5 + St21 #Werte 42 #Werte 42 + St21 currentOdb = session.odbs['H:/Jobs_Laserbeschichten/Allocation_ODBs/Allo_1_A_P1_1_4_Cut.odb'] instance1 = currentOdb.rootAssembly.instances['P1_1_4_CUT-1'] scratchOdb = session.ScratchOdb(odb=currentOdb) sessionStep = scratchOdb.Step(name='Session Step', description='Step for Viewer non-persistent fields', domain=TIME, timePeriod=1.0) sessionFrame = sessionStep.Frame(frameId=0, frameValue=0.0, description='Session Frame') #Zuweisung von ESP-Werten: for i in xrange(len(instance1.elementSets['CORE_1'].elements)): EL_CORE_1.append(instance1.elementSets['CORE_1'].elements[i].label) i = 0 for i in xrange(9*len(instance1.elementSets['CORE_1'].elements)): CORE_1.append(C1) i = 0 for i in xrange(len(instance1.elementSets['CORE_2'].elements)): EL_CORE_2.append(instance1.elementSets['CORE_2'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['CORE_2'].elements)): CORE_2.append(C2) i = 0 for i in xrange(len(instance1.elementSets['CORE_3'].elements)): EL_CORE_3.append(instance1.elementSets['CORE_3'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['CORE_3'].elements)): CORE_3.append(C3) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S10'].elements)): EL_LAYER_S10.append(instance1.elementSets['LAYER_S10'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S10'].elements)): LAYER_S10.append(S10) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S9'].elements)): EL_LAYER_S9.append(instance1.elementSets['LAYER_S9'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S9'].elements)): LAYER_S9.append(S9) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S8'].elements)): EL_LAYER_S8.append(instance1.elementSets['LAYER_S8'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S8'].elements)): LAYER_S8.append(S8) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S7'].elements)): EL_LAYER_S7.append(instance1.elementSets['LAYER_S7'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S7'].elements)): LAYER_S7.append(S7) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S6'].elements)): EL_LAYER_S6.append(instance1.elementSets['LAYER_S6'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S6'].elements)): LAYER_S6.append(S6) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S5'].elements)): EL_LAYER_S5.append(instance1.elementSets['LAYER_S5'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S5'].elements)): LAYER_S5.append(S5) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S4'].elements)): EL_LAYER_S4.append(instance1.elementSets['LAYER_S4'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S4'].elements)): LAYER_S4.append(S4) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S3'].elements)): EL_LAYER_S3.append(instance1.elementSets['LAYER_S3'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S3'].elements)): LAYER_S3.append(S3) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S2'].elements)): EL_LAYER_S2.append(instance1.elementSets['LAYER_S2'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S2'].elements)): LAYER_S2.append(S2) i = 0 for i in xrange(len(instance1.elementSets['LAYER_S1'].elements)): EL_LAYER_S1.append(instance1.elementSets['LAYER_S1'].elements[i].label) i = 0 for i in xrange(8*len(instance1.elementSets['LAYER_S1'].elements)): LAYER_S1.append(S1) sessionField_S_RS = sessionFrame.FieldOutput(name='S_RS', description='Eigenspannungen', type=TENSOR_3D_FULL) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_CORE_1, data=CORE_1) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_CORE_2, data=CORE_2) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_CORE_3, data=CORE_3) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S10, data=LAYER_S10) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S9, data=LAYER_S9) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S8, data=LAYER_S8) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S7, data=LAYER_S7) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S6, data=LAYER_S6) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S5, data=LAYER_S5) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S4, data=LAYER_S4) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S3, data=LAYER_S3) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S2, data=LAYER_S2) sessionField_S_RS.addData(position=INTEGRATION_POINT, instance=instance1, labels=EL_LAYER_S1, data=LAYER_S1) #*************************************************************************************************************************************************************************************************************** scratchOdb.rootAssembly.DatumCsysByThreePoints(name='CSYS-1', coordSysType=CYLINDRICAL, origin=(0.0, 0.0, 0.0), point1=(0.0, 1.0, 0.0), point2=(0.0, 1.0, 1.0))#Erzeugung eines Zylinder-Coords #dtm = session.scratchOdbs['H:/Jobs_Laserbeschichten/Allocation_ODBs/P1_1_4_Cut_Al1.odb'].rootAssembly.datumCsyses['CSYS-1'] #session.viewports['Viewport: 1'].odbDisplay.basicOptions.setValues(transformationType=USER_SPECIFIED, datumCsys=dtm)#Transformationsanweisung, leider nur fuer die Darstellung #s_field = currentOdb.steps['Step-1'].frames[1].fieldOutputs['S'] #s_CSYS_1 = session.scratchOdbs['H:/Jobs_Laserbeschichten/Allocation_ODBs/P1_1_4_Cut_Al1.odb'].rootAssembly.datumCsyses['CSYS-1'] #s_polar = s_field.getTransformedField(datumCsys=s_CSYS_1) #s1f1_S = session.odbs['H:/Jobs_Laserbeschichten/Allocation_ODBs/P1_1_4_Cut_Al1.odb'].steps['Step-1'].frames[1].fieldOutputs['S'] #s_CSYS_1 = session.scratchOdbs['H:/Jobs_Laserbeschichten/Allocation_ODBs/P1_1_4_Cut_Al1.odb'].rootAssembly.datumCsyses['CSYS-1'] #tmpField = s1f1_S.getTransformedField(datumCsys=s_CSYS_1) #sessionField = sessionFrame.FieldOutput(name='S_Polar', description='s_field.getTransformedField(datumCsys=s_CSYS_1)', field=s_polar) #Field_tmp = scratchOdb.steps['Session Step'].frames[0].fieldOutputs['S_RS']#Das zuvor erzeugte Feld wird wieder gelesen #Field_polar = Field_tmp.getTransformedField(datumCsys=s_CSYS_1) #Field_trans = Field_polar*Field_tmp #sessionField = sessionFrame.FieldOutput(name='RS_Polar', description='utzenbrutz', field=Field_trans)