Gravity: is it possible to do the simulation for 2D model by setting y axis as a single value?

Hi,

I saw there are forward and inversion examples for gravity based on a 3D model. I need to do some verification on a 2D model. So I would like to know how can I do the simulation based on a 2D model. Is it possible by setting the x- or y-axis as only a single value? It seems that only defining a 2D model is not correct because the surface topography is required to be an (N,3) NumPy array. Any response would be highly appreciated.

Hi @Astor,
Sorry for the delay.
I never tried it myself, but I believe you should be able to simulate a 2D gravity survey by using a 3D mesh with only one very wide cell in the Y-axis direction. The survey would then have to be centred in the middle of those very long Y-axis cells. Here is an example script to create such mesh:

import numpy as np
import discretize
import matplotlib.pyplot as plt

ncx = 16  # number of cells in the x-direction
ncy = 1 # number of cells in the y-direction
ncz = 4  # number of cells in the z-direction

dx = 5  # base cell width x
dy = 1e5  # base cell width y
dz = 5 # base cell width z

hx = dx * np.ones(ncx)
hy = dy * np.ones(ncy)
hz = dz * np.ones(ncz)

# create a tensor mesh
tensor_mesh = discretize.TensorMesh([hx, hy, hz],x0="CCN")

print(tensor_mesh)

fig, ax = plt.subplots(1,1,figsize=(10,20),subplot_kw={"projection": "3d"})
tensor_mesh.plot_grid(ax=ax)

Maybe @domfournier would have more insights as well.

Hi Thibaut,

Thank you so much for your reply and the example. It works. :smile:

Hi @Thibaut,

I found that the 2D mesh can be equivalent by using one wide cell in the Y direction. However, it looks like the observation locations must be an (N, 3) Numpy array, and Y can not be set as a single value. If I set the Y location as a single value, I encountered the QhullError: QH6154 Qhull precision error: Initial simplex is flat (facet 1 is coplanar with the interior point). Does that mean the survey still needs to be 3D? I was intended to simulate a 2D cross-well case. It seems that the 3D Gravity can not be modified directly. Thank you in advance for any responses!