Package: eccw
Exact Critical Coulomb WedgeECCWallows to compute the exact solution of any parameter of critical Coulomb wedge (as Dahlen 1984 and Yuan et al. 2015). It allows to draw any of these solutions in the β vs α domain (basal slope against surface slope). Are availables compressive or extensive geological context and fluid pore pressure.ECCWis under GNU GPL-v3 license.General informationsECCWis apython3library.A graphical user interface (GUI), written inpython3and usingQtis also available under the nameECCW-GUI.InstallationWindowsNoteOnly tested onWindows 7.Install python3 verson ofminicondapython environment fromhttps://conda.io/miniconda.htmlrun downloaded .exe;atAdvanced Optionsstep, tick checkbox namedAdd Anaconda to my PATH environment variable.Launch the windowsCommand Prompt:typecondato check thatcondais correctly installed;typepipto check thatpipis also correctly installed.InstallECCWwith the following command in theCommand Prompt:$ pip install eccwECCWis then available from theCommand Promptby tapingeccwor simply from the mainWindowsmenu under the nameeccw.LinuxNoteOnly tested onDebian 9 (Gnome)andUbuntu 16.04 (Unity).Installation using pipInstallpipandtkforPython3.
OnDebianfamily distributions, you can install these packages using the following command:$ sudo apt-get install python3-pip python3-tkInstallECCWwith the following command:$ pip3 install eccwECCWis then available from a terminal by tapingeccwInstallation fromsourcesInstall the folowing dependancies for python3:tkpyqt5numpymatplotlibxmltodictOnDebianfamily distributions, you can install these packages using the following command:$ sudo apt-get install python3-tk python3-pyqt5 python3-numpy python3-matplotlib python3-xmltodictUsing a terminal with current working directory setted onECCWsources folder, you can installECCWwith the following command:$ python3 setup.py installECCWis then available from a Terminal by tapingeccwNoteYou can also launchECCWwithout installation (but with dependancies installed) if you add the path to theECCWsources folder to the environment variable$PYTHONPATH:$ export PYTHONPATH=${PYTHONPATH}:path/to/eccw/sources/This command can be added to your.bashrcfile (hidden file located at the root of your home).
Once the PYTHONPATH is seted, you can launchECCWby runningeccw/main.pyfile in the sources folder.UsageThe following describe usage ofECCWclass objects, callable from a python3 shell.EccwComputeThis the core object that compute the solutions of theCCWproblem.>>> from eccw import EccwCompute
>>> foo = EccwCompute(phiB=30, phiD=10, beta=0)
>>> foo.show_params()
{ context       : 'Compression'
  beta          : 0.0
  alpha         : nan
  phiB          : 30.0
  phiD          : 10.0
  rho_f         : 0.0
  rho_sr        : 0.0
  delta_lambdaB : 0.0
  delta_lambdaD : 0.0
}
>>> foo.compute("alpha")
((3.4365319302835018,), (23.946319406533199,))The result obtained with thecomputemethod is always a tuple of two tuples.
The first tuple contains results ininversefault mechanism, while the second tuple contains results innormalfault mechanism.
These tuples can each contain 0, 1 or 2 values, with a total always equal to 0 or 2.
Here some more examples with computation of betaparameter::>>> foo.alpha = 3.436532
>>> foo.compute("beta")
((-1.0516746372768912e-07,), (69.6779628783264,))
>>> foo.alpha = 20
>>> foo.compute("beta")
((), (-3.580929608343892, 43.25889259183777))
>>> foo.alpha = -20
>>> foo.compute("beta")
((36.74110740816224, 83.58092960834391), ())
>>> foo.alpha = -35
>>> foo.compute("beta")
((), ())Have a look on the plot obtained in next section to understand these results.EccwPlotThis the core object that plot the solutions of theCCWproblem. This object inherits fromEccwCompute.>>> from eccw import EccwPlot
>>> foo = EccwPlot(phiB=30, phiD=10)
>>> foo.add_curve(inverse={'color':(1,0,0,1), 'label':'inverse'},
                  normal={'color':(0,0,1,1), 'label':'normal'})
>>> foo.add_point(alpha=3.436532)
>>> foo.add_point(alpha=20, style='*', size=10)
>>> foo.add_point(alpha=-20, style='s')
>>> foo.add_legend()
>>> foo.show()