コード例 #1
0
 def setup(self):
     self.model = rsf.Model()
     self.model.mu0 = 0.6
     self.model.a = 0.01
     self.model.k = 1e-3
     self.model.v = 1.
     self.model.vref = 1.
     state1 = staterelations.RuinaState()
     state1.b = 0.005
     state1.Dc = 10.
     self.model.state_relations = [state1]
     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()
コード例 #2
0
 def setup(self):
     self.model = rsf.Model()
     self.model.mu0 = 0.6
     self.model.a = 0.027
     self.model.k = 0.01
     self.model.v = 1.
     self.model.vref = 1.
     state1 = staterelations.NagataState()
     state1.b = 0.029
     state1.Dc = 3.33
     state1.c = 2.
     self.model.state_relations = [state1]
     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(hmax=0.01)
コード例 #3
0
    def setup(self):
        self.model = rsf.Model()
        self.model.mu0 = 0.6
        self.model.a = 0.012
        self.model.k = 3e-3
        self.model.v = 1.
        self.model.vref = 1.
        state1 = staterelations.DieterichState()
        state1.b = 0.0185
        state1.Dc = 5.

        state2 = staterelations.DieterichState()
        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()
コード例 #4
0
# + {"extensions": {"jupyter_dashboards": {"version": 1, "views": {"grid_default": {"hidden": true}, "report_default": {"hidden": false}}}}}
# These are the "Tableau 20" colors as RGB.
tableau20 = [(31, 119, 180), (174, 199, 232), (255, 127, 14), (255, 187, 120),
             (44, 160, 44), (152, 223, 138), (214, 39, 40), (255, 152, 150),
             (148, 103, 189), (197, 176, 213), (140, 86, 75), (196, 156, 148),
             (227, 119, 194), (247, 182, 210), (127, 127, 127),
             (199, 199, 199), (188, 189, 34), (219, 219, 141), (23, 190, 207),
             (158, 218, 229)]

# Scale the RGB values to the [0, 1] range, which is the format matplotlib accepts.
for i in range(len(tableau20)):
    r, g, b = tableau20[i]
    tableau20[i] = (r / 255., g / 255., b / 255.)

# + {"extensions": {"jupyter_dashboards": {"version": 1, "views": {"grid_default": {"hidden": true}, "report_default": {"hidden": false}}}}}
model = rsf.Model()

# + {"extensions": {"jupyter_dashboards": {"version": 1, "views": {"grid_default": {"hidden": true}, "report_default": {"hidden": false}}}}}
a_floatBox = widgets.BoundedFloatText(
    value=0.005,
    min=0,
    max=1,
    description='a:',
)

b1_floatBox = widgets.BoundedFloatText(
    value=0.01,
    min=0,
    max=1,
    description='b:',
)