Skip to content

Commit

Permalink
f idt
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Nov 20, 2024
1 parent d41d985 commit 989c91d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t3/simulate/cantera_IDT.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import List, Optional, Tuple
import concurrent.futures as cf
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
import os
import traceback

Expand Down Expand Up @@ -437,6 +438,9 @@ def compute_idt(time_history: ct.SolutionArray,
plt.xlabel('Time (s)')
plt.ylabel(f'[{radical_label}]')
plt.title(f'IDT = {idt:.2e} s')
ax = plt.gca()
ax.xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
ax.xaxis.get_major_formatter().set_scientific(True)
if times[idt_index_c] > times[idt_index_dc_dt] * 2.5:
x_min = min(times[idt_index_dc_dt] * 0.8, times[np.argmax(concentration)] * 0.1)
x_max = max(times[idt_index_dc_dt] * 1.2, times[np.argmax(concentration)] * 1.5)
Expand Down

0 comments on commit 989c91d

Please sign in to comment.