FEM: beam rotation object, add it to the solver frame works
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user