diff --git a/README.md b/README.md index 12bda09..3af52e1 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,17 @@ Getting PyGeoStudio started requires Python and making GeoStudio recognized by P ## Examples -Examples are provided in the folder `example`. +Examples are provided in the folder `examples`. It contains: * Access the SEEP output of solved analysis and export it for processing with Paraview * Making plots with Matplotlib +* Calibrate some properties * Change geometry, and material and reinforcement properties * Run parametric study +For more details, see the "Examples" section in the [documentation](https://pygeostudio.readthedocs.io/en/stable/) + ## Contributing diff --git a/docs/source/conf.py b/docs/source/conf.py index db606ce..9f47a1a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,7 @@ project = 'PyGeoStudio' copyright = '2023, Moïse Rousseau' author = 'Moïse Rouseau' -release = '0.4.0' +release = '0.3.1' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/source/index.rst b/docs/source/index.rst index 18f95a8..7b8d620 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -31,7 +31,7 @@ Features * - Launch parametric study - OK * - Launch automatic calibration - - TODO + - See Examples * - Launch sensitivity analysis with true design of experiment - TODO * - Uncertainty analysis through bayesian framework diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 351a03e..6f5a297 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -16,7 +16,7 @@ PyGeoStudio interfaces the GeoStudio file un Python using the main Python class import PyGeoStudio as pgs src_file = "Reinforcement with Anchors.gsz" - geofile = pgs.GeoStudioFile(src_file,mode='r') + geofile = pgs.GeoStudioFile(src_file) The ``GeoStudioFile`` class then parse the study and create a copy in the computer memory that is accessible with Python (the ``geofile`` object in the code block above). Therefore, every change made through Python does not affect the input file but rather its representation in the memory. @@ -32,7 +32,7 @@ It contains numerous attribute, method and subclasses which handle each feature The figure below shows how to access the different feature of a study. .. figure:: class_overview.png - :scale: 60 % + :scale: 70 % Overview of accessing GeoStudio properties through PyGeoStudio @@ -55,8 +55,11 @@ Write back the modified study .. code-block:: python + # Overwrite study + geofile.save() + # Or save in a new file out_file = "./rapid_drawdown_changed_perm.gsz" - geofile.writeGeoStudioFile(out_file) + geofile.saveAs(out_file) Classes description (by alphabetical order) diff --git a/examples/calibrations/1D_unsaturated_column_VG_parameter.py b/examples/calibrations/1D_unsaturated_column_VG_parameter.py index ba663ef..a57f283 100644 --- a/examples/calibrations/1D_unsaturated_column_VG_parameter.py +++ b/examples/calibrations/1D_unsaturated_column_VG_parameter.py @@ -3,6 +3,11 @@ ============================ """ +# %% +# **This example is not yet working, as fitting Van Genuchten parameter is a complex task. +# In the present version of the file, we use a gradient descent-like algorithm, which is unsuccessful because the objective function may have multiple local optimum. +# Therefore, the next step is to use global algorithm such as differential evolution or simuated annealing** + import PyGeoStudio as pgs import numpy as np @@ -26,8 +31,7 @@ PWPdata += np.random.normal(0.,0.2,len(PWPdata)) #add some noise to measurement with std dev of 0.5 KPa # %% -# -#set the X data +# Set the X data N = 100 # number of data point psi = np.logspace(-1,4,N) #suction from 0.1 to 1000 KPa WCfunction.resizeXYData(N) diff --git a/examples/parametric/1D_drainage_multiple_load.py b/examples/parametric/1D_drainage_multiple_load.py deleted file mode 100644 index 68d338d..0000000 --- a/examples/parametric/1D_drainage_multiple_load.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Multiple load on 1D drainage problem -==================================== - -""" diff --git a/setup.py b/setup.py index c077542..5ba9a98 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='PyGeoStudio', - version='0.3.0', # Required + version='0.3.1', # Required description='Python library allowing reading/writing GeoStudio .gsz files', long_description=long_description, long_description_content_type='text/markdown',