-
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
Open
alongd
wants to merge
19
commits into
main
Choose a base branch
from
idt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
examples
Module common
Module main
Module schema
Module simulate
tests
labels
May 2, 2024
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
'except' clause does nothing but pass and there is no explanatory comment.
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
'except' clause does nothing but pass and there is no explanatory comment.
Comment on lines
+161
to
+162
# for i in range(self.model.n_reactions): | ||
# reactor.add_sensitivity_reaction(i) |
Check notice
Code scanning / CodeQL
Commented-out code Note
This comment appears to contain commented-out code.
Comment on lines
+262
to
+285
# 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
This comment appears to contain commented-out code.
|
||
from arc.common import save_yaml_file | ||
|
||
from rmgpy.chemkin import load_chemkin_file |
Check notice
Code scanning / CodeQL
Unused import Note
Import of 'load_chemkin_file' is not used.
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the Cantera IDT adapter
Allow users to specify "roles" (fuel, oxygen, nitrogen) to species, and compute equivalence ratios automatically