Slice model according to mesh properties
Hi,
I’m a PhD student using the Tomofast-x software for inversion. New to geological modelling, though. I’d like to know if there’s a way to convert a model created in GemPy to Tomofast-x format or if I can 'slice' my GemPy model after I created into the exact cells generated in Tomofast-x.
I have a mesh grid (with topography added where cells are shifted based on DTM data) where each cell is structured as follows:
$N$ $X_{\text{min}}^1 \quad X_{\text{max}}^1 \quad Y_{\text{min}}^1 \quad Y_{\text{max}}^1 \quad Z_{\text{min}}^1 \quad Z_{\text{max}}^1 \quad m^1 \quad i^1 \quad j^1 \quad k^1$ $...$ $X_{\text{min}}^N \quad X_{\text{max}}^N \quad Y_{\text{min}}^N \quad Y_{\text{max}}^N \quad Z_{\text{min}}^N \quad Z_{\text{max}}^N \quad m^N \quad i^N \quad j^N \quad k^N$
$N$ is the number of model cells, $X_{\text{min}}^1 \quad X_{\text{max}}^1 \quad Y_{\text{min}}^1 \quad Y_{\text{max}}^1 \quad Z_{\text{min}}^1 \quad Z_{\text{max}}^1 \quad m^1 \quad i^1 \quad j^1 \quad k^1$ are the min/max coordinates of the X, Y, Z planes of the cell (rectangular prism), $m^i$ is the model value at this cell, $i^i j^i k^i$ is the 3D cell-index (integer).
The mesh consists of cubic cells at the core, transitioning to larger rectangular prisms toward the edges (i.e. cells with expanding factor).
Would it be possible to ‘slice’ in cubes/prisms a geological model using these geophysical mesh coordinates? My goal is to use a geological model as a constraint in Tomofast-x inversions.
Additionally, can GemPy export the data in a spaced format, e.g. my mesh cells are spaced 100 m then I can go to my geomodel and sample every 100 m to extract the physical value there? Does GemPy allow to store property values too (e.g. density)?
Sorry for so many questions.
Best regards,
Vinicius
Hi @vinicius-anp,
thanks for your question and sorry for the delayed reply. There are a couple of things here and I hope I get everything right.
From what I understand you bascially want to transfer the gempy solution to a different grid. And even more specifically you want to populate cells with the lithology value, right? So what gempy can do: You can calcualte the lithology at any given point in space - so you could for example calculate the center of your cells and pass this to gempy using gp.compute_model_at(geo_model, cell_centers) where cell_centers are the xyz coordinates of your center points in shape (n,3).
Same would be pssoible for any spacing or other things.
Not sure if that helps and answers the question. Let me know if you have any follow-ups.
Cheers, Jan
Hi @javoha,
Thank you for your response — it seems to be exactly what I was looking for. Essentially, my goal with GemPy is to build a geological model in which I can assign densities to different lithologies, and then transfer that information to my mesh (which includes core cells and padding, as shown in the image below) in a format compatible with Tomofast-x, as described in my original post.
I'll explore GemPy further and will reach out if I have any questions, particularly regarding the use of gempy.compute_model.
Best regards,
Vinicius
Closed for now, feel free to reopen for follow-up questions or related issues.