acroucher / PyTOUGH

A Python library for automating TOUGH2 simulations of subsurface fluid and heat flow
GNU Lesser General Public License v3.0
96 stars 36 forks source link

about a example of the use of the geometry.py #30

Closed chenmingzhang closed 2 years ago

chenmingzhang commented 2 years ago

Hi Adrian:

I am recently working on a project using PyTough and toughreact, that requires defining a geometry and find all the connections and elements within.

my first thought was to inherete from shapely, exactly like how flopy does https://github.com/modflowpy/flopy/issues/536 . once started for a while i realised that PyTough has Geometry.py that may have already achieved some of these functions. is there any quick examples on the use of the subroutines, such as the formate of line, polygon, rectangles, so that we can make use of this subroutines?

Thanks, Chenming

acroucher commented 2 years ago

It depends on what exactly you want to do, but there are some geometry routines in geometry.py and also in mulgrids.py for finding intersections of polygons, lines and also mesh geometry.

For example, finding which mesh columns are inside a given polygon can be done using the mulgrid columns_in_polygon() method.