Ejemplo n.º 1
0
    def create(self, force=False):
        """Applies the mid-surface imperfection in the finite element model

        .. note:: Must be called from Abaqus.

        Parameters
        ----------
        force : bool, optional
            Creates the imperfection even when it is already created

        """
        from abaqus import mdb

        if self.created:
            if force:
                self.created = False
                self.create()
            else:
                return
        cc = self.impconf.conecyl
        if self.c0 is None:
            self.nodal_translations = translate_nodes_ABAQUS(
                              imperfection_file_name = self.path,
                              model_name = cc.model_name,
                              part_name = cc.part_name_shell,
                              H_model = cc.H,
                              H_measured = self.H_measured,
                              R_model = cc.rbot,
                              R_best_fit = self.R_best_fit,
                              semi_angle = cc.alphadeg,
                              stretch_H = self.stretch_H,
                              rotatedeg = self.rotatedeg,
                              scaling_factor = self.scaling_factor,
                              r_TOL = self.r_TOL,
                              num_closest_points = self.ncp,
                              power_parameter = self.power_parameter,
                              num_sec_z = self.num_sec_z,
                              nodal_translations = self.nodal_translations,
                              use_theta_z_format = self.use_theta_z_format,
                              ignore_bot_h = self.ignore_bot_h,
                              ignore_top_h = self.ignore_top_h,
                              sample_size = self.sample_size)
        else:
            if self.rotatedeg:
                warn('"rotatedeg != 0", be sure you included this effect ' +
                     'when calculating "c0"')
            self.nodal_translations = translate_nodes_ABAQUS_c0(
                              m0 = self.m0,
                              n0 = self.n0,
                              c0 = self.c0,
                              funcnum = self.funcnum,
                              model_name = cc.model_name,
                              part_name = cc.part_name_shell,
                              H_model = cc.H,
                              semi_angle = cc.alphadeg,
                              scaling_factor = self.scaling_factor,
                              fem_meridian_bot2top = True,
                              ignore_bot_h = self.ignore_bot_h,
                              ignore_top_h = self.ignore_top_h)
        self.created = True
        print '%s amplitude = %f' % (self.name, self.calc_amplitude())

        return self.nodal_translations
Ejemplo n.º 2
0
    def create(self, force=False):
        """Applies the mid-surface imperfection in the finite element model

        .. note:: Must be called from Abaqus.

        Parameters
        ----------
        force : bool, optional
            Creates the imperfection even when it is already created

        """
        from abaqus import mdb

        if self.created:
            if force:
                self.created = False
                self.create()
            else:
                return
        cc = self.impconf.conecyl
        if self.c0 is None:
            self.nodal_translations = translate_nodes_ABAQUS(
                              imperfection_file_name = self.path,
                              model_name = cc.model_name,
                              part_name = cc.part_name_shell,
                              H_model = cc.H,
                              H_measured = self.H_measured,
                              R_model = cc.rbot,
                              R_best_fit = self.R_best_fit,
                              semi_angle = cc.alphadeg,
                              stretch_H = self.stretch_H,
                              rotatedeg = self.rotatedeg,
                              scaling_factor = self.scaling_factor,
                              r_TOL = self.r_TOL,
                              num_closest_points = self.ncp,
                              power_parameter = self.power_parameter,
                              num_sec_z = self.num_sec_z,
                              nodal_translations = self.nodal_translations,
                              use_theta_z_format = self.use_theta_z_format,
                              ignore_bot_h = self.ignore_bot_h,
                              ignore_top_h = self.ignore_top_h,
                              sample_size = self.sample_size)
        else:
            if self.rotatedeg:
                warn('"rotatedeg != 0", be sure you included this effect ' +
                     'when calculating "c0"')
            self.nodal_translations = translate_nodes_ABAQUS_c0(
                              m0 = self.m0,
                              n0 = self.n0,
                              c0 = self.c0,
                              funcnum = self.funcnum,
                              model_name = cc.model_name,
                              part_name = cc.part_name_shell,
                              H_model = cc.H,
                              semi_angle = cc.alphadeg,
                              scaling_factor = self.scaling_factor,
                              fem_meridian_bot2top = True,
                              ignore_bot_h = self.ignore_bot_h,
                              ignore_top_h = self.ignore_top_h)
        self.created = True
        print '%s amplitude = %f' % (self.name, self.calc_amplitude())

        return self.nodal_translations