FEM: result task panel, make all stress strain components in user defined equation available and adapt ui
This commit is contained in:
committed by
Yorik van Havre
parent
a151b9dc76
commit
b03e069766
@@ -334,7 +334,7 @@ p, li { white-space: pre-wrap; }
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>displacement (x,y,z) and strain (ex,ey,ez)</p></body></html></string>
|
||||
<string><html><head/><body><p>displacement (x,y,z) and strain (exx,eyy,ezz,exy,exz,eyz)</p></body></html></string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
@@ -371,7 +371,7 @@ p, li { white-space: pre-wrap; }
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>stresses (sx,sy,sz) and principal stresses (P1,P2,P3)</p></body></html></string>
|
||||
<string><html><head/><body><p>stresses (sxx,syy,szz,sxy,sxz,syz) and principal stresses (P1,P2,P3)</p></body></html></string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
|
||||
@@ -341,14 +341,18 @@ class _TaskPanelFemResultShow:
|
||||
x = np.array(dispvectors[:, 0])
|
||||
y = np.array(dispvectors[:, 1])
|
||||
z = np.array(dispvectors[:, 2])
|
||||
stressvectors = np.array(self.result_obj.StressVectors)
|
||||
sx = np.array(stressvectors[:, 0])
|
||||
sy = np.array(stressvectors[:, 1])
|
||||
sz = np.array(stressvectors[:, 2])
|
||||
strainvectors = np.array(self.result_obj.StrainVectors)
|
||||
ex = np.array(strainvectors[:, 0])
|
||||
ey = np.array(strainvectors[:, 1])
|
||||
ez = np.array(strainvectors[:, 2])
|
||||
sxx = np.array(self.result_obj.NodeStressXX)
|
||||
syy = np.array(self.result_obj.NodeStressYY)
|
||||
szz = np.array(self.result_obj.NodeStressZZ)
|
||||
sxy = np.array(self.result_obj.NodeStressXY)
|
||||
sxz = np.array(self.result_obj.NodeStressXZ)
|
||||
syz = np.array(self.result_obj.NodeStressYZ)
|
||||
exx = np.array(self.result_obj.NodeStrainXX)
|
||||
eyy = np.array(self.result_obj.NodeStrainYY)
|
||||
ezz = np.array(self.result_obj.NodeStrainZZ)
|
||||
exy = np.array(self.result_obj.NodeStrainXY)
|
||||
exz = np.array(self.result_obj.NodeStrainXZ)
|
||||
eyz = np.array(self.result_obj.NodeStrainYZ)
|
||||
userdefined_eq = self.form.user_def_eq.toPlainText() # Get equation to be used
|
||||
UserDefinedFormula = eval(userdefined_eq).tolist()
|
||||
self.result_obj.UserDefined = UserDefinedFormula
|
||||
@@ -361,7 +365,7 @@ class _TaskPanelFemResultShow:
|
||||
self.mesh_obj.ViewObject.setNodeColorByScalars(self.result_obj.NodeNumbers, UserDefinedFormula)
|
||||
self.set_result_stats("", minm, avg, maxm)
|
||||
QtGui.QApplication.restoreOverrideCursor()
|
||||
del x, y, z, T, Von, Peeq, P1, P2, P3, sx, sy, sz, ex, ey, ez, MF, NP # Dummy use of the variables to get around flake8 error
|
||||
del x, y, z, T, Von, Peeq, P1, P2, P3, sxx, syy, szz, sxy, sxz, syz, exx, eyy, ezz, exy, exz, eyz, MF, NP # Dummy use of the variables to get around flake8 error
|
||||
|
||||
def select_displacement_type(self, disp_type):
|
||||
QApplication.setOverrideCursor(Qt.WaitCursor)
|
||||
|
||||
Reference in New Issue
Block a user