How to input pressure data in non structured grid ? #1909
-
Hello. I have pressure data collected at multiple time-steps in every cell of an unstructured grid. I want to use it in a poromechanics simulation to obtain total displacements along every axis. I already performed such workflow on a structured 5x5x5 grid. To do that, I used the TableFunction method with these parameters :
But now, since I am working on an unstructured grid, is there a similar workflow ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@alexandrebtessael - Currently the internal table functions only support structured formats. For my use cases, I use python to process the unstructured data and convert it into an equivalent structured table. While this requires you to choose a table resolution, it gives you access to the wide variety of interpolators in scipy. For example: from scipy.interpolate import LinearNDInterpolator
import numpy as np
# Target grid axes
axes = [np.linspace(-1, 1, 21),
np.linspace(-1, 1, 21),
np.linspace(-1, 1, 21)]
# Unstructured data
xyz = np.random.random((100, 3))
v = np.random.random(100)
# Interpolate data
grid = np.meshgrid(axes[0], axes[1], axes[2], indexing='ij')
v_interp = LinearNDInterpolator(xyz, v)
v_grid = v_interp(*grid) These data can then be written out to the grid format and read by GEOSX. Alternately, if you are running the problem with pygeosx, these interpolators could be applied during runtime. |
Beta Was this translation helpful? Give feedback.
@alexandrebtessael - Currently the internal table functions only support structured formats. For my use cases, I use python to process the unstructured data and convert it into an equivalent structured table. While this requires you to choose a table resolution, it gives you access to the wide variety of interpolators in scipy. For example: