with open(filename, 'rb') as handle: wgs_data_incomps = pickle.load(handle) #Temperature of WGS data (convert to K) Tdata = wgs_data_incomps['Tout'] + 273.15 #CO/H2O ratio at the inlet Xg_in = wgs_data_incomps['Xg'][:,:,0,:] ratio_data = wgs_data_incomps['ratio'] #Load phases solution objects gas = ct.Solution(input_file) surfCT = ct.Interface(input_file,surf_name,[gas]) #Load in-house surface phase object surf = pfr.SurfacePhase(gas,surfCT, cov_file = cov_file) #Set up equilibrium gas phase gas_eq = ct.Solution(input_file) #Vary the inlet CO:H2O ratio ratio = np.linspace(1,10,10) flipratio = np.flip(ratio,axis=0) #CO and H2O inlet molar fractions co_x = 0.55*(ratio/(ratio+flipratio)) h2o_x = 0.55*(flipratio/(ratio+flipratio)) '''Test PFR with simplified kinetics expression''' #Initialize simple PFR
input_file = 'wgs_ni_redux.cti' surf_name = 'Ni_surface' #### Data files path ####: basepath = os.path.dirname(__file__) filepath = os.path.join(basepath, '../..', 'data') #### Coverage dependency matrix file ####: cov_file = os.path.join(filepath, 'cov_matrix/covmatrix_wgs_ni.inp') #Load phases solution objects gas0 = ct.Solution(input_file0) surfCT0 = ct.Interface(input_file0, surf_name, [gas0]) #Load in-house surface phase object surf0 = pfr.SurfacePhase(gas0, surfCT0, cov_file=cov_file) #Load phases solution objects for reduced mechanism gas = ct.Solution(input_file) surfCT = ct.Interface(input_file, surf_name, [gas]) #Load in-house surface phase object surf = pfr.SurfacePhase(gas, surfCT, cov_file=cov_file) #### Current thermo state ####: X_in = 'H2O:0.457, CO:0.114, H2:0.229, N2:0.2' T_in = 750.0 P_in = 101325.0 #Inlet gas solution object gas_in = ct.Solution(input_file)
#### Coverage dependency matrix file ####: cov_file = os.path.join(filepath, 'cov_matrix/covmatrix_wgs_ni.inp') #### Save results into file? #### savefile = 0 savepath = '/home/tpcarvalho/carva/python_data/wgs_ni/' savename = 'wgs_nib_redux_mdots.pickle' #Load phases solution objects gas = ct.Solution(input_file) bulk = ct.Solution(input_file, bulk_name) surfCT = ct.Interface(input_file, surf_name, [gas, bulk]) #Load in-house surface phase object surf = pfr.SurfacePhase(gas, surfCT, bulk=bulk, cov_file=cov_file) #### Current thermo state ####: X_in = 'H2O:0.457, CO:0.114, H2:0.229, N2:0.2' #WGS Ni T_in = 750.0 P_in = 1e05 #Set up equilibrium gas phase gas_eq = ct.Solution(input_file) #Load gas phase at inlet conditions gas_in = ct.Solution(input_file) gas_in.TPX = 273.15, P_in, X_in #Inlet mass flow rate [kg/s] at 0.3-30 SLPM vdot0 = np.array([0.03, 0.3, 3, 30, 300, 3000])
#### Data files path ####: basepath = os.path.dirname(__file__) filepath = os.path.join(basepath, '../..', 'data') #### Coverage dependency matrix file ####: cov_file = os.path.join(filepath, 'cov_matrix/covmatrix_wgs_ni.inp') #Load phases solution objects gas = ct.Solution(input_file) surfCT = ct.Interface(input_file, surf_name, [gas]) gas_wc = ct.Solution(input_file) surfCT_wc = ct.Interface(input_file, surf_name, [gas_wc]) #Load in-house surface phase object surf = pfr.SurfacePhase(gas, surfCT, cov_file=cov_file) surf_wc = pfr.SurfacePhase(gas_wc, surfCT_wc, cov_file=cov_file) #Reactor geometric parameters diam = 0.017 #Diameter [m] length = 0.01 #Length [m] vol = np.pi * diam**2 / 4 * length #Volume [m**3] #Foam monolith properties porosity = 0.8 #Foam porosity [-] dp_foam = 1e-3 #Foam mean pore size [m] ds_foam = dp_foam * np.sqrt(4 / (3 * np.pi) * (1 - porosity)) #Foam mean strut size [m] #Foam specific surface [m**-1]