flopy: unstructured grid cross sections

255 views
Skip to first unread message

Giovanni Firmani

unread,
May 5, 2020, 2:27:48 AM5/5/20
to mod...@googlegroups.com
Does anyone know if there is any flopy python command/function to visualise a cross section of a MF6 model with a horizontal unstructured grid?

Thanks in advance
Giovanni

Frank Tsai

unread,
May 7, 2020, 7:49:20 AM5/7/20
to mod...@googlegroups.com
Giovanni, 
If you can create a VTU file for your MF6 model, you can use ParaView (free) to view any cross sections of your model. 

-Frank

--
You received this message because you are subscribed to the Google Groups "MODFLOW Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modflow/CAOjSa3gg_p2KakQQ0-8TUnrZ%3DVJu3YB8rBQafkqBt%3D5UXZs4BA%40mail.gmail.com.

Giovanni Firmani

unread,
May 11, 2020, 10:36:51 AM5/11/20
to mod...@googlegroups.com
Hi Frank,
thanks for that. In the end I created a quite convoluted python script to generate a cross section. It is a little slow and not really efficient. I would be interested in your solution but I have to idea how to create the VTU file. I checked the flopy documentation but the disv, disu and the npf packages do not seem to have a method to export the model with that format.

If you have any tip, it will be very much appreciated.



Mailtrack Sender notified by
Mailtrack 11/05/20, 09:42:48



--
Giovanni Firmani
3/205 Labouchere Rd, Como WA 6152, Australia
Fax      +39 06 56562922
Skype gio.vanni.f

Frank Tsai

unread,
May 12, 2020, 11:33:19 PM5/12/20
to mod...@googlegroups.com
Hi Giovanni, 
Attached is a small VTU file generated for a MF6 DISU file. You can upload this file to Paraview to see if this is your interest. It will take certain time to learn basic Paraview operations, but in the end it will be worthy. 
-Frank

Geo-model.zip

Giovanni Firmani

unread,
May 13, 2020, 12:09:32 AM5/13/20
to mod...@googlegroups.com
Hi Frank
thanks for sending it through. However, your example file is for a structured grid. My problem is to generate an vtk file for an unstructured model (with voronoi polygons). Apparently flopy does not support this functionality. There is an export method to generate netcdf files but it does not work for unstructured grids. I can only export shape files.
At the moment, I am building my own script to do so, unless you know a method already developed for this.

thanks again for your help







--
Giovanni Firmani
3/205 Labouchere Rd, Como WA 6152, Australia
Fax      +39 06 56562922
Skype gio.vanni.f

Mailtrack Sender notified by
Mailtrack 13/05/20, 11:37:45

Javier González

unread,
Nov 6, 2020, 10:51:25 AM11/6/20
to MODFLOW Users Group
Just in case,
I have got somehow to the following notebook
I hope it helps.
Javier
Reply all
Reply to author
Forward
0 new messages