FEM: result properties, add new lists to hold concrete results

This commit is contained in:
HarryvL
2019-06-16 18:26:09 +02:00
committed by Bernd Hahnebach
parent 264d5e91ed
commit db493ee0d9
3 changed files with 81 additions and 1 deletions

View File

@@ -660,6 +660,9 @@ std::map<std::string, std::string> _getFreeCADMechResultVectorProperties() {
// App::PropertyVectorList will be a list of vectors in vtk
std::map<std::string, std::string> resFCVecProp;
resFCVecProp["DisplacementVectors"] = "Displacement";
resFCVecProp["PS1Vector"] = "PS1Vector";
resFCVecProp["PS2Vector"] = "PS2Vector";
resFCVecProp["PS3Vector"] = "PS3Vector";
return resFCVecProp;
}
@@ -691,6 +694,10 @@ std::map<std::string, std::string> _getFreeCADMechResultScalarProperties() {
resFCScalProp["PrincipalMin"] = "Minor Principal Stress"; // can be plotted in Paraview as THE MINOR PRINCIPAL STRESS MAGNITUDE
resFCScalProp["StressValues"] = "von Mises Stress";
resFCScalProp["Temperature"] = "Temperature";
resFCScalProp["MohrCoulomb"] = "MohrCoulomb";
resFCScalProp["ReinforcementRatio_x"] = "ReinforcementRatio_x";
resFCScalProp["ReinforcementRatio_y"] = "ReinforcementRatio_y";
resFCScalProp["ReinforcementRatio_z"] = "ReinforcementRatio_z";
resFCScalProp["UserDefined"] = "UserDefinedMyName"; // this is empty or am I wrong ?!
resFCScalProp["MassFlowRate"] = "Mass Flow Rate";

View File

@@ -467,6 +467,28 @@ class _TaskPanelFemResultShow:
exy = np.array(self.result_obj.NodeStrainXY)
exz = np.array(self.result_obj.NodeStrainXZ)
eyz = np.array(self.result_obj.NodeStrainYZ)
# Display of Reinforcement Ratios and Mohr Coulomb Criterion
rx = np.array(self.result_obj.ReinforcementRatio_x)
ry = np.array(self.result_obj.ReinforcementRatio_y)
rz = np.array(self.result_obj.ReinforcementRatio_z)
mc = np.array(self.result_obj.MohrCoulomb)
ps1vector = np.array(self.result_obj.PS1Vector)
s1x = np.array(ps1vector[:, 0])
s1y = np.array(ps1vector[:, 1])
s1z = np.array(ps1vector[:, 2])
ps2vector = np.array(self.result_obj.PS2Vector)
s2x = np.array(ps2vector[:, 0])
s2y = np.array(ps2vector[:, 1])
s2z = np.array(ps2vector[:, 2])
ps3vector = np.array(self.result_obj.PS1Vector)
s3x = np.array(ps3vector[:, 0])
s3y = np.array(ps3vector[:, 1])
s3z = np.array(ps3vector[:, 2])
userdefined_eq = self.form.user_def_eq.toPlainText() # Get equation to be used
UserDefinedFormula = eval(userdefined_eq).tolist()
self.result_obj.UserDefined = UserDefinedFormula
@@ -486,7 +508,8 @@ class _TaskPanelFemResultShow:
del x, y, z, T, Von, Peeq, P1, P2, P3
del sxx, syy, szz, sxy, sxz, syz
del exx, eyy, ezz, exy, exz, eyz
del MF, NP
del MF, NP, rx, ry, rz, mc
del s1x, s1y, s1z, s2x, s2y, s2z, s3x, s3y, s3z
def select_displacement_type(self, disp_type):
QApplication.setOverrideCursor(Qt.WaitCursor)

View File

@@ -80,6 +80,56 @@ class _FemResultMechanical():
"List of equivalent plastic strain values",
True
)
obj.addProperty(
"App::PropertyFloatList",
"MohrCoulomb",
"NodeData",
"List of Mohr Coulomb stress values",
True
)
obj.addProperty(
"App::PropertyFloatList",
"ReinforcementRatio_x",
"NodeData",
"Reinforcement ratio x-direction",
True
)
obj.addProperty(
"App::PropertyFloatList",
"ReinforcementRatio_y",
"NodeData",
"Reinforcement ratio y-direction",
True
)
obj.addProperty(
"App::PropertyFloatList",
"ReinforcementRatio_z",
"NodeData",
"Reinforcement ratio z-direction",
True
)
obj.addProperty(
"App::PropertyVectorList",
"PS1Vector",
"NodeData",
"List of 1st Principal Stress Vectors",
True
)
obj.addProperty(
"App::PropertyVectorList",
"PS2Vector",
"NodeData",
"List of 2nd Principal Stress Vectors",
True
)
obj.addProperty(
"App::PropertyVectorList",
"PS3Vector",
"NodeData",
"List of 3rd Principal Stress Vectors",
True
)
# readonly in propertyEditor of comboView
obj.addProperty(
"App::PropertyFloatList",