pydfnWorks
python wrapper for dfnWorks
|
Data Structures | |
class | Particle |
Functions | |
def | create_neighbor_list (Gtilde) |
def | prepare_output_files (partime_file, frac_id_file) |
def | dump_particle_info (particles, partime_file, frac_id_file) |
def | track_particle (data) |
def | run_graph_transport (self, Gtilde, nparticles, partime_file, frac_id_file, frac_porosity=1.0, tdrw_flag=False, matrix_porosity=0.02, matrix_diffusivity=1e-11) |
.. module:: graph_transport.py :synopsis: simulate transport on a pipe network representaiton of a DFN .. moduleauthor:: Shriram Srinivasan <shrirams@lanl.gov>
def pydfnworks.dfnGraph.graph_transport.create_neighbor_list | ( | Gtilde | ) |
Create a list of downstream neighbor vertices for every vertex on NetworkX graph obtained after running graph_flow Parameters ---------- Gtilde: NetworkX graph obtained from output of graph_flow Returns ------- dict : nested dictionary. Notes ----- dict[n]['child'] is a list of vertices downstream to vertex n dict[n]['prob'] is a list of probabilities for choosing a downstream node for vertex n
Definition at line 20 of file graph_transport.py.
Referenced by pydfnworks.dfnGraph.graph_transport.run_graph_transport().
def pydfnworks.dfnGraph.graph_transport.dump_particle_info | ( | particles, | |
partime_file, | |||
frac_id_file | |||
) |
If running graph transport in parallel, this function dumps out all the particle information is a single pass rather then opening and closing the files for every particle Parameters ---------- particles : list list of particle objects partime_file : string name of file to which the total travel times and lengths will be written for each particle frac_id_file : string name of file to which detailed information of each particle's travel will be written Returns ------- pfailcount : int Number of particles that do not exit the domain
Definition at line 284 of file graph_transport.py.
References pydfnworks.dfnGraph.graph_transport.prepare_output_files().
Referenced by pydfnworks.dfnGraph.graph_transport.run_graph_transport().
def pydfnworks.dfnGraph.graph_transport.prepare_output_files | ( | partime_file, | |
frac_id_file | |||
) |
opens the output files partime_file and frac_id_file and writes the header for each Parameters ---------- partime_file : string name of file to which the total travel times and lengths will be written for each particle frac_id_file : string name of file to which detailed information of each particle's travel will be written Returns ------- None
Definition at line 242 of file graph_transport.py.
Referenced by pydfnworks.dfnGraph.graph_transport.dump_particle_info(), and pydfnworks.dfnGraph.graph_transport.run_graph_transport().
def pydfnworks.dfnGraph.graph_transport.run_graph_transport | ( | self, | |
Gtilde, | |||
nparticles, | |||
partime_file, | |||
frac_id_file, | |||
frac_porosity = 1.0 , |
|||
tdrw_flag = False , |
|||
matrix_porosity = 0.02 , |
|||
matrix_diffusivity = 1e-11 |
|||
) |
Run particle tracking on the given NetworkX graph Parameters ---------- self : object DFN Class Gtilde : NetworkX graph obtained from graph_flow nparticles: int number of particles partime_file : string name of file to which the total travel times and lengths will be written for each particle frac_id_file : string name of file to which detailed information of each particle's travel will be written frac_porosity: float porosity of fracture, default is 1.0 tdrw_flag : Bool if False, matrix_porosity, matrix_diffusivity are ignored matrix_porosity: float default is 0.02 matrix_diffusivity: float default is 1e-11 in SI units Returns ------- Notes ----- Information on individual functions is found therein
Definition at line 394 of file graph_transport.py.
References pydfnworks.dfnGraph.graph_transport.create_neighbor_list(), pydfnworks.dfnGraph.graph_transport.dump_particle_info(), and pydfnworks.dfnGraph.graph_transport.prepare_output_files().
def pydfnworks.dfnGraph.graph_transport.track_particle | ( | data | ) |
Tracks a single particle through the graph all input parameters are in the dictionary named data Parameters ---------- Gtilde : NetworkX graph obtained from graph_flow nbrs_dict : dict see function create_neighbor_list frac_porosity: float porosity of fracture, default is 1.0 tdrw_flag : Bool if False, matrix_porosity, matrix_diffusivity are ignored matrix_porosity: float default is 0.02 matrix_diffusivity: float default is 1e-11 m^2/s Returns ------- particle : object particle trajectory information
Definition at line 352 of file graph_transport.py.