This is a Landlab wrapper for A Wickert’s gFlex flexure model (Wickert et al., submitted to Geoscientific Model Development). The most up-to-date version of his code can be found at github.com/awickert/gFlex.
This Landlab wrapper will use a snapshot of that code, which YOU need to install on your own machine. A stable snapshot of gFlex is hosted on PyPI, which is the recommended version to install. If you have pip (the Python package install tool), simply run ‘pip install gFlex’ from a command prompt. Alternatively, you can download and unpack the code (from github, or with PyPI, pypi.python.org/pypi/gFlex/), then run ‘python setup.py install’.
Created on Thu Feb 19 18:47:11 2015
@author: daniel.hobley (SiccarPoint @Github)
…following AW’s run_in_script_2D.py.
gFlex
(grid, Youngs_modulus=650000000000.0, Poissons_ratio=0.25, rho_mantle=3300.0, rho_fill=0.0, elastic_thickness=35000.0, BC_W='0Displacement0Slope', BC_E='0Displacement0Slope', BC_N='0Displacement0Slope', BC_S='0Displacement0Slope', g=9.81, **kwds)[source]¶Bases: landlab.core.model_component.Component
This is a Landlab wrapper for A Wickert’s gFlex flexure model (Wickert et al., 2016, Geoscientific Model Development). The most up-to-date version of his code can be found at github.com/awickert/gFlex.
This Landlab wrapper will use a snapshot of that code, which YOU need to install on your own machine. A stable snapshot of gFlex is hosted on PyPI, which is the recommended version to install. If you have pip (the Python package install tool), simply run ‘pip install gFlex’ from a command prompt. Alternatively, you can download and unpack the code (from github, or with PyPI, pypi.python.org/pypi/gFlex/), then run ‘python setup.py install’.
Note that gFlex maintains its own internal version if the grid, but this should not affect performance.
This component will modify the topographic__elevation field only if one already exists. Note that the gFlex component demands lengths in meters, including the grid dimensions.
Parameters: | Youngs_modulus : float
Poissons_ratio : float
rho_mantle : float (kg*m**-3)
rho_fill : float (kg*m**-3)
elastic_thickness : float (m)
BC_W, BC_E, BC_N, BC_S : {‘0Displacement0Slope’, ‘0Moment0Shear’,
g : float (m*s**-2)
The component also recognises the gFlex specific parameters ‘Method’, ‘PlateSolutionType’, ‘Solver’, and ‘Quiet’. See the gFlex software documentation for more details. |
---|
Examples
NB: these tests are not actually run as our automated testing becomes confused if gFlex is not installed on the testing machine!
>>> from landlab import RasterModelGrid
>>> from landlab.components import gFlex
>>> mg = RasterModelGrid((10, 10), 25000.)
>>> z = mg.add_zeros('topographic__elevation', at='node', dtype=float)
>>> stress = mg.add_zeros('surface_load__stress', at='node', dtype=float)
>>> stress.view().reshape(mg.shape)[3:7, 3:7] += 1.e6
>>> gf = gFlex(mg, BC_E='0Moment0Shear', BC_N='Periodic',
... BC_S='Periodic')
>>> gf.run_one_step()
N-S profile across flexed plate:
>>> z.reshape(mg.shape)[:, 5]
array([-4.54872677, -4.6484927 , -4.82638669, -5.03001546, -5.15351385,
-5.15351385, -5.03001546, -4.82638669, -4.6484927 , -4.54872677])
W-E profile, noting the free BC to the east side:
>>> z.reshape(mg.shape)[5, :]
array([-0.43536739, -1.19197738, -2.164915 , -3.2388464 , -4.2607558 ,
-5.15351385, -5.89373366, -6.50676947, -7.07880156, -7.63302576])
Constructor for Wickert’s gFlex in Landlab.