FEM: use more obvious method names in ccxInpWriter
This commit is contained in:
@@ -33,15 +33,15 @@ class inp_writer:
|
||||
# reopen file with "append" and add the analysis definition
|
||||
inpfile = open(self.file_name, 'a')
|
||||
inpfile.write('\n\n')
|
||||
self.write_material_element_sets(inpfile)
|
||||
self.write_fixed_node_sets(inpfile)
|
||||
self.write_load_node_sets(inpfile)
|
||||
self.write_element_sets_material_and_femelement_type(inpfile)
|
||||
self.write_node_sets_constraints_fixed(inpfile)
|
||||
self.write_node_sets_constraints_force(inpfile)
|
||||
self.write_materials(inpfile)
|
||||
self.write_step_begin(inpfile)
|
||||
self.write_constraints_fixed(inpfile)
|
||||
if self.analysis_type is None or self.analysis_type == "static":
|
||||
self.write_constraints_force(inpfile)
|
||||
self.write_face_load(inpfile)
|
||||
self.write_constraints_pressure(inpfile)
|
||||
elif self.analysis_type == "frequency":
|
||||
self.write_frequency(inpfile)
|
||||
self.write_outputs_types(inpfile)
|
||||
@@ -50,9 +50,9 @@ class inp_writer:
|
||||
inpfile.close()
|
||||
return self.base_name
|
||||
|
||||
def write_material_element_sets(self, f):
|
||||
def write_element_sets_material_and_femelement_type(self, f):
|
||||
f.write('\n***********************************************************\n')
|
||||
f.write('** Element sets for materials\n')
|
||||
f.write('** Element sets for materials and FEM element type (solid, shell, beam)\n')
|
||||
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
|
||||
for m in self.material_objects:
|
||||
if len(self.material_objects) == 1:
|
||||
@@ -62,7 +62,7 @@ class inp_writer:
|
||||
print 'material object count: ', len(self.material_objects)
|
||||
FreeCAD.Console.PrintError('Multiple materials are not yet supported!\n')
|
||||
|
||||
def write_fixed_node_sets(self, f):
|
||||
def write_node_sets_constraints_fixed(self, f):
|
||||
f.write('\n***********************************************************\n')
|
||||
f.write('** Node set for fixed constraint\n')
|
||||
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
|
||||
@@ -81,7 +81,7 @@ class inp_writer:
|
||||
for i in n:
|
||||
f.write(str(i) + ',\n')
|
||||
|
||||
def write_load_node_sets(self, f):
|
||||
def write_node_sets_constraints_force(self, f):
|
||||
f.write('\n***********************************************************\n')
|
||||
f.write('** Node sets for loads\n')
|
||||
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
|
||||
@@ -318,7 +318,7 @@ class inp_writer:
|
||||
f.write('\n')
|
||||
f.write('\n')
|
||||
|
||||
def write_face_load(self, f):
|
||||
def write_constraints_pressure(self, f):
|
||||
f.write('\n***********************************************************\n')
|
||||
f.write('** Element + CalculiX face + load in [MPa]\n')
|
||||
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
|
||||
|
||||
@@ -389,14 +389,14 @@
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Element sets for materials
|
||||
** written by write_material_element_sets function
|
||||
** Element sets for materials and FEM element type (solid, shell, beam)
|
||||
** written by write_element_sets_material_and_femelement_type function
|
||||
*ELSET,ELSET=MaterialSolidElements
|
||||
Eall
|
||||
|
||||
***********************************************************
|
||||
** Node set for fixed constraint
|
||||
** written by write_fixed_node_sets function
|
||||
** written by write_node_sets_constraints_fixed function
|
||||
*NSET,NSET=FemConstraintFixed
|
||||
1,
|
||||
2,
|
||||
@@ -442,7 +442,7 @@ Eall
|
||||
|
||||
***********************************************************
|
||||
** Node sets for loads
|
||||
** written by write_load_node_sets function
|
||||
** written by write_node_sets_constraints_force function
|
||||
*NSET,NSET=FemConstraintForce
|
||||
|
||||
***********************************************************
|
||||
@@ -499,8 +499,8 @@ S
|
||||
***********************************************************
|
||||
** CalculiX Input file
|
||||
** written by write_footer function
|
||||
** written by --> FreeCAD 0.16.5477 (Git)
|
||||
** written on --> Wed Sep 9 12:42:24 2015
|
||||
** written by --> FreeCAD 0.16.5527 (Git)
|
||||
** written on --> Mon Sep 14 08:41:37 2015
|
||||
** file name -->
|
||||
** analysis name --> MechanicalAnalysis
|
||||
**
|
||||
|
||||
@@ -389,14 +389,14 @@
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Element sets for materials
|
||||
** written by write_material_element_sets function
|
||||
** Element sets for materials and FEM element type (solid, shell, beam)
|
||||
** written by write_element_sets_material_and_femelement_type function
|
||||
*ELSET,ELSET=MaterialSolidElements
|
||||
Eall
|
||||
|
||||
***********************************************************
|
||||
** Node set for fixed constraint
|
||||
** written by write_fixed_node_sets function
|
||||
** written by write_node_sets_constraints_fixed function
|
||||
*NSET,NSET=FemConstraintFixed
|
||||
1,
|
||||
2,
|
||||
@@ -442,7 +442,7 @@ Eall
|
||||
|
||||
***********************************************************
|
||||
** Node sets for loads
|
||||
** written by write_load_node_sets function
|
||||
** written by write_node_sets_constraints_force function
|
||||
*NSET,NSET=FemConstraintForce
|
||||
|
||||
***********************************************************
|
||||
@@ -525,7 +525,7 @@ FemConstraintFixed,3
|
||||
|
||||
***********************************************************
|
||||
** Element + CalculiX face + load in [MPa]
|
||||
** written by write_face_load function
|
||||
** written by write_constraints_pressure function
|
||||
*DLOAD
|
||||
** Load on face Face4
|
||||
3,P1,-10.0
|
||||
@@ -565,8 +565,8 @@ S
|
||||
***********************************************************
|
||||
** CalculiX Input file
|
||||
** written by write_footer function
|
||||
** written by --> FreeCAD 0.16.5485 (Git)
|
||||
** written on --> Mon Sep 14 06:41:34 2015
|
||||
** written by --> FreeCAD 0.16.5527 (Git)
|
||||
** written on --> Mon Sep 14 08:38:41 2015
|
||||
** file name -->
|
||||
** analysis name --> MechanicalAnalysis
|
||||
**
|
||||
|
||||
Reference in New Issue
Block a user