Posted Wed, 01 Mar 2017 09:39:40 GMT by Christian Helweg
I classic feflow layered models We use slices to represent the bottom of excavations at a certain elevation. If the geology is complicated, with slanting layers, we typically have to use several slices to represent different parts of the horisontal bottom. When we then want to show e.g. head at the bottom (certain elevation), this is not possible, in slice view, since the bottom is made up of different slices. What we need is something like a horisontal cross section. This can be done in the 3D view, but then cant be exported as shape. Do you have any suggestions on how best to get this horisontal cross section ?. I suppose we could make an ifm that extracts the parameter values in a regular grid, at the elevation of interest, and then treat this data in a GIS system. But maybe something better is already available ??
Posted Wed, 01 Mar 2017 13:46:24 GMT by Björn Kaiser
Hi Christian, four different possibilities come into my mind. You already mentioned most of them:

[b]3D View[/b]
You may use the Planes Panel for clipping/carving. After that, use the Navigation Panel which enables you to enter the perspective from where you are looking. In this regard, you do not have to use the mouse for navigation.

[b]Exporting heads to a shapefile (manual way)[/b]
That's a possible "dirty" way: If the nodes located on your different slices are vertically located at the elevation of interest for the horizontal section and if the horizontal population of the nodes are dense enough you can create a selection. Use the selection and export the heads from the Data Panel into a point-shapefile.

[b]Exporting heads to a shapefile (automatic way)[/b]
You may use the FEFLOW API. Retrieve all nodal X, Y, Z and head values and store them in an array. After that, loop vertically through the nodes located at the different slices starting from the first slice. Within the loop, you may retrieve nodal elevations using [font=courier][color=blue]IfmGetZ(nNode)[/color][/font]. If the upper node is greater than the elevation of interest (for the horizontal section) AND if the lower node is smaller than the elevation of interest, then you have to remember the heads computed from FEFLOW at the two nodes. Based on the elevations and heads of the upper and lower nodes and your additional elevation of interest, you can make a simple vertical 1D interpolation. As a result you have the head at the elevation of interest. If you do that for each XY-position (=[font=courier][color=blue]IfmGetNumberOfNodesPerSlice[/color])[/font], then you have all nodal elevations which are required for the horizontal section.

If you use the Python API and if you use a GIS which supports Python (e.g. ArcGIS => [font=courier][color=blue]arcpy[/color][/font],QGIS =>[font=courier][color=blue]PyQGIS[/color][/font]) you can generate a single pipeline. After you finished the steps as described above you can write a point-shapefile, fill the attribute table with the values for X, Y and heads. Use these columns to generate a TIN. Of course you can also do the GIS steps manually.

If you use ArcGIS the following functions can be usefull (without having the warranty of completeness):
[font=courier][color=blue]
arcpy.AddField_management()
arcpy.CalculateField_management()
arcpy.CreateTin_3d()
arcpy.AddSurfaceInformation_3d()
arcpy.Point()
arcpy.PointGeometry()
[/color][/font]
[b]Write a VTK file[/b]
You may write a VTK file by using the FEFLOW API and use the Clip filter ParaView.
Posted Thu, 02 Mar 2017 10:07:44 GMT by Christian Helweg
Hi Björn. Thanks for your suggestions. Very helpful.

I actually thought an API function existed that would extract e.g. head in any position (XYZ) ?, not necessarily at a grid node (thus doing the interpolation for me), but probably not, since you don't mention such an approach.  :)

Best regards Christian
Posted Thu, 02 Mar 2017 10:30:48 GMT by Björn Kaiser
Hi Christian, of course you are more than right. You do not need to write the interpolation. Instead, you can use the following function:
[font=courier][color=blue]
#include <ifm/document.h>

double IfmGetResultsFlowHeadValueAtXYZ
(
IfmDocument pDoc,
double x,
double y,
double z,
IfmBool *ine
);
[/color][/font]
I forgot to take this function into account. Obviously, I was unintentional tunneled to the interpolation workflow I used for a slightly different question where IfmGetResultsFlowHeadValueAtXYZ cannot be applied. Thanks for your thoughtful remark.

Before using IfmGetResultsFlowHeadValueAtXYZ, you simply have to loop through all nodes of a single slice to retrieve X and Y locations. These X and Y locations plus your Z elevation of interest are the required parameters.
Posted Thu, 02 Mar 2017 10:37:06 GMT by Björn Kaiser
Short additional remark: It's not mandatory that X and Y for IfmGetResultsFlowHeadValueAtXYZ represent XY-locations of  mesh nodes. The location could be anywhere within the 3D model domain space. However, it makes sense to use XY-locations of the layered-based mesh.
Posted Thu, 02 Mar 2017 15:49:55 GMT by Christian Helweg
Great. I will have a go at it then. Best regards Christian

You must be signed in to post in this forum.