def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--n-loads', type=int, default=16,
                        help='Number of loads to apply')
    parser.add_argument('--shape', type=int, default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing', type=int, default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs', type=int, default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot', action='store_true', default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = FlexureComponent(grid, method='flexure')

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=False,
                cmap='spectral', show=True) 
Ejemplo n.º 2
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = FlexureComponent(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=False,
                show=True) 
Ejemplo n.º 3
0
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = FlexureComponent(grid, method='flexure')

    add_load_to_middle_of_grid(grid, 1e9)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=True,
                show=True)
Ejemplo n.º 4
0
def main():
    (n_rows, n_cols) = (100, 100)
    (dy, dx) = (10e3, 10e3)

    grid = RasterModelGrid(n_rows, n_cols, dx)

    flex = FlexureComponent(grid, method='flexure')

    add_load_to_middle_of_grid(grid, 1e9)

    flex.update()

    grid.imshow('node', 'lithosphere__elevation', symmetric_cbar=True,
                show=True) 
Ejemplo n.º 5
0
def main():

    grid = RasterModelGrid(SHAPE[0], SHAPE[1], SPACING[0])

    create_lithosphere_elevation_with_bulge(grid)

    flex = FlexureComponent(grid, method='flexure')

    put_two_point_loads_on_grid(grid)

    flex.update()

    grid.imshow('node',
                'lithosphere__elevation',
                symmetric_cbar=False,
                show=True)
def main():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument('--n-loads',
                        type=int,
                        default=16,
                        help='Number of loads to apply')
    parser.add_argument('--shape',
                        type=int,
                        default=200,
                        help='Number rows and columns')
    parser.add_argument('--spacing',
                        type=int,
                        default=5e3,
                        help='Spading between rows and columns (m)')
    parser.add_argument('--n-procs',
                        type=int,
                        default=1,
                        help='Number of processors to use')
    parser.add_argument('--plot',
                        action='store_true',
                        default=False,
                        help='Plot an image of the total deflection')

    args = parser.parse_args()

    shape = (args.shape, args.shape)
    spacing = (args.spacing, args.spacing)

    load_locs = get_random_load_locations(shape, args.n_loads)
    load_sizes = get_random_load_magnitudes(args.n_loads)

    grid = RasterModelGrid(shape[0], shape[1], spacing[0])

    flex = FlexureComponent(grid, method='flexure')

    put_loads_on_grid(grid, load_locs, load_sizes)

    flex.update(n_procs=args.n_procs)

    if args.plot:
        grid.imshow('node',
                    'lithosphere__elevation',
                    symmetric_cbar=False,
                    cmap='spectral',
                    show=True)
Ejemplo n.º 7
0
(n_rows, n_cols) = (200, 400)
(dy, dx) = (10e3, 10e3)


# In[3]:

from landlab import RasterModelGrid
grid = RasterModelGrid((n_rows, n_cols), dx)


# Now we create the flexure component and tell it to use our newly-created grid.

# In[4]:

from landlab.components.flexure import FlexureComponent
flex = FlexureComponent(grid, method='flexure')


# ## Add some loading
# We will add some loading at the center of the grid. For this component, the name of the variable that hold the applied loads is call, `lithosphere__overlying_pressure`. We add loads of random magnitude at every node of the grid.

# In[5]:

loads = np.random.normal(1e9, 1e12, grid.number_of_nodes)
grid.at_node['lithosphere__overlying_pressure'][:] = loads


# In[6]:

grid.imshow('node', 'lithosphere__overlying_pressure', symmetric_cbar=True,
            cmap='spectral', show=True, shrink=.75)