descmap.analysis
openMKM
Functionality to process openmkm outputs
- descmap.analysis.openmkm.get_ellipse(x, y, slope, x_model, y_model, n_std=1.0, n=50)[source]
Calculates the x, y coordinates of an ellipse based on the data
- Parameters:
x ((N,) nd.ndarray) – X coordinates
y ((N,) nd.ndarray) – Y coordinates
n (int) – Number of data points to fit ellipse
- Returns:
x_ell ((M,) nd.ndarray) – X coordinates corresponding to ellipse perimeter
y_ell ((M,) np.ndarray) – Y coordinates corresponding to ellipse perimeter
- descmap.analysis.openmkm.get_flow_rates(reactor, mol_frac_in, mol_frac_out, mass_frac_in, mass_frac_out, mol_weight)[source]
Calculates the mass and mol flow rates in and out of the reactor
- Parameters:
reactor (dict of Quantity objects.) – Reactor condition inputs
mol_frac_in ((M, N) pd.DataFrame obj) – Mole fractions in. M and N represents number of runs and species respectively.
mol_frac_out ((M, N) pd.DataFrame obj) – Mole fractions out. M and N represents number of runs and species respectively.
mass_frac_out ((M, N) pd.DataFrame obj) – Mass fractions in. M and N represents number of runs and species respectively.
mass_frac_out – Mass fractions out. M and N represents number of runs and species respectively.
mol_weight (pd.Series obj) – Mole weight in g/mol
- Returns:
mol_flow_rates (dict) – Flow rates containing the keys:
in
in_tot
out
out_tot
mass_flow_rates (dict) – Mass flow rates containing the keys:
in
out
tot
- descmap.analysis.openmkm.get_fractions(paths, omkm_path)[source]
Returns the coverages, gas fractions and mole fractions associated with OpenMKM runs.
- descmap.analysis.openmkm.get_reactor_inputs(reactor_inputs, phases, units)[source]
Extracts the reactor inputs
- Parameters:
reactor_inputs (dict) – Conditions of the reactor. Keys represent reactor conditions and values represent quantity
phases (list of dict) – Phases to consider for site density calculation. At least one dictionary is expected to have ‘site_density’ as the key.
units (dict) – Units corresponding to interested quantities. If an entry is not provided, uses pMuTT’s default units for OpenMKM.
- Returns:
reactor – Reactor conditions containing the keys:
’Q’
’P’
’V’
’T’
’cat_abyv’
’site_den’
’mol_catalyst’
- Return type:
dict of Quantity objects
Chemkin
Functionality to process Chemkin outputs
- descmap.analysis.chemkin.get_Eapp(tof_list, temp_list, jobs_name)[source]
Calculate apparent activation energies (kcal/mol)
- descmap.analysis.chemkin.get_conversion(main_path, jobs_name)[source]
Extract reaction conversion from Chemkin outputs
- descmap.analysis.chemkin.get_coverage(main_path, jobs_name, inputs)[source]
Extract coverages of surface species from Chemkin outputs
- Parameters:
- Returns:
cov_dict_list – Each dictionary corresponds to one MKM model. Keys represent species and values represent surface coverages.
- Return type:
- descmap.analysis.chemkin.get_mole_fraction(main_path, jobs_name, reactant_name)[source]
Extract reactant mole fraction flow in the reactor
- descmap.analysis.chemkin.get_reaction_order(mole_list, tof_list, jobs_name)[source]
Calculate reaction orders
- descmap.analysis.chemkin.get_temperature(main_path, jobs_name)[source]
Extract temperatures from Chemkin outputs
- descmap.analysis.chemkin.write_Eapp(main_path, jobs_name, output_path)[source]
Write calculated apparent activation energies to Excel
- descmap.analysis.chemkin.write_model_output(main_path, desc_name, jobs_name, output_path, inputs)[source]
Write Chemkin outputs to Excel
Plot
Functionality to plot interactive graphs
- descmap.analysis.plot.plot_1d_simple(path_out, x, y, title, x_label, y_label, ticketformat, ymin_cutoff=None, ymax_cutoff=None)[source]
Creates a simple 1d volcano plot using Plotly
- Parameters:
path_out (str) – Name of file (ending with .html extension)
x (list) – x data to plot
y (list) – y data to plot
title (str) – Title of plot
x_label (str) – x axis label
y_label (str) – y axis label
ymin_cutoff (float, optional) – Minimum cutoff y value. The minimum of
ywill be used if it is higher thanymin_cutoffor ifymin_cutoffis not specified.ymax_cutoff (float, optional) – Maximum cutoff y value. The maximum of
ywill be used if it is higher thanymax_cutoffof irymax_cutoffis not specified.
- descmap.analysis.plot.plot_1d_volcano(path_out, x, y, title, x_label, y_label, hover_label, x_lit=None, lit_label=None, ymin_cutoff=None, ymax_cutoff=None)[source]
Creates a Contour plot using Plotly
- Parameters:
path_out (str) – Name of file (ending with .html extension)
x (list) – x data to plot
y (list) – y data to plot
title (str) – Title of plot
x_label (str) – x axis label
y_label (str) – y axis label
ymin_cutoff (float, optional) – Minimum cutoff y value. The minimum of
ywill be used if it is higher thanymin_cutoffor ifymin_cutoffis not specified.ymax_cutoff (float, optional) – Maximum cutoff y value. The maximum of
ywill be used if it is higher thanymax_cutoffof irymax_cutoffis not specified.
- descmap.analysis.plot.plot_contour(path_out, x, y, z, title, x_label, y_label, hover_label, x_lit=None, y_lit=None, lit_label=None, zmin_cutoff=None, zmax_cutoff=None, x_scaling=None, y_scaling=None, y_scaling_upper=None, y_scaling_lower=None)[source]
Creates a Contour plot using Plotly
- Parameters:
path_out (str) – Name of file (ending with .html extension)
x (list) – x data to plot
y (list) – y data to plot
z (list) – z data to plot
title (str) – Title of plot
x_label (str) – x axis label
y_label (str) – y axis label
zmin_cutoff (float, optional) – Minimum cutoff z value. The minimum of
zwill be used if it is higher thanzmin_cutoffor ifzmin_cutoffis not specified.zmax_cutoff (float, optional) – Maximum cutoff z value. The maximum of
zwill be used if it is higher thanzmax_cutoffof irzmax_cutoffis not specified.
- descmap.analysis.plot.plot_coverage(jobs_name, cov_dict_list, species_list, path)[source]
Creates surface coverage plots using Matplotlib
- descmap.analysis.plot.plot_density(path_out, jobs_data, desc_labels, conv_data, selec_data, yield_data, reactant_name, product_name, hover_label, lit_data=None, design_space_mask=None, conv_min_cutoff=0.0, conv_max_cutoff=1.0, selec_min_cutoff=0.0, selec_max_cutoff=1.0, yield_min_cutoff=0.0, yield_max_cutoff=1.0)[source]
Plots a density map normalized to x axis slices
- descmap.analysis.plot.plot_ols(path_out, x, y, title, x_label, y_label, tickformat, ymin_cutoff=None, ymax_cutoff=None)[source]
Creates ordinary least squares (OLS) regression plot using Plotly
- Parameters:
path_out (str) – Name of file (ending with .html extension)
x (list) – x data to plot
y (list) – y data to plot
title (str) – Title of plot
x_label (str) – x axis label
y_label (str) – y axis label
ymin_cutoff (float, optional) – Minimum cutoff y value. The minimum of
ywill be used if it is higher thanymin_cutoffor ifymin_cutoffis not specified.ymax_cutoff (float, optional) – Maximum cutoff y value. The maximum of
ywill be used if it is higher thanymax_cutoffof irymax_cutoffis not specified.tickformat (str) – Specify number of decimals to keep in ticks