How to use the landlab.components.linkca.link_ca.Transition function in landlab

To help you get started, we’ve selected a few landlab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github landlab / landlab / landlab / components / linkca / examples / hillslope_ca_dejh.py View on Github external
49 (4/4)

    """
    xn_list = []

    down_fall = 10.
    hoz_motion = 5.
    up_motion = 0.5
    down_ejection = 0.5 #gets doubled
    hoz_ejection = 0.01
    up_ejection = 0.005 #gets doubled
    demob_wall = 100.
    demob_friction = 0.5 #ratio of friction to hoz&v motions appears crucial for threshold angle
    xn_list.append( Transition((0,3,0), (1,0,0), hoz_ejection, 'left ejection') ) #0.01
    xn_list.append( Transition((3,0,0), (0,2,0), hoz_ejection, 'right ejection') ) #0.01
    xn_list.append( Transition((0,3,1), (1,0,1), down_ejection, 'downward ejection, left') ) #0.005
    xn_list.append( Transition((0,3,1), (2,0,1), down_ejection, 'downward ejection, right') ) #0.005
    xn_list.append( Transition((3,0,1), (0,1,1), up_ejection, 'upward ejection, left') ) #0.005
    xn_list.append( Transition((3,0,1), (0,2,1), up_ejection, 'upward ejection, right') ) #0.005
    xn_list.append( Transition((2,3,0), (3,3,0), demob_wall, 'demobilization (right wall)') )
    xn_list.append( Transition((3,1,0), (3,3,0), demob_wall, 'demobilization (left wall)') )
    xn_list.append( Transition((3,1,1), (3,3,1), demob_friction, 'demobilization (friction)') )
    xn_list.append( Transition((3,2,1), (3,3,1), demob_friction, 'demobilization (friction)') )
    xn_list.append( Transition((0,1,0), (1,0,0), hoz_motion, 'leftward motion') )
    xn_list.append( Transition((2,0,0), (0,2,0), hoz_motion, 'rightward motion') )
    xn_list.append( Transition((1,0,1), (0,1,1), up_motion, 'upward motion') )
    xn_list.append( Transition((2,0,1), (0,2,1), up_motion, 'upward motion') )
    xn_list.append( Transition((0,1,1), (1,0,1), down_fall, 'downward motion') )
    xn_list.append( Transition((0,2,1), (2,0,1), down_fall, 'downward motion') )
    #DEJH adds rock-regolith properties:
    P_weath_bare = 0.01 #0.004
    P_weath_mobile = 0.0004
github landlab / landlab / landlab / components / linkca / examples / hillslope_ca.py View on Github external
xn_list.append( Transition(3, 4, 2., 'left ejection') )
    xn_list.append( Transition(12, 2, 2., 'right ejection') )
    xn_list.append( Transition(19, 20, 2.e8, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 2.e8, 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 1., 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 1., 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 3.0e7, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 3.0e7, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 3.0e8, 'leftward motion') )
    xn_list.append( Transition(8, 2, 3.0e8, 'rightward motion') )
    xn_list.append( Transition(20, 17, 2.0e6, 'upward motion') )
    xn_list.append( Transition(24, 18, 2.0e6, 'upward motion') )
    xn_list.append( Transition(18, 24, 2.0e8, 'downward motion') )
    xn_list.append( Transition(17, 20, 2.0e8, 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)

    return xn_list
github landlab / landlab / landlab / components / linkca / link_ca.py View on Github external
def setup_transition_list():
    """
    Creates and returns a list of Transition() objects. This is a "custom"
    function in the sense that any particular application is determined by the
    transition rules that are created here.
    """
    xn_list = []
    
    xn_list.append( Transition(1, 3, 1., 'weathering') ) # rock-sap to sap-sap
    xn_list.append( Transition(2, 3, 1., 'weathering') ) # sap-rock to sap-sap
        
    if _DEBUG:
        print
        print 'setup_transition_list(): list has',len(xn_list),'transitions:'
        for t in xn_list:
            print '  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name
        
    return xn_list
github landlab / landlab / landlab / components / linkca / link_ca.py View on Github external
State:    Pair:  
    9            0-0
    10           0-1
    11           0-2
    12           1-0
    13           1-1
    14           1-2
    15           2-0
    16           2-1
    17           2-2
   
    """
    xn_list = []
    
    xn_list.append( Transition(1, 2, 1., 'mobilization') ) # 
    xn_list.append( Transition(3, 6, 1., 'mobilization') ) # 
        
    if _DEBUG:
        print
        print 'setup_transition_list2(): list has',len(xn_list),'transitions:'
        for t in xn_list:
            print '  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name
        
    return xn_list
github landlab / landlab / landlab / components / linkca / examples / hillslope_ca.py View on Github external
26 (2/2)
    27 (2/3)
    28 (3/0)        17 (0/1)            upward ejection, left
                    18 (0/2)            upward ejection, right
    29 (3/1)        31 (3/3)            demobilization (friction)
    30 (3/2)        31 (3/3)            demobilization (friction)
    31 (3/3)

    """
    xn_list = []

    xn_list.append( Transition(3, 4, 2., 'left ejection') )
    xn_list.append( Transition(12, 2, 2., 'right ejection') )
    xn_list.append( Transition(19, 20, 2.e8, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 2.e8, 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 1., 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 1., 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 3.0e7, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 3.0e7, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 3.0e8, 'leftward motion') )
    xn_list.append( Transition(8, 2, 3.0e8, 'rightward motion') )
    xn_list.append( Transition(20, 17, 2.0e6, 'upward motion') )
    xn_list.append( Transition(24, 18, 2.0e6, 'upward motion') )
    xn_list.append( Transition(18, 24, 2.0e8, 'downward motion') )
    xn_list.append( Transition(17, 20, 2.0e8, 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
github landlab / landlab / landlab / components / linkca / examples / dambreak_ca.py View on Github external
30 (3/2)        31 (3/3)            demobilization (friction)
    31 (3/3)

    """
    xn_list = []

    xn_list.append( Transition(3, 4, 0.001, 'left ejection') )
    xn_list.append( Transition(12, 2, 1., 'right ejection') )
    xn_list.append( Transition(19, 20, 0.001, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 10., 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 0.001, 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 0.01, 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 0.001, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 0.001, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 100., 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 0.001, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 0.001, 'leftward motion') )
    xn_list.append( Transition(8, 2, 40., 'rightward motion') )
    xn_list.append( Transition(20, 17, 0.001, 'upward motion') )
    xn_list.append( Transition(24, 18, 0.01, 'upward motion') )
    xn_list.append( Transition(18, 24, 100., 'downward motion') )
    xn_list.append( Transition(17, 20, 100., 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)

    return xn_list
github landlab / landlab / landlab / components / linkca / examples / hillslope_ca.py View on Github external
28 (3/0)        17 (0/1)            upward ejection, left
                    18 (0/2)            upward ejection, right
    29 (3/1)        31 (3/3)            demobilization (friction)
    30 (3/2)        31 (3/3)            demobilization (friction)
    31 (3/3)

    """
    xn_list = []

    xn_list.append( Transition(3, 4, 2., 'left ejection') )
    xn_list.append( Transition(12, 2, 2., 'right ejection') )
    xn_list.append( Transition(19, 20, 2.e8, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 2.e8, 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 1., 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 1., 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 3.0e7, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 3.0e7, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 3.0e8, 'leftward motion') )
    xn_list.append( Transition(8, 2, 3.0e8, 'rightward motion') )
    xn_list.append( Transition(20, 17, 2.0e6, 'upward motion') )
    xn_list.append( Transition(24, 18, 2.0e6, 'upward motion') )
    xn_list.append( Transition(18, 24, 2.0e8, 'downward motion') )
    xn_list.append( Transition(17, 20, 2.0e8, 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)
github landlab / landlab / landlab / components / linkca / examples / hillslope_ca.py View on Github external
30 (3/2)        31 (3/3)            demobilization (friction)
    31 (3/3)

    """
    xn_list = []

    xn_list.append( Transition(3, 4, 2., 'left ejection') )
    xn_list.append( Transition(12, 2, 2., 'right ejection') )
    xn_list.append( Transition(19, 20, 2.e8, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 2.e8, 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 1., 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 1., 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 3.0e7, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 3.0e7, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 2.0e6, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 3.0e8, 'leftward motion') )
    xn_list.append( Transition(8, 2, 3.0e8, 'rightward motion') )
    xn_list.append( Transition(20, 17, 2.0e6, 'upward motion') )
    xn_list.append( Transition(24, 18, 2.0e6, 'upward motion') )
    xn_list.append( Transition(18, 24, 2.0e8, 'downward motion') )
    xn_list.append( Transition(17, 20, 2.0e8, 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)

    return xn_list
github landlab / landlab / landlab / components / linkca / examples / dambreak_ca.py View on Github external
xn_list.append( Transition(3, 4, 0.001, 'left ejection') )
    xn_list.append( Transition(12, 2, 1., 'right ejection') )
    xn_list.append( Transition(19, 20, 0.001, 'downward ejection, left') )
    xn_list.append( Transition(19, 24, 10., 'downward ejection, right') )
    xn_list.append( Transition(28, 17, 0.001, 'upward ejection, left') )
    xn_list.append( Transition(28, 18, 0.01, 'upward ejection, right') )
    xn_list.append( Transition(11, 15, 0.001, 'demobilization (right wall)') )
    xn_list.append( Transition(13, 15, 0.001, 'demobilization (left wall)') )
    xn_list.append( Transition(29, 31, 100., 'demobilization (friction)') )
    xn_list.append( Transition(30, 31, 0.001, 'demobilization (friction)') )
    xn_list.append( Transition(1, 4, 0.001, 'leftward motion') )
    xn_list.append( Transition(8, 2, 40., 'rightward motion') )
    xn_list.append( Transition(20, 17, 0.001, 'upward motion') )
    xn_list.append( Transition(24, 18, 0.01, 'upward motion') )
    xn_list.append( Transition(18, 24, 100., 'downward motion') )
    xn_list.append( Transition(17, 20, 100., 'downward motion') )

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)

    return xn_list
github landlab / landlab / landlab / components / linkca / examples / weathering_ca.py View on Github external
==========      =============       =======     ====
    0 (0-0)         (none)              -           -
    1 (0-1)         3 (1-1)             weathering  1.0
    2 (1-0)         3 (1-1)             weathering  1.0
    3 (1-1)         (none)              -           -
    4 (0/0)         (none)              -           -
    5 (0/1)         7 (1/1)             weathering  1.0
    6 (1/0)         (none)              -           -
    7 (1/1)         7 (1/1)             weathering  1.0

    """
    xn_list = []

    xn_list.append( Transition(1, 3, 1., 'weathering') ) # rock-sap to sap-sap
    xn_list.append( Transition(2, 3, 1., 'weathering') ) # sap-rock to sap-sap
    xn_list.append( Transition(5, 3, 1., 'weathering') ) # rock/sap to sap/sap
    xn_list.append( Transition(6, 3, 1., 'weathering') ) # sap/rock to sap/sap

    if _DEBUG:
        print()
        print('setup_transition_list(): list has',len(xn_list),'transitions:')
        for t in xn_list:
            print('  From state',t.from_state,'to state',t.to_state,'at rate',t.rate,'called',t.name)

    return xn_list