Beispiel #1
0
class POClampedFiber(RF):
    '''
    Pullout of fiber from a stiff matrix;
    stress criterion for debonding, fixed fiber end
    '''

    implements(IRF)

    title = Str('pullout - clamped fiber with constant friction')
    image = Image('pics/cb_short_fiber.jpg', size=2)

    xi = Float(0.0179, auto_set=False, enter_set=True, input=True,
                distr=['weibull_min', 'uniform'])

    tau = Float(2.5, auto_set=False, enter_set=True, input=True,
                distr=['uniform', 'norm'])

    l = Float(0.0, auto_set=False, enter_set=True, input=True,
              distr=['uniform'], desc='free length')

    D_f = Float(26e-3, auto_set=False, input=True,
              enter_set=True, distr=['uniform', 'weibull_min'])

    E_f = Float(72.0e3, auto_set=False, enter_set=True, input=True,
                  distr=['uniform'])

    theta = Float(0.01, auto_set=False, enter_set=True, input=True,
                  distr=['uniform', 'norm'], desc='slack')

    phi = Float(1., auto_set=False, enter_set=True, input=True,
                  distr=['uniform', 'norm'], desc='bond quality')

    L = Float(1., auto_set=False, enter_set=True, input=True,
              distr=['uniform'], desc='embedded length')

    u = Float(auto_set=False, enter_set=True,
               ctrl_range=(0.0, 0.02, 100))

    x_label = Str('displacement [mm]')
    y_label = Str('force [N]')

    C_code = Str('')

    def __call__(self, u, tau, l, D_f, E_f, theta, xi, phi, L):

        A = pi * D_f ** 2 / 4.
        l = l * (1 + theta)
        u = u - theta * l
        T = tau * phi * D_f * pi
        q = (-l * T + sqrt(l ** 2 * T ** 2 + 2 * u * H(u) * E_f * A * T))

        # displacement at which the debonding is finished
        u0 = L * T * (L + 2 * l) / 2 / E_f / A
        q = q * H(T * L - q) + (T * L + (u - u0) / (l + L) * A * E_f) * H(q - T * L)

            # ----------------------------------
        q = q * H(A * E_f * xi - q)
        return q
Beispiel #2
0
class RVModelView(ModelView):
    '''
    ModelView class for displaying the table of parameters and
    set the distribution parameters of random variables
    '''

    title = Str('randomization setup')

    model = Instance(SPIRRID)

    rv_list = List(RIDVariable)

    @on_trait_change('model.rf')
    def get_rv_list(self):
        self.rv_list = [
            RIDVariable(s=self.model,
                        rf=self.model.rf,
                        varname=nm,
                        trait_value=st) for nm, st in
            zip(self.model.rf.param_keys, self.model.rf.param_values)
        ]

    selected_var = Instance(RIDVariable)

    def _selected_var_default(self):
        return self.rv_list[0]

    title = Str('random variable editor')

    selected_var = Instance(RIDVariable)

    traits_view = View(VSplit(
        HGroup(
            Item('rv_list', editor=rv_list_editor, show_label=False),
            id='rid.tview.randomization.rv',
            label='Model variables',
        ),
        HGroup(
            Item('selected_var@', show_label=False, resizable=True),
            id='rid.tview.randomization.distr',
            label='Distribution',
        ),
        scrollable=True,
        id='rid.tview.tabs',
        dock='tab',
    ),
                       title='RANDOM VARIABLES',
                       id='rid.ridview',
                       dock='tab',
                       resizable=True,
                       height=1.0,
                       width=1.0)
class ConstantFrictionAndFreeLength(RF):
    '''
    '''

    implements(IRF)

    title = Str('pull-out with constant friction and free length ')

    tau = Float(8, auto_set=False, enter_set=True, distr=['uniform'])

    # free length
    l = Float(1, auto_set=False, enter_set=True, distr=['uniform', 'norm'])

    E = Float(70e9, auto_set=False, enter_set=True, distr=['uniform'])

    A = Float(5.30929158457e-10,
              auto_set=False,
              enter_set=True,
              distr=['uniform', 'weibull_min'])

    # waviness in strains
    slack = Float(0.1, auto_set=False, enter_set=True, distr=['uniform'])

    u = Float(auto_set=False, enter_set=True, ctrl_range=(0.0, 1.0, 10))

    def __call__(self, u, tau, l, E, A, slack):
        return -l * (1 + slack) * tau * Heaviside(u - l * (slack)) + \
                + sqrt((l * (1 + slack) * tau) ** 2 \
                + 2 * E * A * (u - (l * slack)) * Heaviside(u - l * (slack)))
Beispiel #4
0
class S(YMBSource):

    yarn_type = Enum('__TEST__',
                     changed_source=True,
                     editor=EnumEditor(values=['__TEST__']))
    root_dir = Str('')

    view = View(Item('yarn_type'))
Beispiel #5
0
    class Preprocessor(HasTraits):
        title = Str('preprocessor')
        prep_components = Property(List)

        def _get_prep_components(self):
            rf_view = RFModelView(model=default_rf, child=spirrid)
            rf_view._redraw()
            rv_view = RVModelView(model=spirrid)
            return [rf_view, rv_view]
class ConstantFrictionFreeLengthFiniteFiber(RF):
    '''
    '''

    implements(IRF)

    title = Str('pull-out with constant friction and free length ')

    tau = Float(0.5e6,
                auto_set=False,
                enter_set=True,
                distr=['uniform', 'weibull_min', 'norm'])

    # free length
    l = Float(0.01, auto_set=False, enter_set=True, distr=['uniform', 'norm'])

    E = Float(70e9, auto_set=False, enter_set=True, distr=['uniform'])

    A = Float(5.30929158457e-10,
              auto_set=False,
              enter_set=True,
              distr=['uniform', 'weibull_min'])

    # waviness in strains
    slack = Float(0.0, auto_set=False, enter_set=True, distr=['uniform'])

    # embedded length
    L = Float(0.03, auto_set=False, enter_set=True, distr=['uniform'])

    # breking stress
    sigma_fu = Float(1200.e6,
                     auto_set=False,
                     enter_set=True,
                     distr=['uniform'])

    u = Float(auto_set=False, enter_set=True, ctrl_range=(0.0, 1.0, 10))

    #

    def __call__(self, u, tau, l, E, A, slack, L, sigma_fu):
        ''' method for evaluating the u-F diagram for
        pullout with constant friction at the interface and
        free fiber length sticking out of the matrix '''
        # defining tau as length dependent
        tau = tau * sqrt(4 * A * pi)
        # constitutive law for a pullout without free length
        q = ( -l * ( 1 + slack ) * tau * Heaviside( u / 2 - l * ( slack ) ) + \
                + sqrt( ( l * ( 1 + slack ) * tau ) ** 2 * Heaviside( u / 2 - l * ( slack ) ) \
                + 2 * E * A * ( u / 2 - ( l * slack ) ) * Heaviside( u / 2 - l * ( slack ) ) ) )

        # deformation of the free length added
        continuous = q * Heaviside( L - l - q / tau )\
                + ( L - l ) * tau * Heaviside( l + q / tau - L )

        # a check whether the fiber has reached the breaking stress
        return continuous * Heaviside(sigma_fu - continuous / A)
Beispiel #7
0
    class fiber_tt_5p_np(RF):
        ''' Response function of a single fiber '''
        implements(IRF)

        title = Str('brittle filament')

        def __call__(self, eps, lambd, xi, E_mod, theta, A):
            '''
            Implements the response function with arrays as variables.
            first extract the variable discretizations from the orthogonal grid.
            '''
            eps_ = (eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd))

            eps_ *= Heaviside(eps_)
            eps_grid = eps_ * Heaviside(xi - eps_)
            q_grid = E_mod * A * eps_grid

            return q_grid
Beispiel #8
0
    class fiber_tt_5p_ne(RF):
        ''' Response function of a single fiber '''
        implements(IRF)

        title = Str('brittle filament')

        def __call__(self, eps, lambd, xi, E_mod, theta, A):
            '''
            Implements the response function with arrays as variables.
            first extract the variable discretizations from the orthogonal grid.
            '''
            eps_ = ne.evaluate(
                "((eps - theta * (1 + lambd)) / ((1 + theta) * (1 + lambd)))")
            tmp = Heaviside_ne(eps_)
            eps_ = ne.evaluate('eps_*tmp')
            tmp = Heaviside_ne(ne.evaluate("(xi - eps_)"))
            eps_grid = ne.evaluate("eps_ * tmp")
            q_grid = ne.evaluate("E_mod * A * eps_grid")

            return q_grid