Model:GFlex: Difference between revisions

From CSDMS
(→‎History: plans)
m (Text replacement - "{{End headertab}}" to "{{End headertab}} {{{{PAGENAME}}_autokeywords}}")
 
(86 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Model identity
|Model type=Single
}}
{{Start models incorporated}}
{{End a table}}
{{Model identity2
|ModelDomain=Geodynamic
|Spatial dimensions=1D, 2D
|Spatialscale=Continental, Regional-Scale, Landscape-Scale, Watershed-Scale
|One-line model description=Multiple solution methods for isostasy and lithospheric flexure
|Extended model description=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'.
}}
{{Start model keyword table}}
{{Model keywords
|Model keywords=lithospheric flexure
}}
{{End a table}}
{{Modeler information
{{Modeler information
|First name=Andy
|First name=Andy
|Last name=Wickert
|Last name=Wickert
|Type of contact=Model developer
|Type of contact=Model developer
|Institute / Organization=University of Colorado
|Institute / Organization=Universität Potsdam
|Postal address 1=Department of Geological Sciences, UCB 399
|Postal address 1=Institut für Erd- und Umweltwissenschaften
|Postal address 2=2200 Colorado Ave
|Postal address 2=Karl-Liebknecht-Str. 24-25
|Town / City=Boulder
|Town / City=Potsdam-Golm
|Postal code=80309
|Postal code=14476
|State=Colorado
|Country=Germany
|Country=US
|Email address=andrew.wickert@uni-potsdam.de
|Email address=wickert@colorado.edu
}}
{{Model identity
|Categories=Coastal, Marine, Terrestrial
|Spatial dimensions=2D
|Spatialscale=Continental, Regional-Scale, Landscape-Scale
|One-line model description=Direct 2D finite difference solution of lithospheric plate flexure
|Extended model description=Finite difference solution allows for calculations of flexural response in regions of variable elastic thickness / flexural rigidity. The direct solution technique means that it takes time to populate a cofactor matrix, but that once this has been done, flexural solutions may be obtained rapidly via a Thomas algorithm. This makes it less good for an individual solution where an iterative approach may be more computationally efficient, but better for modeling where elastic thickness does not change (meaning that you do not need to create a new cofactor matrix) but loads do.
}}
}}
{{Model technical information
{{Model technical information
|Supported platforms=Unix, Linux
|Supported platforms=Unix, Linux, Mac OS, Windows
|Programming language=Python
|Programming language=Python
|Code optimized=Single Processor
|Code optimized=Single Processor
|Start year development=2010
|Start year development=2010
|Does model development still take place?=Yes
|Does model development still take place?=Yes
|Model availability=As code, As teaching tool
|DevelopmentCode=Only maintenance
|Source code availability=Through owner, Through CSDMS repository
|DevelopmentCodeYearChecked=2020
|Source code availability=Through web repository, Through CSDMS repository
|Source web address=https://github.com/awickert/gFlex
|Program license type=GPL v3
|Program license type=GPL v3
|OpenMI compliant=No but possible
|Typical run time=sub-second to a few minutes
|CCA component=No but planned
|IRF interface=No but planned
|Typical run time=Minutes to populate cofactor matrix, ~1 second for solution
}}
}}
{{Input - Output description
{{Input - Output description
Line 53: Line 64:
}}
}}
{{Process description model
{{Process description model
|Describe processes represented by the model=Response of a lithospheric plate, potentially with nonuniform elastic thickness, to an applied surface load
|Describe processes represented by the model=Response of a lithospheric plate of nonuniform elastic thickness to an applied surface load
|Describe key physical parameters and equations=We solve the PDE for lithospheric flexure in 2 dimensions:
|Describe key physical parameters and equations=See:[[#Key physical parameters and equations]]
 
|Describe length scale and resolution constraints=Analytical solution produces unrealistic results with low elastic thickness and/or very large cells due to the Green's function approximation.
<math> \nabla^2\left(D(x,y)\nabla^2 w \right) + \Delta \rho g w = q(x,y) </math>
 
Here, $D$ is the flexural rigidity, $w$ is the vertical displacement at each $(x,y)$, $\Delta \rho$ is the mantle density minus the density of infilling material, $g$ is gravitational acceleration, and $q$ is the applied load. We follow Wees and Cloetingh (1994) in acknowledging that flexural rigidity is a tensor property:
 
<math>
D = \frac{E T_e^3}{12\left(1-\nu^2\right)}
\left[ \begin{array}{ccc}
1 & \nu & 0 \\
\nu & 1 & 0 \\
0 & 0 & \frac{1-\nu}{2} \end{array} \right]
</math>
|Describe length scale and resolution constraints=Insufficiently tested to know.
|Describe time scale and resolution constraints=Currently does not time-evolve. I would like to couple this to a 3D viscoelastic mantle at some point, but this hasn't happened yet.
|Describe time scale and resolution constraints=Currently does not time-evolve. I would like to couple this to a 3D viscoelastic mantle at some point, but this hasn't happened yet.
|Describe any numerical limitations and issues=Insufficiently tested to know.
|Describe any numerical limitations and issues=Analytical solution produces unrealistic results with low elastic thickness and/or very large cells due to the Green's function approximation.
}}
}}
{{Model testing}}
{{Model testing}}
{{Users groups model}}
{{Users groups model}}
{{Documentation model
{{Documentation model
|Manual model available=No
|Manual model available=Yes
|Model website if any=https://landlab.github.io
|Model forum=https://github.com/landlab/landlab/issues
}}
}}
{{Additional comments model}}
{{Additional comments model}}
{{CSDMS staff part
|OpenMI compliant=No but possible
|IRF interface=Yes
|CMT component=In progress
|CCA component=No but planned
}}
{{DOI information
|DOI model=10.1594/IEDA/100123
|DOI assigned to model version=0.6
|DOI-year assigned to model version=2012
}}
{{Start coupled table}}
{{End a table}}
{{End headertab}}
{{{{PAGENAME}}_autokeywords}}
<!-- PLEASE USE THE "EDIT WITH FORM" BUTTON TO EDIT ABOVE CONTENTS; CONTINUE TO EDIT BELOW THIS LINE -->
<!-- PLEASE USE THE "EDIT WITH FORM" BUTTON TO EDIT ABOVE CONTENTS; CONTINUE TO EDIT BELOW THIS LINE -->
==Introduction==
==Introduction==


The model '''flexure''' computes a direct Thomas algorithm finite difference solution to the flexure equations for a lithospheric plate of nonuniform elastic thickness via a thin plate assumption. It consists of two modules, the first of which is used to generate the coefficient matrix for the Thomas algorithm solution and the second of which actually generates that solution (using the coefficient matrix produced by the first module as an input file). The first module is slow, but the second is very fast, making this a poor technique for a one-off equilibrium flexure calculation, but a good choice for situations in which flexural response needs to be calculated many times in a row. Such situations in which this model would excel include:
The model '''gFlex''' implements multiple (user-selectable) solution methods to solve for flexure and isostasy due to surface loading in both one (line loads) and two (point loads) dimensions. It works for elastic lithospheric plates of both constant and spatially variable elastic thickness and allows the user to select the solution method.
* Numerical models that require frequent updating of flexural deformations of the lithosphere
 
* Simulations with forcings that take place on a time-scale that is comparable to the time-scale of Earth response to loading and unloading (e.g., ice and water loading during glacial cycles)
This page contains some information on gFlex, but its main documentation is in the '''README.md''' file, displayed at the gFlex GitHub repository at https://github.com/umn-earth-surface/gFlex.
* Calculations of mixed sediment and/or water loading, or water loading with onlap and offlap, such that a constant fill density cannot be assumed and solutions must be produced iteratively.
 
==Solution methods==
 
===Analytical===
 
An analytical approach to solving the flexure equations is computed by the superimposition of analytical solutions for flexure with a constant elastic thickness. Current implementations perform this superposition in the spatial domain. This works both on uniform grids and arbitrary meshes.
 
The good:
* The analytical solution method for an arbitrary mesh is useful for coupling Flexure with finite element models such as [[Model:CHILD|CHILD]] without requiring any regridding.
 
The bad:
* Analytical solutions by superposition are an N<sup>2</sup> problem, making this method become increasingly problematic for larger grids and numbers of nodes.
*Analytical solutions are computed based on sets of point loads at nodes or centers of cells, so they will fail and show too much isostatic response if the cells become larger than a modest fraction of a flexural wavelength; this is because at too large of a grid size, the approximation of summing immediately adjacent loads breaks down.
* Analytical solutions work only with approximations of constant elastic thickness.
 
Analytical solutions using spectral techniques are not yet implemented.
 
===Numerical===
 
For the numerical implementation, gFlex computes a finite difference solution to the flexure equations for a lithospheric plate of nonuniform (or uniform, if one so desires) elastic thickness via a thin plate assumption. It uses the UMFPACK direct solvers to compute the solutions via a lower-upper decomposition of a coefficient matrix. The coefficient matrix in the 1D case is a pentadiagonal sparse matrix that is trivial to generate. In the 2D case, 2D grid is reordered into a 1D vector. UMFPACK solution routines are then able to copmute solutions to flexure in around a second or less, though sometimes up to a minute for very large grids. Iterative solution methods may also be used, but are not tested.
 
Some advantages of using a numerical (rather than analytical) solution are that:
* This method permits spatial variability in lithospheric elastic thickness. This allows the use of real maps of elastic thickness in models or synthetic maps of elastic thickness variability to test hypotheses.
* This rapid solution once the coefficient matrix is built makes this method a good choice for numerical models that require frequent updating of flexural deformations of the lithosphere.
* The rapid solution technique likewise allows efficient calculations of mixed sediment and/or water loading, or water loading with onlap and offlap, such that a constant fill density cannot be assumed and solutions must be produced iteratively.
* This model will not break down when grid cell sizes are increased greatly, as will happen for superposition of analytical solutions if the grid cells become too large relative to a flexural wavelength for the point load assumption to hold true.
 
== Key physical parameters and equations ==
The largest component of gFlex is a solution to the PDE for lithospheric flexure in 2 dimensions. Our finite difference solutiosn follow van Wees and Cloetingh (1994):
 
<math> \frac{\partial^2}{\partial{x_i^2}} \left( D(x,y) \frac{\partial^2 w}{\partial{x_i^2}} \right) + \Delta \rho g w = q(x,y) </math>


== History ==
== History ==


'''Flexure''' was developed first in MATLAB (Spring / early Summer 2010) and then in python (translated October 2010).
* '''Flexure''' was developed first in MATLAB (Spring / early Summer 2010) and then in Python with Numpy, Scipy, and Matplotlib (translated October 2010).
 
* As of October 2011, Flexure became IRF- and CMT-compliant, and it was coupled to the landscape evolution model [[Model:CHILD|CHILD]] for the [[CSDMS meeting 2011|Fall 2011 CSDMS meeting]]. (Abstract and presentation are [[CSDMS 2011 annual meeting Andrew Wickert|here]], though I haven't dared to watch myself.)


The next planned step in development is to make '''flexure''' be IRF- and CMT-compliant.
* Current work is being done to improve boundary condition handling and the speed of finite difference solutions to constant elastic thickness problems (Early 2012).


Planned development will proceed slowly through Spring 2011 (though this will go faster if I get a solid day or two to work on it). Because the program is based on a set of functions in a python module, we plan on adding additional functionality for 1D and 2D analytical solutions, a 1D Thomas algorithm solution, and a 2D alternating direction implicit (ADI) iterative solution. If all goes as planned, this should be a one-stop shop for flexure solutions.
* The project was revived in fall 2014m renamed '''gFlex''', and brought to completion in late winter 2015.


== Papers ==
== References  ==
<br>{{AddReferenceUploadButtons}}<br><br>
{{#ifexist:Template:{{PAGENAME}}-citation-indices|{{{{PAGENAME}}-citation-indices}}|}}<br>
{{Include_featured_references_models_cargo}}<br>


== Issues ==
== Issues ==


== Help ==
==Instructions==
 
=== Version 0.9 (development) and higher ===
 
Instructions for the current version of gFlex are available from the README.md file at:
https://github.com/umn-earth-surface/gFlex
 
=== Version 0.1 ===
(Modified from instructional emails)
 
This is the old version of Flexure".
 
;Prerequisites
You need to have python, numpy, scipy, and matplotlib installed to use flexure.
 
;Structure
The version 0.1 structure (prone to change) consists of two main files.
* ''flexcalc.py'' is a python module which contains all of the functions needed to execute '''flexure'''.
* ''flexit.py'' is the frontend that, via optparse, gives you the ability to specify inputs and outputs and run flexural solutions via an interactive command-line interface.
 
In addition to these files, version 0.1 comes with some basic test loads and elastic thickness maps.
 
;Trial run
For the basic functionality on the first runthrough, you navigate to the directory with the ''flexit.py'' and type something in like:
 
python flexit.py -vcrp --dx=20000 --Te=Te_sample/bigrange_Te_test.txt --q0=q0_sample/top_bottom_bars.txt
 
You select which of the sample Te and q0 files you want. Andy_output.png is the flexural response (variable=''w'') output from:
 
python flexit.py -vcrp --dx=20000 --Te=Te_sample/bigrange_Te_test.txt --q0=q0_EW_bar.txt
 
The flags are explained in the help file (python flexit.py -h), as are other options for running the code. Basically you will want to run "-c" the first time, but not again unless you are going to redo the coefficient matrix (i.e., use a different pattern of elastic thickness). This calculation can take a long time for large grids, so you will want to store these files. When running without making a coefficient matrix, unless you're using the default coefficient matrix name (as we do above), you will have to specify its location with "--coeff-file=NAME". For example:


== Input Files ==
python flexit.py -vrp --Te=Te_sample/bigrange_Te_test.txt --q0=q0_sample/top_bottom_bars.txt --coeff_file=coeffs.txt
 
===If all else fails===


== Output Files ==
Have you typed:
python flexit.py -h
? This gives you all of the in-program help information.


== Download ==
Feel free to email Andy Wickert for anything related to this model (see contact info in box at top).
{{Download Model|flexure}}


== Source ==
== Input Files ==
=== Command-Line Access ===


If you plan to make changes, use this command to check out the code as yourself using HTTPS:
The coefficient matrix for the 2D finite difference solution with variable elastic thickness requires a map of elastic thicknesses in *.txt / ASCII format. This elastic thickness map must be two cells wider on each side than the map of loads; this is because the finite difference solution must "look" two cells in every direction. It also requires the specification of several parameters, including:
* Young's modulus (defaults to 10<sup>11</sup> Pa)
* Poisson's ratio (defaults to 0.25)
* Mantle density (defaults to 3300 kg/m<sup>3</sup>)
* Density of infilling material (defaults to 0 kg/m<sup>3</sup>)
This outputs an ASCII sparse matrix file (Matrix Market *.mtx format).


<syntaxhighlight lang=bash>
The flexural solution requires the ASCII file for the sparse coefficient matrix generated above and an imposed array of loads (also ASCII), along with the specification of input and output file names.
# Project members authenticate over HTTPS to allow committing changes.
svn checkout https://csdms.colorado.edu/svn/flexure
</syntaxhighlight>


When prompted, enter your CSDMS Subversion password.<br>
== Output Files ==
Non-members may only check out a read-only working copy of the project source.<br>
To obtain a CSDMS Subversion account or to become a member of this project, please email [mailto:csdms@colorado.edu csdms@colorado.edu].<br>
Need help with Subversion? Go to the [[SVN|subversion help page]].


=== GUI and IDE Access ===
The coefficient matrix creator writes a *.mtx sparse matrix ASCII file that is used in the direct solution. This matrix is characteristic to a given pattern of elastic thickness, and therefore can be reused if elastic thickness does not change.


This project's Subversion repository may be accessed using many different client programs and plug-ins. See your client's documentation for more information.
The real solver outputs an ASCII grid of deflections due to the load. This is the output that is of scientific interest and/or useful to plug into other modules (e.g., for flexural subsidence).

Latest revision as of 20:17, 16 September 2020



GFlex


Metadata

Also known as
Model type Single
Model part of larger framework
Note on status model
Date note status model
Incorporated models or components:
Spatial dimensions 1D, 2D
Spatial extent Continental, Regional-Scale, Landscape-Scale, Watershed-Scale
Model domain Geodynamic
One-line model description Multiple solution methods for isostasy and lithospheric flexure
Extended model description 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'.

Keywords:

lithospheric flexure,

Name Andy Wickert
Type of contact Model developer
Institute / Organization Universität Potsdam
Postal address 1 Institut für Erd- und Umweltwissenschaften
Postal address 2 Karl-Liebknecht-Str. 24-25
Town / City Potsdam-Golm
Postal code 14476
State
Country Germany
Email address andrew.wickert@uni-potsdam.de
Phone
Fax


Supported platforms
Unix, Linux, Mac OS, Windows
Other platform
Programming language

Python

Other program language
Code optimized Single Processor
Multiple processors implemented
Nr of distributed processors
Nr of shared processors
Start year development 2010
Does model development still take place? Yes
If above answer is no, provide end year model development
Code development status Only maintenance
When did you indicate the 'code development status'? 2020
Model availability
Source code availability
(Or provide future intension)
Through web repository, Through CSDMS repository
Source web address https://github.com/awickert/gFlex
Source csdms web address
Program license type GPL v3
Program license type other
Memory requirements
Typical run time sub-second to a few minutes


Describe input parameters
  • Elastic thickness map (ASCII)
  • Load map (ASCII)
  • dx, dy
  • Material properties
    • Young's modulus
    • Poisson's ratio
    • density of load
    • density of infilling material (optional; this can also be done via iteration for more complicated situations

Only the elastic thickness and load need to be actual input files. The rest (scalars) can be specified at the command line interface.

Input format ASCII
Other input format
Describe output parameters Cofactor matrix (*.mtx sparse matrix file; ASCII)

Flexural response map (ASCII)

Output format ASCII
Other output format
Pre-processing software needed? No
Describe pre-processing software
Post-processing software needed? No
Describe post-processing software
Visualization software needed? No
If above answer is yes
Other visualization software


Describe processes represented by the model Response of a lithospheric plate of nonuniform elastic thickness to an applied surface load
Describe key physical parameters and equations [[Describe key physical parameters::See:#Key physical parameters and equations]]
Describe length scale and resolution constraints Analytical solution produces unrealistic results with low elastic thickness and/or very large cells due to the Green's function approximation.
Describe time scale and resolution constraints Currently does not time-evolve. I would like to couple this to a 3D viscoelastic mantle at some point, but this hasn't happened yet.
Describe any numerical limitations and issues Analytical solution produces unrealistic results with low elastic thickness and/or very large cells due to the Green's function approximation.


Describe available calibration data sets
Upload calibration data sets if available:
Describe available test data sets
Upload test data sets if available:
Describe ideal data for testing


Do you have current or future plans for collaborating with other researchers?
Is there a manual available? Yes
Upload manual if available:
Model website if any https://landlab.github.io
Model forum / discussion board https://github.com/landlab/landlab/issues
Comments


This part will be filled out by CSDMS staff

OpenMI compliant No but possible
BMI compliant Yes
WMT component In progress
PyMT component
Is this a data component
DOI model 10.1594/IEDA/100123
For model version 0.6
Year version submitted 2012
Link to file
Can be coupled with:
Model info

  • Download GFlex [ version: 0.6]
    Doi: 10.1594/IEDA/100123
Nr. of publications: 2
Total citations: 34
h-index: 1
m-quotient: 0.08
Qrcode GFlex.png
Link to this page




Introduction

The model gFlex implements multiple (user-selectable) solution methods to solve for flexure and isostasy due to surface loading in both one (line loads) and two (point loads) dimensions. It works for elastic lithospheric plates of both constant and spatially variable elastic thickness and allows the user to select the solution method.

This page contains some information on gFlex, but its main documentation is in the README.md file, displayed at the gFlex GitHub repository at https://github.com/umn-earth-surface/gFlex.

Solution methods

Analytical

An analytical approach to solving the flexure equations is computed by the superimposition of analytical solutions for flexure with a constant elastic thickness. Current implementations perform this superposition in the spatial domain. This works both on uniform grids and arbitrary meshes.

The good:

  • The analytical solution method for an arbitrary mesh is useful for coupling Flexure with finite element models such as CHILD without requiring any regridding.

The bad:

  • Analytical solutions by superposition are an N2 problem, making this method become increasingly problematic for larger grids and numbers of nodes.
  • Analytical solutions are computed based on sets of point loads at nodes or centers of cells, so they will fail and show too much isostatic response if the cells become larger than a modest fraction of a flexural wavelength; this is because at too large of a grid size, the approximation of summing immediately adjacent loads breaks down.
  • Analytical solutions work only with approximations of constant elastic thickness.

Analytical solutions using spectral techniques are not yet implemented.

Numerical

For the numerical implementation, gFlex computes a finite difference solution to the flexure equations for a lithospheric plate of nonuniform (or uniform, if one so desires) elastic thickness via a thin plate assumption. It uses the UMFPACK direct solvers to compute the solutions via a lower-upper decomposition of a coefficient matrix. The coefficient matrix in the 1D case is a pentadiagonal sparse matrix that is trivial to generate. In the 2D case, 2D grid is reordered into a 1D vector. UMFPACK solution routines are then able to copmute solutions to flexure in around a second or less, though sometimes up to a minute for very large grids. Iterative solution methods may also be used, but are not tested.

Some advantages of using a numerical (rather than analytical) solution are that:

  • This method permits spatial variability in lithospheric elastic thickness. This allows the use of real maps of elastic thickness in models or synthetic maps of elastic thickness variability to test hypotheses.
  • This rapid solution once the coefficient matrix is built makes this method a good choice for numerical models that require frequent updating of flexural deformations of the lithosphere.
  • The rapid solution technique likewise allows efficient calculations of mixed sediment and/or water loading, or water loading with onlap and offlap, such that a constant fill density cannot be assumed and solutions must be produced iteratively.
  • This model will not break down when grid cell sizes are increased greatly, as will happen for superposition of analytical solutions if the grid cells become too large relative to a flexural wavelength for the point load assumption to hold true.

Key physical parameters and equations

The largest component of gFlex is a solution to the PDE for lithospheric flexure in 2 dimensions. Our finite difference solutiosn follow van Wees and Cloetingh (1994):

[math]\displaystyle{ \frac{\partial^2}{\partial{x_i^2}} \left( D(x,y) \frac{\partial^2 w}{\partial{x_i^2}} \right) + \Delta \rho g w = q(x,y) }[/math]

History

  • Flexure was developed first in MATLAB (Spring / early Summer 2010) and then in Python with Numpy, Scipy, and Matplotlib (translated October 2010).
  • As of October 2011, Flexure became IRF- and CMT-compliant, and it was coupled to the landscape evolution model CHILD for the Fall 2011 CSDMS meeting. (Abstract and presentation are here, though I haven't dared to watch myself.)
  • Current work is being done to improve boundary condition handling and the speed of finite difference solutions to constant elastic thickness problems (Early 2012).
  • The project was revived in fall 2014m renamed gFlex, and brought to completion in late winter 2015.

References




Nr. of publications: 2
Total citations: 34
h-index: 1
m-quotient: 0.08



Featured publication(s)YearModel describedType of ReferenceCitations
Wickert, A.D.; 2012. GFlex, version 0.6.. , , . 10.1594/IEDA/100123
(View/edit entry)
2012 GFlex

Source code ref.

0
Wickert, A. D.; 2016. Open-source modular solutions for flexural isostasy: gFlex v1.0. Geoscientific Model Development, 9, 997–1017. 10.5194/gmd-9-997-2016
(View/edit entry)
2016 GFlex
Landlab

Model overview

34
See more publications of GFlex


Issues

Instructions

Version 0.9 (development) and higher

Instructions for the current version of gFlex are available from the README.md file at: https://github.com/umn-earth-surface/gFlex

Version 0.1

(Modified from instructional emails)

This is the old version of Flexure".

Prerequisites

You need to have python, numpy, scipy, and matplotlib installed to use flexure.

Structure

The version 0.1 structure (prone to change) consists of two main files.

  • flexcalc.py is a python module which contains all of the functions needed to execute flexure.
  • flexit.py is the frontend that, via optparse, gives you the ability to specify inputs and outputs and run flexural solutions via an interactive command-line interface.

In addition to these files, version 0.1 comes with some basic test loads and elastic thickness maps.

Trial run

For the basic functionality on the first runthrough, you navigate to the directory with the flexit.py and type something in like:

python flexit.py -vcrp --dx=20000 --Te=Te_sample/bigrange_Te_test.txt --q0=q0_sample/top_bottom_bars.txt

You select which of the sample Te and q0 files you want. Andy_output.png is the flexural response (variable=w) output from:

python flexit.py -vcrp --dx=20000 --Te=Te_sample/bigrange_Te_test.txt --q0=q0_EW_bar.txt

The flags are explained in the help file (python flexit.py -h), as are other options for running the code. Basically you will want to run "-c" the first time, but not again unless you are going to redo the coefficient matrix (i.e., use a different pattern of elastic thickness). This calculation can take a long time for large grids, so you will want to store these files. When running without making a coefficient matrix, unless you're using the default coefficient matrix name (as we do above), you will have to specify its location with "--coeff-file=NAME". For example:

python flexit.py -vrp --Te=Te_sample/bigrange_Te_test.txt --q0=q0_sample/top_bottom_bars.txt --coeff_file=coeffs.txt

If all else fails

Have you typed:

python flexit.py -h

? This gives you all of the in-program help information.

Feel free to email Andy Wickert for anything related to this model (see contact info in box at top).

Input Files

The coefficient matrix for the 2D finite difference solution with variable elastic thickness requires a map of elastic thicknesses in *.txt / ASCII format. This elastic thickness map must be two cells wider on each side than the map of loads; this is because the finite difference solution must "look" two cells in every direction. It also requires the specification of several parameters, including:

  • Young's modulus (defaults to 1011 Pa)
  • Poisson's ratio (defaults to 0.25)
  • Mantle density (defaults to 3300 kg/m3)
  • Density of infilling material (defaults to 0 kg/m3)

This outputs an ASCII sparse matrix file (Matrix Market *.mtx format).

The flexural solution requires the ASCII file for the sparse coefficient matrix generated above and an imposed array of loads (also ASCII), along with the specification of input and output file names.

Output Files

The coefficient matrix creator writes a *.mtx sparse matrix ASCII file that is used in the direct solution. This matrix is characteristic to a given pattern of elastic thickness, and therefore can be reused if elastic thickness does not change.

The real solver outputs an ASCII grid of deflections due to the load. This is the output that is of scientific interest and/or useful to plug into other modules (e.g., for flexural subsidence).