Model Muse es una herramienta excelente para la construcción de modelos de agua subterránea y la visualización de resultados, sin embargo, sus capacidades gráficas son bastante limitadas. Dado que siempre estamos en la búsqueda de acercar los modelos de agua subterránea a los interesados, al público general y a las nuevas generaciones, existe un interés especial en proporcionar herramientas complementarias al flujo de trabajo habitual con Model Muse y Modflow6 que permitan al usuario común crear impresionantes objetos 3D que representen:
parámetros hidráulicos
geometría del modelo
condiciones de frontera
niveles piezométricos
nivel freático
Necesitas instalar la última versión de ambos paquetes: Flopy y mf6Voronoi.
pip install -u mf6voronoi
pip install -u flopy
Tutorial
#Vtk generation
import flopy ## Org
from mf6Voronoi.tools.vtkGen import Mf6VtkGenerator ## Org
from mf6Voronoi.utils import initiateOutputFolder ## Org
C:\Users\saulm\anaconda3\Lib\site-packages\geopandas\_compat.py:7: DeprecationWarning: The 'shapely.geos' module is deprecated, and will be removed in a future version. All attributes of 'shapely.geos' are available directly from the top-level 'shapely' namespace (since shapely 2.0.0).
import shapely.geos
import os
# load simulation
simName = 'mf6Sim' ## Org
modelName = 'mf6Model' ## Org
modelWs = os.path.abspath('../Model') ## Org
sim = flopy.mf6.MFSimulation.load(sim_name=simName, version='mf6', ## Org
exe_name='bin/mf6.exe', ## Org
sim_ws=modelWs) ## Org
loading simulation...
loading simulation name file...
loading tdis package...
loading model gwf6...
loading package dis...
loading package ic...
loading package npf...
loading package obs...
loading package oc...
loading package ghb...
loading package drn...
loading package rch...
loading package evt...
loading solution package modflow...
vtkDir = '../vtk' ## Org
initiateOutputFolder(vtkDir) ## Org
mf6Vtk = Mf6VtkGenerator(sim, vtkDir) ## Org
The output folder ../vtk exists and has been cleared
Follow us: |
|
|
|
|
|
|
/---------------------------------------/
The Vtk generator engine has been started
/---------------------------------------/
#list models on the simulation
mf6Vtk.listModels() ## Org
Models in simulation: ['modflow']
mf6Vtk.loadModel('modflow') ## Org
Package list: ['DIS', 'IC', 'NPF', 'OBS-1', 'OC', 'GHB-1', 'DRN-1', 'RCH-1', 'EVT-1']
#show output data
headObj = mf6Vtk.gwf.output.head() ## Org
headObj.get_kstpkper() ## Org
[(0, 0)]
#generate model geometry as vtk and parameter array
mf6Vtk.generateGeometryArrays() ## Org
#generate parameter vtk
mf6Vtk.generateParamVtk() ## Org
Parameter Vtk Generated
#generate bc and obs vtk
mf6Vtk.generateBcObsVtk(nper=0) ## Org
/--------GHB-1 vtk generation-------/
Working for GHB-1 package, creating the datasets: ('bhead', 'cond', 'iface', 'boundname')
Vtk file took 0.7010 seconds to be generated.
/--------GHB-1 vtk generated-------/
/--------DRN-1 vtk generation-------/
Working for DRN-1 package, creating the datasets: ('elev', 'cond', 'iface', 'ddrn', 'boundname')
Vtk file took 0.9910 seconds to be generated.
/--------DRN-1 vtk generated-------/
/--------RCH-1 vtk generation-------/
Working for RCH-1 package, creating the datasets: ('recharge', 'iface', 'boundname')
Vtk file took 4.3051 seconds to be generated.
/--------RCH-1 vtk generated-------/
/--------EVT-1 vtk generation-------/
Working for EVT-1 package, creating the datasets: ('surface', 'rate', 'depth', 'iface', 'boundname')
Vtk file took 3.6910 seconds to be generated.
/--------EVT-1 vtk generated-------/
mf6Vtk.generateHeadVtk(nper=0, crop=True) ## Org
mf6Vtk.generateWaterTableVtk(nper=0) ## Org