Ejemplo n.º 1
0
    def __init__(self, analysis):
        self.analysis = analysis

        # get mesh
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite", message)
            raise Exception(message + '\n')

        # get member
        self.materials_linear = self.get_several_member('Fem::Material')
        self.materials_nonlinear = self.get_several_member('Fem::MaterialMechanicalNonlinear')

        self.beam_sections = self.get_several_member('Fem::FemElementGeometry1D')
        self.beam_rotations = self.get_several_member('Fem::FemElementRotation1D')
        self.fluid_sections = self.get_several_member('Fem::FemElementFluid1D')
        self.shell_thicknesses = self.get_several_member('Fem::FemElementGeometry2D')

        self.constraints_contact = self.get_several_member('Fem::ConstraintContact')
        self.constraints_displacement = self.get_several_member('Fem::ConstraintDisplacement')
        self.constraints_fixed = self.get_several_member('Fem::ConstraintFixed')
        self.constraints_force = self.get_several_member('Fem::ConstraintForce')
        self.constraints_heatflux = self.get_several_member('Fem::ConstraintHeatflux')
        self.constraints_initialtemperature = self.get_several_member('Fem::ConstraintInitialTemperature')
        self.constraints_planerotation = self.get_several_member('Fem::ConstraintPlaneRotation')
        self.constraints_pressure = self.get_several_member('Fem::ConstraintPressure')
        self.constraints_selfweight = self.get_several_member('Fem::ConstraintSelfWeight')
        self.constraints_temperature = self.get_several_member('Fem::ConstraintTemperature')
        self.constraints_transform = self.get_several_member('Fem::ConstraintTransform')
Ejemplo n.º 2
0
    def __init__(self, analysis):
        self.analysis = analysis

        # get mesh
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite", message)
            raise Exception(message + '\n')

        # get member, empty lists are not supported by z88
        self.materials_linear = self.get_several_member('Fem::Material')
        self.materials_nonlinear = []

        self.beam_sections = self.get_several_member('Fem::FemElementGeometry1D')
        self.beam_rotations = []
        self.fluid_sections = []
        self.shell_thicknesses = self.get_several_member('Fem::FemElementGeometry2D')

        self.constraints_contact = []
        self.constraints_displacement = []
        self.constraints_fixed = self.get_several_member('Fem::ConstraintFixed')
        self.constraints_force = self.get_several_member('Fem::ConstraintForce')
        self.constraints_heatflux = []
        self.constraints_initialtemperature = []
        self.constraints_pressure = []
        self.constraints_planerotation = []
        self.constraints_selfweight = []
        self.constraints_temperature = []
        self.constraints_transform = []
Ejemplo n.º 3
0
    def __init__(self, analysis):
        self.analysis = analysis

        # get mesh
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite",
                                           message)
            raise Exception(message + "\n")

        # get member
        # materials
        std_mats = self.get_several_member("Fem::Material")
        rei_mats = self.get_several_member("Fem::MaterialReinforced")
        self.materials_linear = std_mats + rei_mats

        self.materials_nonlinear = self.get_several_member(
            "Fem::MaterialMechanicalNonlinear")

        # geometries
        self.beam_sections = self.get_several_member(
            "Fem::FemElementGeometry1D")
        self.beam_rotations = self.get_several_member(
            "Fem::FemElementRotation1D")
        self.fluid_sections = self.get_several_member("Fem::FemElementFluid1D")
        self.shell_thicknesses = self.get_several_member(
            "Fem::FemElementGeometry2D")

        # constraints
        self.constraints_contact = self.get_several_member(
            "Fem::ConstraintContact")
        self.constraints_displacement = self.get_several_member(
            "Fem::ConstraintDisplacement")
        self.constraints_fixed = self.get_several_member(
            "Fem::ConstraintFixed")
        self.constraints_force = self.get_several_member(
            "Fem::ConstraintForce")
        self.constraints_heatflux = self.get_several_member(
            "Fem::ConstraintHeatflux")
        self.constraints_initialtemperature = self.get_several_member(
            "Fem::ConstraintInitialTemperature")
        self.constraints_planerotation = self.get_several_member(
            "Fem::ConstraintPlaneRotation")
        self.constraints_pressure = self.get_several_member(
            "Fem::ConstraintPressure")
        self.constraints_selfweight = self.get_several_member(
            "Fem::ConstraintSelfWeight")
        self.constraints_temperature = self.get_several_member(
            "Fem::ConstraintTemperature")
        self.constraints_transform = self.get_several_member(
            "Fem::ConstraintTransform")
Ejemplo n.º 4
0
    def __init__(self, analysis):
        self.analysis = analysis

        # get mesh
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(
                    None,
                    "Missing prerequisite",
                    message
                )
            raise Exception(message + '\n')

        # get member, empty lists are not supported by z88
        # materials
        self.materials_linear = self.get_several_member(
            'Fem::Material'
        )
        self.materials_nonlinear = []

        # geometries
        self.beam_sections = self.get_several_member(
            'Fem::FemElementGeometry1D'
        )
        self.beam_rotations = []
        self.fluid_sections = []
        self.shell_thicknesses = self.get_several_member(
            'Fem::FemElementGeometry2D'
        )

        # constraints
        self.constraints_contact = []
        self.constraints_displacement = []
        self.constraints_fixed = self.get_several_member(
            'Fem::ConstraintFixed'
        )
        self.constraints_force = self.get_several_member(
            'Fem::ConstraintForce'
        )
        self.constraints_heatflux = []
        self.constraints_initialtemperature = []
        self.constraints_pressure = []
        self.constraints_planerotation = []
        self.constraints_selfweight = []
        self.constraints_temperature = []
        self.constraints_transform = []
Ejemplo n.º 5
0
    def __init__(self, analysis):
        self.analysis = analysis

        # get mesh
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite",
                                           message)
            raise Exception(message + '\n')

        # get member
        self.materials_linear = self.get_several_member('Fem::Material')
        self.materials_nonlinear = self.get_several_member(
            'Fem::MaterialMechanicalNonlinear')
        self.fixed_constraints = self.get_several_member(
            'Fem::ConstraintFixed')
        self.selfweight_constraints = self.get_several_member(
            'Fem::ConstraintSelfWeight')
        self.force_constraints = self.get_several_member(
            'Fem::ConstraintForce')
        self.pressure_constraints = self.get_several_member(
            'Fem::ConstraintPressure')
        self.beam_sections = self.get_several_member(
            'Fem::FemElementGeometry1D')
        self.beam_rotations = self.get_several_member(
            'Fem::FemElementRotation1D')
        self.fluid_sections = self.get_several_member('Fem::FemElementFluid1D')
        self.shell_thicknesses = self.get_several_member(
            'Fem::FemElementGeometry2D')
        self.displacement_constraints = self.get_several_member(
            'Fem::ConstraintDisplacement')
        self.temperature_constraints = self.get_several_member(
            'Fem::ConstraintTemperature')
        self.heatflux_constraints = self.get_several_member(
            'Fem::ConstraintHeatflux')
        self.initialtemperature_constraints = self.get_several_member(
            'Fem::ConstraintInitialTemperature')
        self.planerotation_constraints = self.get_several_member(
            'Fem::ConstraintPlaneRotation')
        self.contact_constraints = self.get_several_member(
            'Fem::ConstraintContact')
        self.transform_constraints = self.get_several_member(
            'Fem::ConstraintTransform')
Ejemplo n.º 6
0
    def update_objects(self):
        ## @var mesh
        #  mesh of the analysis. Used to generate .inp file and to show results
        self.mesh = None
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite", message)
            raise Exception(message + '\n')

        # [{'Object':materials_linear}, {}, ...]
        # [{'Object':materials_nonlinear}, {}, ...]
        # [{'Object':fixed_constraints, 'NodeSupports':bool}, {}, ...]
        # [{'Object':force_constraints, 'NodeLoad':value}, {}, ...
        # [{'Object':pressure_constraints, 'xxxxxxxx':value}, {}, ...]
        # [{'Object':temerature_constraints, 'xxxxxxxx':value}, {}, ...]
        # [{'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}, {}, ...]

        ## @var materials_linear
        #  list of linear materials from the analysis. Updated with update_objects
        self.materials_linear = self._get_several_member('Fem::Material')
        ## @var materials_nonlinear
        #  list of nonlinear materials from the analysis. Updated with update_objects
        self.materials_nonlinear = self._get_several_member('Fem::MaterialMechanicalNonlinear')
        ## @var fixed_constraints
        #  list of fixed constraints from the analysis. Updated with update_objects
        self.fixed_constraints = self._get_several_member('Fem::ConstraintFixed')
        ## @var selfweight_constraints
        #  list of selfweight constraints from the analysis. Updated with update_objects
        self.selfweight_constraints = self._get_several_member('Fem::ConstraintSelfWeight')
        ## @var force_constraints
        #  list of force constraints from the analysis. Updated with update_objects
        self.force_constraints = self._get_several_member('Fem::ConstraintForce')
        ## @var pressure_constraints
        #  list of pressure constraints from the analysis. Updated with update_objects
        self.pressure_constraints = self._get_several_member('Fem::ConstraintPressure')
        ## @var beam_sections
        # list of beam sections from the analysis. Updated with update_objects
        self.beam_sections = self._get_several_member('Fem::FemElementGeometry1D')
        ## @var beam_rotations
        # list of beam rotations from the analysis. Updated with update_objects
        self.beam_rotations = self._get_several_member('Fem::FemElementRotation1D')
        ## @var fluid_sections
        # list of fluid sections from the analysis. Updated with update_objects
        self.fluid_sections = self._get_several_member('Fem::FemElementFluid1D')
        ## @var shell_thicknesses
        # list of shell thicknesses from the analysis. Updated with update_objects
        self.shell_thicknesses = self._get_several_member('Fem::FemElementGeometry2D')
        ## @var displacement_constraints
        # list of displacements for the analysis. Updated with update_objects
        self.displacement_constraints = self._get_several_member('Fem::ConstraintDisplacement')
        ## @var temperature_constraints
        # list of temperatures for the analysis. Updated with update_objects
        self.temperature_constraints = self._get_several_member('Fem::ConstraintTemperature')
        ## @var heatflux_constraints
        # list of heatflux constraints for the analysis. Updated with update_objects
        self.heatflux_constraints = self._get_several_member('Fem::ConstraintHeatflux')
        ## @var initialtemperature_constraints
        # list of initial temperatures for the analysis. Updated with update_objects
        self.initialtemperature_constraints = self._get_several_member('Fem::ConstraintInitialTemperature')
        ## @var planerotation_constraints
        #  list of plane rotation constraints from the analysis. Updated with update_objects
        self.planerotation_constraints = self._get_several_member('Fem::ConstraintPlaneRotation')
        ## @var contact_constraints
        #  list of contact constraints from the analysis. Updated with update_objects
        self.contact_constraints = self._get_several_member('Fem::ConstraintContact')
        ## @var transform_constraints
        #  list of transform constraints from the analysis. Updated with update_objects
        self.transform_constraints = self._get_several_member('Fem::ConstraintTransform')
Ejemplo n.º 7
0
    def update_objects(self):
        ## @var mesh
        #  mesh of the analysis. Used to generate .inp file and to show results
        self.mesh = None
        mesh, message = femutils.get_mesh_to_solve(self.analysis)
        if mesh is not None:
            self.mesh = mesh
        else:
            if FreeCAD.GuiUp:
                QtGui.QMessageBox.critical(None, "Missing prerequisite",
                                           message)
            raise Exception(message + '\n')

        # [{'Object':materials_linear}, {}, ...]
        # [{'Object':materials_nonlinear}, {}, ...]
        # [{'Object':fixed_constraints, 'NodeSupports':bool}, {}, ...]
        # [{'Object':force_constraints, 'NodeLoad':value}, {}, ...
        # [{'Object':pressure_constraints, 'xxxxxxxx':value}, {}, ...]
        # [{'Object':temerature_constraints, 'xxxxxxxx':value}, {}, ...]
        # [{'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}, {}, ...]

        ## @var materials_linear
        #  list of linear materials from the analysis. Updated with update_objects
        self.materials_linear = self._get_several_member('Fem::Material')
        ## @var materials_nonlinear
        #  list of nonlinear materials from the analysis. Updated with update_objects
        self.materials_nonlinear = self._get_several_member(
            'Fem::MaterialMechanicalNonlinear')
        ## @var fixed_constraints
        #  list of fixed constraints from the analysis. Updated with update_objects
        self.fixed_constraints = self._get_several_member(
            'Fem::ConstraintFixed')
        ## @var selfweight_constraints
        #  list of selfweight constraints from the analysis. Updated with update_objects
        self.selfweight_constraints = self._get_several_member(
            'Fem::ConstraintSelfWeight')
        ## @var force_constraints
        #  list of force constraints from the analysis. Updated with update_objects
        self.force_constraints = self._get_several_member(
            'Fem::ConstraintForce')
        ## @var pressure_constraints
        #  list of pressure constraints from the analysis. Updated with update_objects
        self.pressure_constraints = self._get_several_member(
            'Fem::ConstraintPressure')
        ## @var beam_sections
        # list of beam sections from the analysis. Updated with update_objects
        self.beam_sections = self._get_several_member(
            'Fem::FemElementGeometry1D')
        ## @var beam_rotations
        # list of beam rotations from the analysis. Updated with update_objects
        self.beam_rotations = self._get_several_member(
            'Fem::FemElementRotation1D')
        ## @var fluid_sections
        # list of fluid sections from the analysis. Updated with update_objects
        self.fluid_sections = self._get_several_member(
            'Fem::FemElementFluid1D')
        ## @var shell_thicknesses
        # list of shell thicknesses from the analysis. Updated with update_objects
        self.shell_thicknesses = self._get_several_member(
            'Fem::FemElementGeometry2D')
        ## @var displacement_constraints
        # list of displacements for the analysis. Updated with update_objects
        self.displacement_constraints = self._get_several_member(
            'Fem::ConstraintDisplacement')
        ## @var temperature_constraints
        # list of temperatures for the analysis. Updated with update_objects
        self.temperature_constraints = self._get_several_member(
            'Fem::ConstraintTemperature')
        ## @var heatflux_constraints
        # list of heatflux constraints for the analysis. Updated with update_objects
        self.heatflux_constraints = self._get_several_member(
            'Fem::ConstraintHeatflux')
        ## @var initialtemperature_constraints
        # list of initial temperatures for the analysis. Updated with update_objects
        self.initialtemperature_constraints = self._get_several_member(
            'Fem::ConstraintInitialTemperature')
        ## @var planerotation_constraints
        #  list of plane rotation constraints from the analysis. Updated with update_objects
        self.planerotation_constraints = self._get_several_member(
            'Fem::ConstraintPlaneRotation')
        ## @var contact_constraints
        #  list of contact constraints from the analysis. Updated with update_objects
        self.contact_constraints = self._get_several_member(
            'Fem::ConstraintContact')
        ## @var transform_constraints
        #  list of transform constraints from the analysis. Updated with update_objects
        self.transform_constraints = self._get_several_member(
            'Fem::ConstraintTransform')