Coder Social home page Coder Social logo

moiserousseau / pygeostudio Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 2.0 11.68 MB

Python library allowing reading/writing GeoStudio .gsz file

Home Page: https://pygeostudio.readthedocs.io

Python 100.00%
geotechnical-engineering geotechnics hydrogeology optimization

pygeostudio's People

Contributors

moiserousseau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pygeostudio's Issues

Export to Paraview

I am trying to open a gsz file using PyGeoStudio:

import PyGeoStudio as pgs
src_file = "./Final-selected/Flowmodel_2023-04-27_V02/Model98.gsz" #specify the geostudio analyses file
geofile = pgs.GeoStudioFile(src_file) #open it with PyGeoStudio
geofile.showAnalysisTree()
analysis = geofile.getAnalysisByID(3)
analysis["Geometry"]["Mesh"].export("mesh.vtk")
analysis["Results"].exportAllResultsVTU("results.vtu")

I get the following error:

Traceback (most recent call last):
  File "/home/bmjl/Development/infravis_dam_project/seapage-data-240207/convert_to_paraview.py", line 11, in <module>
    analysis["Results"].exportAllResultsVTU("results.vtu")
  File "/home/bmjl/.conda/envs/damviz/lib/python3.10/site-packages/PyGeoStudio/Results.py", line 137, in exportAllResultsVTU
    out_mesh = meshio.Mesh(points=points, cells=cells, point_data=point_data)
  File "/home/bmjl/.conda/envs/damviz/lib/python3.10/site-packages/meshio/_mesh.py", line 166, in __init__
    raise ValueError(
ValueError: len(points) = 4298, but len(point_data["Node"]) = 4297

Am I missing something?

package import failure

High there,

I've successfully installed PyGeoStudio via pip, but run into an error when I try to load it in a Jupyter Notebook.

I get the following error below. Any help would be greatly appreciated!

Traceback (most recent call last):

File c:\Users\XXXXX\anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3369 in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

Input In [6] in <cell line: 1>
import PyGeoStudio as pgs

File c:\Users\XXXXX\anaconda3\lib\site-packages\PyGeoStudio_init_.py:1 in
from .PyGeoStudio import GeoStudioFile

File c:\Users\XXXXX\anaconda3\lib\site-packages\PyGeoStudio\PyGeoStudio.py:72
match item:
^
SyntaxError: invalid syntax

ERROR: No .egg-info directory found"

From comment on commit e4045e2 from diharvey:

I would love to use this package as I would like to run thousands of geostudio models in order to develop and understanding of the relationship of the phreatic surface elevation and the FoS of the slope in question. I am struggling to import the package and VS Code keeps giving me the error "pygeostudio is not a package. I have tried the fix mentioned above but i receive the error "ERROR: No .egg-info directory found". Please could you help me get this installed, I would love to use PyGeostudio.

This looks like you pip package is not up to date as on https://stackoverflow.com/questions/26091641/what-does-a-could-not-find-egg-info-directory-in-install-record-from-pip-mean. I advise you to update your pip version using the step describe in the link. Else, can you send me the full output of your VS code terminal ?

Moise

Change analysis properties

In example file, why is it that every time I run the code change_saturated_perm.py successfully, I open the file Rapid drawdown.gsz with geostudio to see the material properties are still keep with the old edition.

No .xml file

Hey there,

When I try to load the Rapid drawdown.gsz file, I get the following KeyError:

"There is no item named 'C:\\Users\\XXXXX\\Downloads\\Rapid drawdown.xml' in the archive"

Is there a specific way I should be saving the GeoStuido files to allow pyGeoStudio to read them?

Cheers,
Ryan

How to modify the Context object

Hello.
In your case, I refer to “Change material properties” to modify it so that it can change the boundary conditions of the geo file, but I can't even find out how to view the boundary conditions set in the analysis (1), what should I do?
Greetings
Yang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.