pydfnWorks
python wrapper for dfnWorks
|
Functions | |
def | parse_params_file (quiet=False) |
def | check_dudded_points (dudded, hard=False) |
def | cleanup_dir () |
def | output_meshing_report (local_jobname, visual_mode) |
def | clean_up_files_after_prune (self) |
def | create_mesh_links (self, path) |
def | inp2gmv (self, inp_file='') |
def | inp2vtk_python (self) |
def | run_lagrit_script (lagrit_file, output_file=None, quiet=False) |
Variables | |
inp_file | |
vtk_file | |
.. module:: mesh_dfn_helper.py :synopsis: helper functions for meshing DFN using LaGriT .. moduleauthor:: Jeffrey Hyman <jhyman@lanl.gov>
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.check_dudded_points | ( | dudded, | |
hard = False |
|||
) |
Parses LaGrit log_merge_all.out and checks if number of dudded points is the expected number Parameters --------- dudded : int Expected number of dudded points from params.txt hard : bool If hard is false, up to 1% of nodes in the mesh can be missed. If hard is True, no points can be missed. Returns --------- True/False : bool True if the number of dudded points is correct and False if the number of dudded points is incorrect Notes ----- If number of dudded points is incorrect by over 1%, program will exit.
Definition at line 80 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.clean_up_files_after_prune | ( | self | ) |
After pruning a DFN to only include the fractures in prune_file this function removes references to those fractures from params.txt, perm.dat, aperature.dat, and poly_info.dat Parameters ---------- self : DFN object Returns ------- None Notes ----- This function should always be run after pruning if flow solution is going to be run
Definition at line 223 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.cleanup_dir | ( | ) |
Removes meshing files Parameters ---------- None Returns ------- None Notes ----- Only runs if production_mode is True
Definition at line 136 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.create_mesh_links | ( | self, | |
path | |||
) |
Makes symlinks for files in path required for meshing Parameters ---------- self : DFN object path : string Path to where meshing files are located Returns ------- None Notes ----- None
Definition at line 345 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.inp2gmv | ( | self, | |
inp_file = '' |
|||
) |
Convert inp file to gmv file, for general mesh viewer. Name of output file for base.inp is base.gmv Parameters ---------- self : object DFN Class inp_file : str Name of inp file if not an attribure of self Returns ---------- None Notes ---------
Definition at line 386 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.inp2vtk_python | ( | self | ) |
Using Python VTK library, convert inp file to VTK file. Parameters ---------- self : object DFN Class Returns -------- None Notes -------- For a mesh base.inp, this dumps a VTK file named base.vtk
Definition at line 430 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.output_meshing_report | ( | local_jobname, | |
visual_mode | |||
) |
Prints information about the final mesh to file Parameters ---------- local_jobname : string Name of current DFN job (not path) visual_mode : bool Determines is reduced_mesh or full_mesh is dumped Returns ------- None Notes ----- None
Definition at line 161 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.parse_params_file | ( | quiet = False | ) |
Reads params.txt file from DFNGen and parses information Parameters --------- quiet : bool If True details are not printed to screen, if False they area Returns ------- num_poly: int Number of Polygons h: float Meshing length scale h dudded_points: int Expected number of dudded points in Filter (LaGriT) visual_mode : bool If True, reduced_mesh.inp is created (not suitable for flow and transport), if False, full_mesh.inp is created domain: dict x,y,z domain sizes Notes ----- None
Definition at line 13 of file mesh_dfn_helper.py.
def pydfnworks.dfnGen.meshing.mesh_dfn_helper.run_lagrit_script | ( | lagrit_file, | |
output_file = None , |
|||
quiet = False |
|||
) |
Runs LaGriT Parameters ----------- ---------- lagrit_file : string Name of LaGriT script to run output_file : string Name of file to dump LaGriT output quiet : bool If false, information will be printed to screen. Returns ---------- failure: int If the run was successful, then 0 is returned.
Definition at line 504 of file mesh_dfn_helper.py.
pydfnworks.dfnGen.meshing.mesh_dfn_helper.inp_file |
Definition at line 405 of file mesh_dfn_helper.py.
pydfnworks.dfnGen.meshing.mesh_dfn_helper.vtk_file |
Definition at line 465 of file mesh_dfn_helper.py.