CNR-Engineering / PyTelTools

Python Telemac Tools for post-processing tasks (includes a workflow)
https://github.com/CNR-Engineering/PyTelTools/wiki
GNU General Public License v3.0
32 stars 15 forks source link

Interpolate to 2D vertical cross section #18

Closed krober10nd closed 1 year ago

krober10nd commented 1 year ago

Hello Luc,

I would like to know if you have any scripts to interpolate a time-varying 3D result stored in a Serafin file onto a fixed vertical cross sectional plane?

Thanks for any help you can provide!

Keith

lucduron commented 1 year ago

Dear Keith,

Unfortunately I do not have this kind of tool in PyTelTools. We developed a script to convert a 3D Serafin file to a 2D Serafin file (see https://github.com/CNR-Engineering/PyTelTools/blob/master/cli/slf_3d_to_2d.py) by vertical aggregation. For this tool the possible functions are : min, max and mean (mean considering the space between planes, see https://github.com/CNR-Engineering/PyTelTools/blob/dfc7984670e9cf495894293d2e9e02161c40098f/pyteltools/slf/misc.py#L685-L695). I fear you have to perform a vertical interpolation (and taking care of out of bounds) 2D node by 2D node. It would be great to integrate such tool in PyTelTools, let me know if you manage to a satisfactory tool.

Best Regards, Luc

krober10nd commented 1 year ago

Thanks Luc. I actually found a conference proceeding you wrote discussing pyteltools and then discovered the workflow feature. I figured out how to export to vtk and then can do the cross sections using pyvista or paraview.