dfnWorks icon indicating copy to clipboard operation
dfnWorks copied to clipboard

dfnGen fails with user defined fractures

Open DaveHealy-github opened this issue 11 months ago • 8 comments

When I run dfnGen with a custom Python script containing say 700 fractures, the code blows up in the Python module hydraulic_properties.py, with a list index exception. The error reads:


Traceback (most recent call last): File "/home/daveh/dfnWorks/FracPaQpy/FracPaQpyDFN.py", line 787, in DFN.create_network() File "/home/daveh/anaconda3/lib/python3.10/site-packages/pydfnworks/dfnGen/generation/generator.py", line 141, in create_network self.assign_hydraulic_properties() File "/home/daveh/anaconda3/lib/python3.10/site-packages/pydfnworks/dfnGen/generation/generator.py", line 416, in assign_hydraulic_properties self.set_fracture_hydraulic_values(hy_prop_type, [fracture_num], File "/home/daveh/anaconda3/lib/python3.10/site-packages/pydfnworks/dfnGen/generation/hydraulic_properties.py", line 545, in set_fracture_hydraulic_values self.aperture[fracture_list - 1] = b IndexError: index 749 is out of bounds for axis 0 with size 749


An example of one of my scripts is attached below (with .py changed to .txt) I think the problem lies with the tracking of how many fractures to assign apertures (or other values) to; in this case, I had 765 original fractures, but only 749 after isolated ones were removed. The loop in the above code is defined on the range provided by the length of user_rect_params (i.e., 765 in this case), but the aperture list on the DFN object is sized to the reduced fracture set (749 in this case). fracpaqpyDFN.txt

DaveHealy-github avatar Jul 11 '23 13:07 DaveHealy-github