Skip to content
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
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Compute IDT and IDT SA using Cantera #150

wants to merge 41 commits into from

Conversation

alongd
Copy link
Member

@alongd alongd commented May 2, 2024

Added the Cantera IDT adapter
Allow users to specify "roles" (fuel, oxygen, nitrogen) to species, and compute equivalence ratios automatically

t3/simulate/cantera_IDT.py Fixed Show fixed Hide fixed
t3/simulate/cantera_IDT.py Fixed Show fixed Hide fixed
t3/simulate/cantera_IDT.py Fixed Show fixed Hide fixed
t3/simulate/cantera_IDT.py Fixed Show fixed Hide fixed
t3/simulate/cantera_IDT.py Fixed Show fixed Hide fixed
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.
"""

import os
import shutil

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'shutil' is not used.
Comment on lines +17 to +21
from t3.simulate.cantera_IDT import (CanteraIDT, DELTA_H, DELTA_K, calculate_arrhenius_rate_coefficient,
calculate_troe_rate_coefficient, calculate_chebyshev_rate_coefficient,
calculate_plog_rate_coefficient, get_Ea_units, get_h298, get_pressure_from_cantera,
get_t_and_p_lists, perturb_enthalpy, perturb_reaction_rate_coefficient,
plot_idt_vs_temperature)

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'plot_idt_vs_temperature' is not used.
Comment on lines +526 to +544
# def teardown_module():
# """
# A method that is run after all unit tests in this class.
# Delete all project directories created during these unit tests
# """
# for test_dir_path in [TEST_DIR, TEST_DIR_IDT]:
# log_archive = os.path.join(test_dir_path, 'log_archive')
# dirs = [log_archive]
# for dir_ in dirs:
# if os.path.isdir(dir_):
# shutil.rmtree(dir_, ignore_errors=True)
# files = [os.path.join(test_dir_path, 't3.log')]
# for file in files:
# if os.path.isfile(file):
# os.remove(file)
# for iteration in [0, 1, 2, 3, 4, 5]:
# figs_path = os.path.join(test_dir_path, f'iteration_{iteration}', 'Figures')
# if os.path.isdir(figs_path):
# shutil.rmtree(figs_path, ignore_errors=True)

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants