FEM: result object, better grouping in result properties, this does not break compatibility
This commit is contained in:
@@ -39,49 +39,14 @@ PROPERTY_SOURCE(Fem::FemResultObject, App::DocumentObject)
|
||||
FemResultObject::FemResultObject()
|
||||
{
|
||||
ADD_PROPERTY_TYPE(Mesh,(0), "General",Prop_None,"Link to the corresponding mesh");
|
||||
ADD_PROPERTY_TYPE(NodeNumbers,(0), "Data",Prop_None,"Numbers of the result nodes");
|
||||
ADD_PROPERTY_TYPE(Stats,(0), "Fem",Prop_None,"Statistics of the results");
|
||||
ADD_PROPERTY_TYPE(Time,(0), "Fem",Prop_None,"Time of analysis incement");
|
||||
|
||||
/*
|
||||
ADD_PROPERTY_TYPE(DisplacementVectors,(), "Fem",Prop_None,"List of displacement vectors");
|
||||
ADD_PROPERTY_TYPE(DisplacementLengths,(0), "Fem",Prop_None,"List of displacement lengths");
|
||||
ADD_PROPERTY_TYPE(StressVectors,(), "Fem",Prop_None,"List of Stress vectors");
|
||||
ADD_PROPERTY_TYPE(StrainVectors,(), "Fem",Prop_None,"List of Strain vectors");
|
||||
ADD_PROPERTY_TYPE(StressValues,(0), "Fem",Prop_None,"List of Von Misses stress values");
|
||||
ADD_PROPERTY_TYPE(PrincipalMax,(0), "Fem",Prop_None,"List of First Principal (Max) stress values");
|
||||
ADD_PROPERTY_TYPE(PrincipalMed,(0), "Fem",Prop_None,"List of Second Principal (Med) stress values");
|
||||
ADD_PROPERTY_TYPE(PrincipalMin,(0), "Fem",Prop_None,"List of Third Principal (Min) stress values");
|
||||
ADD_PROPERTY_TYPE(MaxShear,(0), "Fem",Prop_None,"List of Maximum Shear stress values");
|
||||
ADD_PROPERTY_TYPE(Temperature,(0), "Fem",Prop_None,"Nodal temperatures");
|
||||
ADD_PROPERTY_TYPE(MassFlowRate,(0), "Fem",Prop_None,"Nodal network mass flow rate");
|
||||
ADD_PROPERTY_TYPE(NetworkPressure,(0), "Fem",Prop_None,"Nodal network pressure");
|
||||
ADD_PROPERTY_TYPE(Eigenmode,(0), "Fem",Prop_None,"Number of the eigenmode");
|
||||
ADD_PROPERTY_TYPE(EigenmodeFrequency,(0), "Fem",Prop_None,"Frequency of the eigenmode");
|
||||
ADD_PROPERTY_TYPE(UserDefined,(0), "Fem",Prop_None,"User Defined Results");
|
||||
*/
|
||||
ADD_PROPERTY_TYPE(NodeNumbers,(0), "NodeData",Prop_None,"Numbers of the result nodes");
|
||||
ADD_PROPERTY_TYPE(Stats,(0), "Data",Prop_None,"Statistics of the results");
|
||||
ADD_PROPERTY_TYPE(Time,(0), "Data",Prop_None,"Time of analysis incement");
|
||||
|
||||
// make read-only for property editor
|
||||
NodeNumbers.setStatus(App::Property::ReadOnly, true);
|
||||
Stats.setStatus(App::Property::ReadOnly, true);
|
||||
Time.setStatus(App::Property::ReadOnly, true);
|
||||
/*
|
||||
DisplacementVectors.setStatus(App::Property::ReadOnly, true);
|
||||
DisplacementLengths.setStatus(App::Property::ReadOnly, true);
|
||||
StressVectors.setStatus(App::Property::ReadOnly, true);
|
||||
StrainVectors.setStatus(App::Property::ReadOnly, true);
|
||||
StressValues.setStatus(App::Property::ReadOnly, true);
|
||||
PrincipalMax.setStatus(App::Property::ReadOnly, true);
|
||||
PrincipalMed.setStatus(App::Property::ReadOnly, true);
|
||||
PrincipalMin.setStatus(App::Property::ReadOnly, true);
|
||||
MaxShear.setStatus(App::Property::ReadOnly, true);
|
||||
Temperature.setStatus(App::Property::ReadOnly, true);
|
||||
MassFlowRate.setStatus(App::Property::ReadOnly, true);
|
||||
NetworkPressure.setStatus(App::Property::ReadOnly, true);
|
||||
Eigenmode.setStatus(App::Property::ReadOnly, true);
|
||||
EigenmodeFrequency.setStatus(App::Property::ReadOnly, true);
|
||||
UserDefined.setStatus(App::Property::ReadOnly, false);
|
||||
*/
|
||||
}
|
||||
|
||||
FemResultObject::~FemResultObject()
|
||||
|
||||
@@ -40,48 +40,29 @@ class _FemResultMechanical():
|
||||
obj.addProperty("App::PropertyString", "ResultType", "Base", "Type of the result", 1) # the 1 set the property to ReadOnly
|
||||
obj.ResultType = str(self.Type)
|
||||
|
||||
# `Time, Stats` should have been defined in base cpp class
|
||||
|
||||
# does not show up in propertyEditor of combiView
|
||||
obj.addProperty("App::PropertyVectorList", "DisplacementVectors", "Fem", "List of displacement vectors", True)
|
||||
|
||||
# does not show up in propertyEditor of combiView
|
||||
obj.addProperty("App::PropertyVectorList", "StressVectors", "Fem", "List of stress vectors", True)
|
||||
|
||||
# does not show up in propertyEditor of combiView
|
||||
obj.addProperty("App::PropertyVectorList", "StrainVectors", "Fem", "List of strain vectors", True)
|
||||
|
||||
# does not show up in propertyEditor of combiView
|
||||
obj.addProperty("App::PropertyFloatList", "Peeq", "Fem", "List of equivalent plastic strain values", True)
|
||||
|
||||
# readonly in propertyEditor of combiView
|
||||
obj.addProperty("App::PropertyFloatList", "DisplacementLengths", "Fem", "List of displacement lengths", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "StressValues", "Fem", "", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMax", "Fem", "", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMed", "Fem", "", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMin", "Fem", "", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "MaxShear", "Fem", "List of Maximum Shear stress values", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "MassFlowRate", "Fem", "List of mass flow rate values", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "NetworkPressure", "Fem", "List of network pressure values", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloatList", "UserDefined", "Fem", "User Defined Results", True)
|
||||
|
||||
# temperature field is needed in the thermal stress analysis
|
||||
obj.addProperty("App::PropertyFloatList", "Temperature", "Fem", "Temperature field", True)
|
||||
|
||||
# for frequency analysis
|
||||
obj.addProperty("App::PropertyInteger", "Eigenmode", "Fem", "", True)
|
||||
obj.addProperty("App::PropertyInteger", "Eigenmode", "Data", "", True)
|
||||
obj.addProperty("App::PropertyFloat", "EigenmodeFrequency", "Data", "User Defined Results", True)
|
||||
|
||||
obj.addProperty("App::PropertyFloat", "EigenmodeFrequency", "Fem", "User Defined Results", True)
|
||||
# node results
|
||||
# do not show up in propertyEditor of comboView
|
||||
obj.addProperty("App::PropertyVectorList", "DisplacementVectors", "NodeData", "List of displacement vectors", True)
|
||||
obj.addProperty("App::PropertyVectorList", "StressVectors", "NodeData", "List of stress vectors", True)
|
||||
obj.addProperty("App::PropertyVectorList", "StrainVectors", "NodeData", "List of strain vectors", True)
|
||||
obj.addProperty("App::PropertyFloatList", "Peeq", "NodeData", "List of equivalent plastic strain values", True)
|
||||
# readonly in propertyEditor of comboView
|
||||
obj.addProperty("App::PropertyFloatList", "DisplacementLengths", "NodeData", "List of displacement lengths", True)
|
||||
obj.addProperty("App::PropertyFloatList", "StressValues", "NodeData", "", True)
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMax", "NodeData", "", True)
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMed", "NodeData", "", True)
|
||||
obj.addProperty("App::PropertyFloatList", "PrincipalMin", "NodeData", "", True)
|
||||
obj.addProperty("App::PropertyFloatList", "MaxShear", "NodeData", "List of Maximum Shear stress values", True)
|
||||
obj.addProperty("App::PropertyFloatList", "MassFlowRate", "NodeData", "List of mass flow rate values", True)
|
||||
obj.addProperty("App::PropertyFloatList", "NetworkPressure", "NodeData", "List of network pressure values", True)
|
||||
obj.addProperty("App::PropertyFloatList", "UserDefined", "NodeData", "User Defined Results", True)
|
||||
obj.addProperty("App::PropertyFloatList", "Temperature", "NodeData", "Temperature field", True)
|
||||
|
||||
# standard FeutureT methods
|
||||
# standard Feature methods
|
||||
def execute(self, obj):
|
||||
""""this method is executed on object creation and whenever the document is recomputed"
|
||||
update Part or Mesh should NOT lead to recompution of the analysis automatically, time consuming
|
||||
|
||||
Reference in New Issue
Block a user