pydfnworks: dfnFlow
DFN Class functions used in flow simulations (PFLOTRAN and FEHM)
Running Flow : General
- create_dfn_flow_links(self, path='../')[source]
Create symlinks to files required to run dfnFlow that are in another directory.
- Parameters:
self (object) – DFN Class
path (string) – Absolute path to primary directory.
- Return type:
None
Notes
Typically, the path is DFN.path, which is set by the command line argument -path
Currently only supported for PFLOTRAN
Running Flow: PFLOTRAN
functions for using pflotran in dfnworks
- lagrit2pflotran(self, boundary_cell_area=None)[source]
Takes output from LaGriT and processes it for use in PFLOTRAN. Calls the function write_perms_and_correct_volumes_areas() and zone2ex
- Parameters:
self (object) – DFN Class
- Return type:
None
Notes
None
- parse_pflotran_vtk_python(self, grid_vtk_file='')[source]
Adds CELL_DATA to POINT_DATA in the VTK output from PFLOTRAN. :param self: DFN Class :type self: object :param grid_vtk_file: Name of vtk file with mesh. Typically local_dfnFlow_file.vtk :type grid_vtk_file: string
- Return type:
None
Notes
If DFN class does not have a vtk file, inp2vtk_python is called
- pflotran(self, transient=False, restart=False, restart_file='')[source]
Run PFLOTRAN. Copy PFLOTRAN run file into working directory and run with ncpus
- Parameters:
self (object) – DFN Class
transient (bool) – Boolean if PFLOTRAN is running in transient mode
restart (bool) – Boolean if PFLOTRAN is restarting from checkpoint
restart_file (string) – Filename of restart file
- Return type:
None
Notes
Runs PFLOTRAN Executable, see http://www.pflotran.org/ for details on PFLOTRAN input cards
- pflotran_cleanup(self, index_start=0, index_finish=1, filename='')[source]
Concatenate PFLOTRAN output files and then delete them
- Parameters:
self (object) – DFN Class
index (int) – If PFLOTRAN has multiple dumps use this to pick which dump is put into cellinfo.dat and darcyvel.dat
- Return type:
None
Notes
Can be run in a loop over all pflotran dumps
- write_perms_and_correct_volumes_areas(self)[source]
Write permeability values to perm_file, write aperture values to aper_file, and correct volume areas in uge_file
- Parameters:
self (object) – DFN Class
- Return type:
None
Notes
Calls executable correct_uge
- zone2ex(self, zone_file='', face='', boundary_cell_area=0.1)[source]
Convert zone files from LaGriT into ex format for LaGriT
- Parameters:
self (object) – DFN Class
zone_file (string) – Name of zone file
Face (Face of the plane corresponding to the zone file) –
zone_file – Name of zone file to work on. Can be ‘all’ processes all directions, top, bottom, left, right, front, back
boundary_cell_area (double) – should be a large value relative to the mesh size to force pressure boundary conditions.
- Return type:
None
Notes
the boundary_cell_area should be a function of h, the mesh resolution
Running Flow: FEHM
- correct_stor_file(self)[source]
Corrects volumes in stor file to account for apertures
- Parameters:
self (object) – DFN Class
- Return type:
None
Notes
Currently does not work with cell based aperture
- fehm(self)[source]
Run FEHM
- Parameters:
self (object) – DFN Class
- Return type:
None
Notes
See https://fehm.lanl.gov/ for details about FEHM
Processing Flow
- effective_perm(self, inflow_pressure, outflow_pressure, boundary_file, direction)[source]
Computes the effective permeability of a DFN in the primary direction of flow using a steady-state PFLOTRAN solution.
- Parameters:
self (object) – DFN Class
inflow_pressure (float) – Pressure at the inflow boundary face. Units are Pascal
outflow_pressure (float) – Pressure at the outflow boundary face. Units are Pascal
boundary_file (string) – Name of inflow boundary file, e.g., pboundary_left.ex
direction (string) – Primary direction of flow, x, y, or z
- Return type:
None
Notes
Information is written to screen and to the file self.local_jobname_effective_perm.txt
Currently, only PFLOTRAN solutions are supported
Assumes density of water at 20c