Exemplo n.º 1
0
    def _plot_smoothed_force_deflection_center(self, axes):

        xkey = 'deflection [mm]'
        ykey = 'force [kN]'

        # get the index of the maximum stress
        max_force_idx = argmax(self.Kraft)
        # get only the ascending branch of the response curve
        f_asc = self.Kraft[:max_force_idx + 1]
        w_asc = -self.WD4[:max_force_idx + 1]

        f_max = f_asc[-1]
        w_max = w_asc[-1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        f_smooth = smooth(f_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        axes.plot(w_smooth, f_smooth, color = 'blue', linewidth = 2)

        secant_stiffness_w10 = (f_smooth[10] - f_smooth[0]) / (w_smooth[10] - w_smooth[0])
        w0_lin = array([0.0, w_smooth[10] ], dtype = 'float_')
        f0_lin = array([0.0, w_smooth[10] * secant_stiffness_w10 ], dtype = 'float_')

        axes.set_xlabel('%s' % (xkey,))
        axes.set_ylabel('%s' % (ykey,))
Exemplo n.º 2
0
 def _get_smoothed_M_eps_c_raw(self):
     # get the index of the maximum stress
     max_idx = argmax(self.M_raw)
     # get only the ascending branch of the response curve
     m_asc = self.M_raw[:max_idx + 1]
     eps_c_asc = self.eps_c_raw[:max_idx + 1]
     n_points = int(self.n_fit_window_fraction * len(eps_c_asc))
     m_smoothed = smooth(m_asc, n_points, 'flat')
     eps_c_smoothed = smooth(eps_c_asc, n_points, 'flat')
     return m_smoothed, eps_c_smoothed
Exemplo n.º 3
0
 def _get_smoothed_M_eps_c_ASC(self):
     # get the index of the maximum stress
     max_idx = argmax(self.M_ASC)
     # get only the ascending branch of the response curve
     m_asc = self.M_ASC[:max_idx + 1]
     eps_c_asc = self.eps_c_ASC[:max_idx + 1]
     n_points = int(self.n_fit_window_fraction * len(eps_c_asc))
     m_smoothed = smooth(m_asc, n_points, 'flat')
     eps_c_smoothed = smooth(eps_c_asc, n_points, 'flat')
     return m_smoothed, eps_c_smoothed
Exemplo n.º 4
0
    def _plot_smoothed_force_deflection_center(self, axes):
        # get only the ascending branch of the response curve
        f_asc = self.Kraft[:self.max_force_idx + 1]
        w_asc = self.DB_mi[:self.max_force_idx + 1]

        # add axes labels
        #
        n_points = int(self.n_fit_window_fraction * len(w_asc))
        f_smooth = smooth(f_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        # add curves
        #
        axes.plot(w_smooth, f_smooth, color='blue', linewidth=2)
    def _get_polyfit( self ):
        # get the fit with n-th-order polynomial
        
        n_points = int( self.n_fit_window_fraction * len( self.eps ) )

        self.eps_fit = smooth( self.eps_asc,   n_points, 'flat' )
        sig_c_fit    = smooth( self.sig_c_asc, n_points, 'flat' )

        sig_lin = self.E_c * self.eps_fit
        cut_sig = where( sig_c_fit > sig_lin )
        sig_c_fit[ cut_sig ] = sig_lin[ cut_sig ]
        self.sig_c_fit = sig_c_fit
        
        self.sig_tex_fit = smooth( self.sig_tex_asc, n_points, 'flat' )
Exemplo n.º 6
0
    def _plot_smoothed_force_deflection_center(self, axes):
        # get only the ascending branch of the response curve
        f_asc = self.Kraft[:self.max_force_idx + 1]
        w_asc = self.DB_mi[:self.max_force_idx + 1]

        # add axes labels
        #
        n_points = int(self.n_fit_window_fraction * len(w_asc))
        f_smooth = smooth(f_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        # add curves
        #
        axes.plot(w_smooth, f_smooth, color='blue', linewidth=2)
Exemplo n.º 7
0
    def _plot_smoothed_force_gauge_displacement(self, axes):

        # get the index of the maximum stress
        #
        max_force_idx = argmax(self.F_ASC)

        # get only the ascending branch of the response curve
        #
        F_asc = self.F_ASC[:max_force_idx + 1]
        w_asc = self.w_ASC[:max_force_idx + 1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        F_smooth = smooth(F_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        axes.plot(w_smooth, F_smooth, color='blue', linewidth=2)
Exemplo n.º 8
0
    def _plot_smoothed_force_gauge_displacement(self, axes):

        # get the index of the maximum stress
        #
        max_force_idx = argmax(self.F_ASC)

        # get only the ascending branch of the response curve
        #
        F_asc = self.F_ASC[:max_force_idx + 1]
        w_asc = self.w_ASC[:max_force_idx + 1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        F_smooth = smooth(F_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        axes.plot(w_smooth, F_smooth, color='blue', linewidth=2)
 def _get_sig_c_smooth(self):
     print "COMPUTING SMOOTHED COMPOSITE STRESS"
     sig_c_smooth = smooth(self.sig_c_asc, self.n_points, "flat")
     sig_lin = self.E_c * self.eps_smooth
     cut_sig = where(sig_c_smooth > sig_lin)
     sig_c_smooth[cut_sig] = sig_lin[cut_sig]
     return sig_c_smooth
Exemplo n.º 10
0
 def _get_sig_c_smooth(self):
     print 'COMPUTING SMOOTHED COMPOSITE STRESS'
     sig_c_smooth = smooth(self.sig_c_asc, self.n_points, 'flat')
     if self.cut_sig_c_eps_smoothed_with_E_c_linear:
         sig_lin = self.E_c * self.eps_smooth
         cut_sig = where(sig_c_smooth > sig_lin)
         sig_c_smooth[ cut_sig ] = sig_lin[ cut_sig ]
     return sig_c_smooth
Exemplo n.º 11
0
    def _plot_smoothed_force_deflection_center(self, axes):

        # get the index of the maximum stress
        max_force_idx = argmax(-self.Kraft)
        # get only the ascending branch of the response curve
        f_asc = -self.Kraft[: max_force_idx + 1]
        w_asc = -self.WA_M[: max_force_idx + 1]

        f_max = f_asc[-1]
        w_max = w_asc[-1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        f_smooth = smooth(f_asc, n_points, "flat")
        w_smooth = smooth(w_asc, n_points, "flat")

        axes.plot(w_smooth, f_smooth, color="blue", linewidth=2)

        secant_stiffness_w10 = (f_smooth[10] - f_smooth[0]) / (w_smooth[10] - w_smooth[0])
        w0_lin = array([0.0, w_smooth[10]], dtype="float_")
        f0_lin = array([0.0, w_smooth[10] * secant_stiffness_w10], dtype="float_")
Exemplo n.º 12
0
    def _plot_smoothed_force_machine_displacement_wo_elast(self, axes):

        # get the index of the maximum stress
        #
        max_force_idx = argmax(self.F_raw)

        # get only the ascending branch of the response curve
        #
        F_asc = self.F_raw[:max_force_idx + 1]
        w_asc = self.w_wo_elast[:max_force_idx + 1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        F_smooth = smooth(F_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        axes.plot(w_smooth, F_smooth, color='blue', linewidth=2)

        # plot analytical bending stiffness
        #
        w_linear = 2 * np.array([0., 1.])
        F_linear = 2 * np.array([0., self.K_bending_elast])
        axes.plot(w_linear, F_linear, linestyle='--')
Exemplo n.º 13
0
    def _plot_smoothed_force_machine_displacement_wo_elast(self, axes):

        # get the index of the maximum stress
        #
        max_force_idx = argmax(self.F_raw)

        # get only the ascending branch of the response curve
        #
        F_asc = self.F_raw[:max_force_idx + 1]
        w_asc = self.w_wo_elast[:max_force_idx + 1]

        n_points = int(self.n_fit_window_fraction * len(w_asc))
        F_smooth = smooth(F_asc, n_points, 'flat')
        w_smooth = smooth(w_asc, n_points, 'flat')

        axes.plot(w_smooth, F_smooth, color='blue', linewidth=2)

        # plot analytical bending stiffness
        #
        w_linear = 2 * np.array([0., 1.])
        F_linear = 2 * np.array([0., self.K_bending_elast])
        axes.plot(w_linear, F_linear, linestyle='--')
Exemplo n.º 14
0
 def _get_w_smooth(self):
     return smooth(self.w_asc, self.n_points, 'flat')
Exemplo n.º 15
0
 def _get_w_smooth(self):
     return smooth(self.w_asc, self.n_points, 'flat')
Exemplo n.º 16
0
 def _get_sig_tex_smooth(self):
     return smooth(self.sig_tex_asc, self.n_points, 'flat')
Exemplo n.º 17
0
 def _get_eps_smooth(self):
     return smooth(self.eps_asc, self.n_points, 'flat')