try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow_pulse',range(6)) filenames = pft.get_full_paths(path,files) line_styles = [] line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('--') f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Variably Saturated Flow - Pulse",fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]')
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('1d', range(1, 2)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(8, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Pressure Profile", fontsize=16) plt.xlabel('Distance [m]') plt.ylabel('Pressure [Pa]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 1, 4) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title)
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_flow_and_tran', [5]) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Calcite at 25 Years (with Flow)", fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [7, 8, 9]
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_tran_only', range(1, 6)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Calcite", fontsize=16) plt.xlabel('X [m]') plt.ylabel('pH') #plt.xlim(0.,1.) plt.ylim(4.8, 8.2) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 1, 4) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title)
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames(range(0, 36, 5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Variably Saturated Flow - Pulse, 2 Layer", fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0., 1.) #plt.ylim(0.,1.) #plt.grid(True) line_styles = [] for i in range(7): line_styles.append('-')
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames(range(6)) filenames = pft.get_full_paths(path,files) line_styles = [] line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('--') f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Variably Saturated Flow - Pulse",fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]')
im_labels = [] im_labels.append('Xim') im_labels.append('Yim') im_colors = [] im_colors.append('darkorange') im_colors.append('navy') f = plt.figure(figsize=(16,6)) f.suptitle("Simple Reaction Sandbox",fontsize=16) # concentration profiles plt.subplot(1,2,2) plt.title('Concentration Profile') files = pft.get_tec_filenames('pflotran',[2]) filenames = pft.get_full_paths(path,files) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') plt.yscale(scale_string) maxval = -1.e20 minval = 1.e20 for ifile in range(len(filenames)): columns = [4,5,6,7,8,9] for icol in range(len(columns)): data = pft.Dataset(filenames[ifile],1,columns[icol]) ydata = data.get_array('y') maxval = max(maxval,np.amax(ydata))
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow_pulse_2layer', range(0, 36, 5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Variably Saturated Flow - Pulse, 2 Layer", fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0., 1.) #plt.ylim(0.,1.) #plt.grid(True) line_styles = [] for i in range(7): line_styles.append('-')
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('east', range(5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("East Face, Partially-Saturated", fontsize=16) plt.xlabel('Liquid Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0., 1.) #plt.ylim(0.,1.) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 6, 3) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title)
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_flow_and_tran', range(1, 6)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Calcite", fontsize=16) plt.xlabel('X [m]') plt.ylabel('pH') #plt.xlim(0.,1.) plt.ylim(4.8, 8.2) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 1, 6) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title)
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_flow_and_tran',[5]) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Calcite at 25 Years (with Flow)",fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [7,8,9]
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow',range(5)) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Variably Saturated Flow",fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile],5,3) plt.plot(data.get_array('x'),data.get_array('y'),label=data.title)
im_labels = [] im_labels.append('Xim') im_labels.append('Yim') im_colors = [] im_colors.append('darkorange') im_colors.append('navy') f = plt.figure(figsize=(16, 6)) f.suptitle("Simple Reaction Sandbox", fontsize=16) # concentration profiles plt.subplot(1, 2, 2) plt.title('Concentration Profile') files = pft.get_tec_filenames('reaction_sandbox_simple', [2]) filenames = pft.get_full_paths(path, files) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') plt.yscale(scale_string) maxval = -1.e20 minval = 1.e20 for ifile in range(len(filenames)): columns = [4, 5, 6, 7, 8, 9] for icol in range(len(columns)): data = pft.Dataset(filenames[ifile], 1, columns[icol]) ydata = data.get_array('y') maxval = max(maxval, np.amax(ydata))
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames([5]) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Calcite at 25 Years (with Flow)", fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [7, 8, 9]
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow', range(5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Variably Saturated Flow", fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0., 1.) #plt.ylim(0.,1.) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 5, 3) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title)
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow_pulse_2layer',range(0,36,5)) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Variably Saturated Flow - Pulse, 2 Layer",fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) line_styles = [] for i in range(7): line_styles.append('-')
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_tran_only',[5]) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Calcite at 25 Years",fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [5,6,7]
'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') name = 'hot_steam_injection' files = pft.get_tec_filenames(name, range(5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(20, 20)) plt.subplot(3, 1, 1) f.suptitle(name, fontsize=16) plt.xlabel('Distance') plt.ylabel('Gas Saturation') for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 1, 7) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title) plt.legend(loc=1, title='Time [y]') plt.subplot(3, 1, 2)
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_vsat_flow_and_tran',range(1,6)) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Calcite Variably-Saturated Flow",fontsize=16) plt.xlabel('pH') plt.ylabel('Z [m]') #plt.xlim(0.,1.) plt.xlim(4.8,8.2) #plt.grid(True) for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile],6,3) plt.plot(data.get_array('x'),data.get_array('y'),label=data.title)
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames([5]) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Calcite at 25 Years (with Flow)",fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [7,8,9]
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames(range(6)) filenames = pft.get_full_paths(path, files) line_styles = [] line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('--') f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Variably Saturated Flow - Pulse", fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]')
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('calcite_tran_only', [5]) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Calcite at 25 Years", fontsize=16) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') #plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) plt.yscale('log') for ifile in range(len(filenames)): columns = [5, 6, 7]
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('tracer_1D_MC-sec-rank0-obs0',range(5)) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Tracer - Matrix Concentration Profiles",fontsize=16) plt.xlabel('Time [s]') plt.ylabel('Concentration [mol/L]') for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile],1,2) plt.plot(data.get_array('x'),data.get_array('y'),label=data.title) plt.legend(loc=3,title='Time [s]')
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('vsat_flow_pulse', range(6)) filenames = pft.get_full_paths(path, files) line_styles = [] line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('-') line_styles.append('--') f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Variably Saturated Flow - Pulse", fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]')
im_labels = [] im_labels.append('Xim') im_labels.append('Yim') im_colors = [] im_colors.append('darkorange') im_colors.append('navy') f = plt.figure(figsize=(16, 6)) f.suptitle("Simple Reaction Sandbox", fontsize=16) # concentration profiles plt.subplot(1, 2, 2) plt.title('Concentration Profile') files = pft.get_tec_filenames('pflotran', [2]) filenames = pft.get_full_paths(path, files) plt.xlabel('X [m]') plt.ylabel('Concentration [M]') plt.yscale(scale_string) maxval = -1.e20 minval = 1.e20 for ifile in range(len(filenames)): columns = [4, 5, 6, 7, 8, 9] for icol in range(len(columns)): data = pft.Dataset(filenames[ifile], 1, columns[icol]) ydata = data.get_array('y') maxval = max(maxval, np.amax(ydata))
try: pflotran_dir = os.environ['PFLOTRAN_DIR'] except KeyError: print('PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.') sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames(range(0,36,5)) filenames = pft.get_full_paths(path,files) f = plt.figure(figsize=(6,6)) plt.subplot(1,1,1) f.suptitle("1D Variably Saturated Flow - Pulse, 2 Layer",fontsize=16) plt.xlabel('Saturation [-]') plt.ylabel('Z [m]') plt.xlim(0.,1.) #plt.ylim(0.,1.) #plt.grid(True) line_styles = [] for i in range(7): line_styles.append('-')
except KeyError: print( 'PFLOTRAN_DIR must point to PFLOTRAN installation directory and be defined in system environment variables.' ) sys.exit(1) sys.path.append(pflotran_dir + '/src/python') import numpy as np import matplotlib import matplotlib.pyplot as plt import math import pflotran as pft path = [] path.append('.') files = pft.get_tec_filenames('tracer_1D_MC-sec-rank0-obs0', range(5)) filenames = pft.get_full_paths(path, files) f = plt.figure(figsize=(6, 6)) plt.subplot(1, 1, 1) f.suptitle("1D Tracer - Matrix Concentration Profiles", fontsize=16) plt.xlabel('Time [s]') plt.ylabel('Concentration [mol/L]') for ifile in range(len(filenames)): data = pft.Dataset(filenames[ifile], 1, 2) plt.plot(data.get_array('x'), data.get_array('y'), label=data.title) plt.legend(loc=3, title='Time [s]') plt.show()