예제 #1
0
    def test_state2Dcb_missing(self):
        state1 = staterelations.RuinaState()
        state1.b = 0.0185
        state1.Dc = 5.

        state2 = staterelations.RuinaState()
        state2.b = 0.0088
        self.model.state_relations = [state1, state2]
        self.model.solve()
def RunModel():
    # Set model initial conditions
    model.mu0 = 0.6  # Friction initial (at the reference velocity)
    model.a = a_floatBox.value  # Empirical coefficient for the direct effect
    model.k = k_floatBox.value  # Normalized System stiffness (friction/micron)

    if sv1_dropdown.value == "Aging Relation":
        state1 = staterelations.DieterichState()
        state1.b = b1_floatBox.value  # Empirical coefficient for the evolution effect
        state1.Dc = Dc1_floatBox.value  # Critical slip distance

    elif sv1_dropdown.value == "Slowness Relation":
        state1 = staterelations.RuinaState()
        state1.b = b1_floatBox.value  # Empirical coefficient for the evolution effect
        state1.Dc = Dc1_floatBox.value  # Critical slip distance

    else:
        # We shouldn't be here!
        pass

    if sv2_dropdown.value == "Aging Relation":
        state2 = staterelations.DieterichState()
        state2.b = b1_floatBox.value  # Empirical coefficient for the evolution effect
        state2.Dc = Dc1_floatBox.value  # Critical slip distance

    elif sv2_dropdown.value == "Slowness Relation":
        state2 = staterelations.RuinaState()
        state2.b = b1_floatBox.value  # Empirical coefficient for the evolution effect
        state2.Dc = Dc1_floatBox.value  # Critical slip distance

    else:
        # None
        pass

    model.state_relations = [state1]  # Which state relation we want to use

    if sv2_dropdown.value != "None":
        model.state_relations.append(state2)

    time, velocity = parse_sequence(step_sequence_string.value)

    model.time = time
    # Set the model load point velocity, must be same shape as model.model_time
    model.loadpoint_velocity = velocity

    model.v = velocity[0]  # Initial slider velocity, generally is vlp(t=0)
    model.vref = velocity[0]  # Reference velocity, generally vlp(t=0)

    # Run the model!
    model.solve()
예제 #3
0
    def setup(self):
        self.model = rsf.Model()
        self.model.mu0 = 0.6
        self.model.a = 0.012
        self.model.k = 8e-3
        self.model.v = 1.
        self.model.vref = 1.
        state1 = staterelations.RuinaState()
        state1.b = 0.0185
        state1.Dc = 5.

        state2 = staterelations.RuinaState()
        state2.b = 0.0088
        state2.Dc = 50.
        self.model.state_relations = [state1, state2]
        self.model.time = np.arange(0, 40.01, 1.)
        lp_velocity = np.ones_like(self.model.time)
        lp_velocity[10 * 1:] = 10.
        self.model.loadpoint_velocity = lp_velocity
        self.model.solve()