lanl / dfnWorks

dfnWorks is a parallelized computational suite to generate three-dimensional discrete fracture networks (DFN) and simulate flow and transport. If you download the software please fill out our interest form to stay up to date on releases https://goo.gl/forms/VE39oKsyp4LVC6Gj2 and join our google group https://groups.google.com/d/forum/dfnworks-users . Precompiled Docker Container https://hub.docker.com/r/ees16/dfnworks
https://dfnworks.lanl.gov/
Other
73 stars 42 forks source link

SimFrac issue #59

Closed je-santos closed 1 year ago

je-santos commented 1 year ago

`myfrac1 = SimFrac( h = 1.0, lx = 512, ly = 128, method = "spectral")

myfrac1.params['aniso']['value'] = 0.0 myfrac1.params['H']['value'] = 0.7 myfrac1.params['roughness']['value'] = 4 myfrac1.params['mismatch']['value'] = 0.25 myfrac1.params['lambda_0']['value'] = 0.6 myfrac1.params['model']['value'] = 'smooth' myfrac1.params['seed']['value'] = 1 myfrac1.create_fracture()`


ValueError Traceback (most recent call last) Input In [2], in <cell line: 10>() 8 myfrac1.params['model']['value'] = 'smooth' 9 myfrac1.params['seed']['value'] = 1 ---> 10 myfrac1.create_fracture() 13 myfrac1.set_mean_aperture(15) 14 myfrac1.voxelize(solid_voxels=5)

File ~/anaconda3/lib/python3.9/site-packages/pysimfrac-0.2-py3.9.egg/pysimfrac/src/methods/surface_generation.py:112, in create_fracture(self) 110 self.create_gaussian() 111 elif self.method == 'spectral': --> 112 self.create_spectral() 113 elif self.method == 'box': 114 self.create_box()

File ~/anaconda3/lib/python3.9/site-packages/pysimfrac-0.2-py3.9.egg/pysimfrac/src/methods/spectral.py:197, in create_spectral(self) 194 Phase2[mismatching] = Phase1[mismatching] 196 # Top surface in Fourier space --> 197 A1 = Fmodulus (np.cos(Phase1) + 1j np.sin(Phase1) 198 ) / np.abs(np.cos(Phase1) + 1j np.sin(Phase1)) 200 # Bottom surface in Fourier space 201 A2 = Fmodulus (np.cos(Phase2) + 1j np.sin(Phase2) 202 ) / np.abs(np.cos(Phase2) + 1j np.sin(Phase2))

ValueError: operands could not be broadcast together with shapes (65535,) (128,512)

hymanjd commented 1 year ago

@je-santos This is the same issue that we fixed with issue #32 in the simfrac repo. Please see that for the fix. Modify the source code here via a fork and submit a pull request. I'll review and approve. Thanks.