FEM: get pressure faces ids, some better comments and very small code improvement
This commit is contained in:
@@ -1571,7 +1571,8 @@ def get_ref_shape_node_sum_geom_table(
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# ***** methods for retrieving faces for constraint pressure *************************************
|
||||
# ***** methods for retrieving element face sets *************************************************
|
||||
# ***** pressure faces ***************************************************************************
|
||||
def get_pressure_obj_faces(
|
||||
femmesh,
|
||||
femelement_table,
|
||||
@@ -1617,9 +1618,9 @@ def get_pressure_obj_faces(
|
||||
return pressure_faces
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# depreciated method for pressure faces for constraint pressure and finite solid element mesh
|
||||
# we switched to the get_ccxelement_faces_from_binary_search
|
||||
# ***** depreciated method for retrieving pressure faces *****************************************
|
||||
# for constraint pressure and finite solid element mesh
|
||||
# it was switched to the method get_ccxelement_faces_from_binary_search
|
||||
# because of performance and the support of all solid elements
|
||||
# see get_ccxelement_faces_from_binary_search for more information
|
||||
def get_pressure_obj_faces_depreciated(
|
||||
|
||||
@@ -1157,6 +1157,9 @@ class FemInputWriterCcx(writerbase.FemInputWriter):
|
||||
rev = -1 if prs_obj.Reversed else 1
|
||||
f.write("*DLOAD\n")
|
||||
for ref_shape in femobj["PressureFaces"]:
|
||||
# the loop is needed for compatibility reason
|
||||
# in depretiated method get_pressure_obj_faces_depreciated
|
||||
# the face ids where per ref_shape
|
||||
f.write("** " + ref_shape[0] + "\n")
|
||||
for face, fno in ref_shape[1]:
|
||||
if fno > 0: # solid mesh face
|
||||
|
||||
@@ -310,7 +310,12 @@ class FemInputWriter():
|
||||
self.femelement_table,
|
||||
self.femnodes_ele_table, femobj
|
||||
)
|
||||
femobj["PressureFaces"] = [(femobj["Object"].Name + ": face load", pressure_faces)]
|
||||
# the data model is for compatibility reason with depreciated version
|
||||
# get_pressure_obj_faces_depreciated returns the face ids in a tuple per ref_shape
|
||||
# some_string was the reference_shape_element_string in depreciated method
|
||||
# [(some_string, [ele_id, ele_face_id], [ele_id, ele_face_id], ...])]
|
||||
some_string = "{}: face load".format(femobj["Object"].Name)
|
||||
femobj["PressureFaces"] = [(some_string, pressure_faces)]
|
||||
FreeCAD.Console.PrintLog("{}\n".format(femobj["PressureFaces"]))
|
||||
|
||||
def get_element_geometry2D_elements(self):
|
||||
|
||||
Reference in New Issue
Block a user