diff --git a/src/Mod/Fem/femsolver/calculix/tasks.py b/src/Mod/Fem/femsolver/calculix/tasks.py index bbd59acaa0..63dd3c6e4a 100644 --- a/src/Mod/Fem/femsolver/calculix/tasks.py +++ b/src/Mod/Fem/femsolver/calculix/tasks.py @@ -66,7 +66,7 @@ class Prepare(run.Prepare): c.selfweight_constraints, c.force_constraints, c.pressure_constraints, c.temperature_constraints, c.heatflux_constraints, c.initialtemperature_constraints, - c.beam_sections, c.shell_thicknesses, c.fluid_sections, + c.beam_sections, c.beam_rotations, c.shell_thicknesses, c.fluid_sections, self.solver.AnalysisType, self.directory) path = w.write_calculix_input_file() # report to user if task succeeded @@ -165,6 +165,7 @@ class _Container(object): self.force_constraints = [] self.pressure_constraints = [] self.beam_sections = [] + self.beam_rotations = [] self.fluid_sections = [] self.shell_thicknesses = [] self.displacement_constraints = [] @@ -239,6 +240,10 @@ class _Container(object): beam_section_dict = {} beam_section_dict['Object'] = m self.beam_sections.append(beam_section_dict) + elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementRotation1D": + beam_rotation_dict = {} + beam_rotation_dict['Object'] = m + self.beam_rotations.append(beam_rotation_dict) elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementFluid1D": fluid_section_dict = {} fluid_section_dict['Object'] = m diff --git a/src/Mod/Fem/femsolver/calculix/writer.py b/src/Mod/Fem/femsolver/calculix/writer.py index b85ec447c0..6fd985ea08 100644 --- a/src/Mod/Fem/femsolver/calculix/writer.py +++ b/src/Mod/Fem/femsolver/calculix/writer.py @@ -45,7 +45,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter): contact_obj, planerotation_obj, transform_obj, selfweight_obj, force_obj, pressure_obj, temperature_obj, heatflux_obj, initialtemperature_obj, - beamsection_obj, shellthickness_obj, fluidsection_obj, + beamsection_obj, beamrotation_obj, shellthickness_obj, fluidsection_obj, analysis_type=None, dir_name=None ): @@ -57,7 +57,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter): contact_obj, planerotation_obj, transform_obj, selfweight_obj, force_obj, pressure_obj, temperature_obj, heatflux_obj, initialtemperature_obj, - beamsection_obj, shellthickness_obj, fluidsection_obj, + beamsection_obj, beamrotation_obj, shellthickness_obj, fluidsection_obj, analysis_type, dir_name) # self.dir_name does have a slash at the end self.main_file_name = self.mesh_object.Name + '.inp' diff --git a/src/Mod/Fem/femsolver/writerbase.py b/src/Mod/Fem/femsolver/writerbase.py index 37beb4630d..b29856c945 100644 --- a/src/Mod/Fem/femsolver/writerbase.py +++ b/src/Mod/Fem/femsolver/writerbase.py @@ -40,7 +40,7 @@ class FemInputWriter(): contact_obj, planerotation_obj, transform_obj, selfweight_obj, force_obj, pressure_obj, temperature_obj, heatflux_obj, initialtemperature_obj, - beamsection_obj, shellthickness_obj, fluidsection_obj, + beamsection_obj, beamrotation_obj, shellthickness_obj, fluidsection_obj, analysis_type, dir_name ): self.analysis = analysis_obj @@ -60,6 +60,7 @@ class FemInputWriter(): self.heatflux_objects = heatflux_obj self.initialtemperature_objects = initialtemperature_obj self.beamsection_objects = beamsection_obj + self.beamrotation_objects = beamrotation_obj self.fluidsection_objects = fluidsection_obj self.shellthickness_objects = shellthickness_obj self.analysis_type = analysis_type diff --git a/src/Mod/Fem/femsolver/z88/tasks.py b/src/Mod/Fem/femsolver/z88/tasks.py index e811992db6..bc1fc6295f 100644 --- a/src/Mod/Fem/femsolver/z88/tasks.py +++ b/src/Mod/Fem/femsolver/z88/tasks.py @@ -64,7 +64,7 @@ class Prepare(run.Prepare): c.selfweight_constraints, c.force_constraints, c.pressure_constraints, c.temperature_constraints, c.heatflux_constraints, c.initialtemperature_constraints, - c.beam_sections, c.shell_thicknesses, c.fluid_sections, + c.beam_sections, c.beam_rotations, c.shell_thicknesses, c.fluid_sections, self.solver.AnalysisType, self.directory) path = w.write_z88_input() # report to user if task succeeded @@ -163,6 +163,7 @@ class _Container(object): self.force_constraints = [] self.pressure_constraints = [] self.beam_sections = [] + self.beam_rotations = [] self.fluid_sections = [] self.shell_thicknesses = [] self.displacement_constraints = [] @@ -237,6 +238,10 @@ class _Container(object): beam_section_dict = {} beam_section_dict['Object'] = m self.beam_sections.append(beam_section_dict) + elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementRotation1D": + beam_rotation_dict = {} + beam_rotation_dict['Object'] = m + self.beam_rotations.append(beam_rotation_dict) elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementFluid1D": fluid_section_dict = {} fluid_section_dict['Object'] = m diff --git a/src/Mod/Fem/femsolver/z88/writer.py b/src/Mod/Fem/femsolver/z88/writer.py index 89c98ae9b8..83c13312b8 100644 --- a/src/Mod/Fem/femsolver/z88/writer.py +++ b/src/Mod/Fem/femsolver/z88/writer.py @@ -42,7 +42,7 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter): contact_obj, planerotation_obj, transform_obj, selfweight_obj, force_obj, pressure_obj, temperature_obj, heatflux_obj, initialtemperature_obj, - beamsection_obj, shellthickness_obj, fluidsection_obj, + beamsection_obj, beamrotation_obj, shellthickness_obj, fluidsection_obj, analysis_type=None, dir_name=None ): @@ -54,7 +54,7 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter): contact_obj, planerotation_obj, transform_obj, selfweight_obj, force_obj, pressure_obj, temperature_obj, heatflux_obj, initialtemperature_obj, - beamsection_obj, shellthickness_obj, fluidsection_obj, + beamsection_obj, beamrotation_obj, shellthickness_obj, fluidsection_obj, analysis_type, dir_name) # self.dir_name does have a slash at the end self.file_name = self.dir_name + 'z88' diff --git a/src/Mod/Fem/femtools/ccxtools.py b/src/Mod/Fem/femtools/ccxtools.py index b65924185a..db41c4abaa 100644 --- a/src/Mod/Fem/femtools/ccxtools.py +++ b/src/Mod/Fem/femtools/ccxtools.py @@ -117,6 +117,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): # [{'Object':heatflux_constraints, 'xxxxxxxx':value}, {}, ...] # [{'Object':initialtemperature_constraints, 'xxxxxxxx':value}, {}, ...] # [{'Object':beam_sections, 'xxxxxxxx':value}, {}, ...] + # [{'Object':beam_rotations, 'xxxxxxxx':value}, {}, ...] # [{'Object':fluid_sections, 'xxxxxxxx':value}, {}, ...] # [{'Object':shell_thicknesses, 'xxxxxxxx':value}, {}, ...] # [{'Object':contact_constraints, 'xxxxxxxx':value}, {}, ...] @@ -145,6 +146,9 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): ## @var beam_sections # list of beam sections from the analysis. Updated with update_objects self.beam_sections = [] + ## @var beam_rotations + # list of beam rotations from the analysis. Updated with update_objects + self.beam_rotations = [] ## @var fluid_sections # list of fluid sections from the analysis. Updated with update_objects self.fluid_sections = [] @@ -251,6 +255,10 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): beam_section_dict = {} beam_section_dict['Object'] = m self.beam_sections.append(beam_section_dict) + elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementRotation1D": + beam_rotation_dict = {} + beam_rotation_dict['Object'] = m + self.beam_rotations.append(beam_rotation_dict) elif hasattr(m, "Proxy") and m.Proxy.Type == "Fem::FemElementFluid1D": fluid_section_dict = {} fluid_section_dict['Object'] = m @@ -543,7 +551,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): self.contact_constraints, self.planerotation_constraints, self.transform_constraints, self.selfweight_constraints, self.force_constraints, self.pressure_constraints, self.temperature_constraints, self.heatflux_constraints, self.initialtemperature_constraints, - self.beam_sections, self.shell_thicknesses, self.fluid_sections, + self.beam_sections, self.beam_rotations, self.shell_thicknesses, self.fluid_sections, self.analysis_type, self.working_dir) self.inp_file_name = inp_writer.write_calculix_input_file() except: