-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute IDT and IDT SA using Cantera #150
base: main
Are you sure you want to change the base?
Conversation
plt.xlim(x_min, x_max) | ||
plt.savefig(os.path.join(figs_path, fig_name)) | ||
plt.close() | ||
except (AttributeError, ValueError): |
Check notice
Code scanning / CodeQL
Empty except Note
ax.set_yscale('log') | ||
ax.legend(loc='lower right') | ||
fig.savefig(os.path.join(figs_path, fig_name)) | ||
except (AttributeError, ValueError): |
Check notice
Code scanning / CodeQL
Empty except Note
# for i in range(self.model.n_reactions): | ||
# reactor.add_sensitivity_reaction(i) |
Check notice
Code scanning / CodeQL
Commented-out code Note
# for condition_data in self.all_data: | ||
# time, data_list, reaction_sensitivity_data, thermodynamic_sensitivity_data = condition_data | ||
# sa_dict['time'] = time.data | ||
# | ||
# # extract kinetic SA | ||
# for rxn in reaction_sensitivity_data: | ||
# # for kinetics, get `ethane(1)` from `dln[ethane(1)]/dln[k8]: H(6)+ethane(1)=H2(12)+C2H5(5)` | ||
# observable_label = rxn.label.split('[')[1].split(']')[0] | ||
# if observable_label not in sa_dict['kinetics']: | ||
# sa_dict['kinetics'][observable_label] = dict() | ||
# # for kinetics, get k8 from `dln[ethane(1)]/dln[k8]: H(6)+ethane(1)=H2(12)+C2H5(5)` then only extract 8 | ||
# parameter = rxn.label.split('[')[2].split(']')[0] | ||
# parameter = int(parameter[1:]) | ||
# sa_dict['kinetics'][observable_label][parameter] = rxn.data | ||
# | ||
# # extract thermo SA | ||
# for spc in thermodynamic_sensitivity_data: | ||
# # for thermo get 'C2H4(8)' from `dln[ethane(1)]/dH[C2H4(8)]` | ||
# observable_label = spc.label.split('[')[1].split(']')[0] | ||
# if observable_label not in sa_dict['thermo']: | ||
# sa_dict['thermo'][observable_label] = dict() | ||
# # for thermo get 'C2H4(8)' from `dln[ethane(1)]/dH[C2H4(8)]` | ||
# parameter = spc.label.split('[')[2].split(']')[0] | ||
# sa_dict['thermo'][observable_label][parameter] = spc.data |
Check notice
Code scanning / CodeQL
Commented-out code Note
|
||
from arc.common import save_yaml_file | ||
|
||
from rmgpy.chemkin import load_chemkin_file |
Check notice
Code scanning / CodeQL
Unused import Note
minor: schema
Also added descriptions to commented input f! schema
f! common f! common determine_concentrations_by_equivalence_ratios()
f! cantera idt canera idt working cantera idt cantera idt cantera idt Cantera IDT Round T,P values in figures' names
f! tests cantera ? cantera idt tests f! tests tst cantera idt f! cantera idt tests
Save sa_dict Added paths to main
f! test main mods
…lot. Also changed style to scatter plot with 100 points of simulations.
Added the Cantera IDT adapter
Allow users to specify "roles" (fuel, oxygen, nitrogen) to species, and compute equivalence ratios automatically