Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
59cad2e
setup toml for testing
chongchonghe Jun 13, 2026
9376b3f
use ben's integrator params
chongchonghe Jun 13, 2026
7a7b66f
chore: set physically appropriate ODE tolerances in DTypeFront.toml
chongchonghe Jun 13, 2026
bf5a9da
fix: correct atol_rad_num to prevent VODE from stepping N_gamma negative
chongchonghe Jun 13, 2026
a50228c
nx=8
chongchonghe Jun 13, 2026
0779a80
feat: subtract radiation floor from N_gamma passed to VODE chemistry
chongchonghe Jun 15, 2026
7228371
fix: use T=1K physical Erad_floor so dark cells don't ionize; revert …
chongchonghe Jun 15, 2026
6a2019a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 15, 2026
97ad771
fix: lower Erad_floor to T=0.1K, remove timestep cap
chongchonghe Jun 15, 2026
7ad29fe
update plan
chongchonghe Jun 15, 2026
b890266
feat(photochem): add SetAtolFromPhysics to derive VODE atol from phys…
chongchonghe Jun 15, 2026
2ef204e
fix(photochem): use fixed radiation_failure_tolerance=0.01, lower Era…
chongchonghe Jun 15, 2026
e07527b
docs: show derived atol values as comments in DTypeFront.toml
chongchonghe Jun 15, 2026
eb18f0b
docs: document integrator parameters in parameters.md
chongchonghe Jun 15, 2026
d3c8bfb
fix(photochem): abort when no integrator tolerances are specified
chongchonghe Jun 15, 2026
3168f80
docs: clarify when typical_* parameters are required in parameters.md
chongchonghe Jun 15, 2026
1e64722
docs: simplify atol/N_floor check to temperature-only formula
chongchonghe Jun 15, 2026
86366df
docs: rewrite photoionization.md for clarity and consistency
chongchonghe Jun 15, 2026
52a23a2
docs: replace "1 ppm" with "one millionth" for clarity
chongchonghe Jun 15, 2026
2608401
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 15, 2026
3ae4d47
fix(docs): add photoionization.md to mdBook SUMMARY.md
chongchonghe Jun 15, 2026
2faacb8
cleanup
chongchonghe Jun 15, 2026
84f5ac9
revert nx
chongchonghe Jun 15, 2026
7eee4c6
ci: scope AMD GPU pipeline to DTypeFront only
chongchonghe Jun 15, 2026
6045d2c
ci: scope CUDA pipeline to DTypeFront only
chongchonghe Jun 15, 2026
1325b15
doc
chongchonghe Jun 15, 2026
f7f0651
test: set DTypeFront to 8^3 grid for GPU CI validation
chongchonghe Jun 15, 2026
cfd6019
Revert "test: set DTypeFront to 8^3 grid for GPU CI validation"
chongchonghe Jun 15, 2026
94a6133
perf(photochem): exclude radiation flux from VODE convergence checks
chongchonghe Jun 16, 2026
ac94d46
update submodule Microphysics
chongchonghe Jun 16, 2026
20febea
ci: add temporary scope comments to DTypeFront-only pipelines
chongchonghe Jun 16, 2026
9c64393
docs: qualify radiation_failure_tolerance default for low-density env…
chongchonghe Jun 16, 2026
533fc4f
docs: fix radiation_failure_tolerance rule of thumb
chongchonghe Jun 16, 2026
02a5dc0
fix(photochem): derive atol_rad_num from T_min, keep radiation_failur…
chongchonghe Jun 16, 2026
64e97f1
docs: describe typical_minimal_radiation_T as cold gas temperature
chongchonghe Jun 16, 2026
e64686b
set to 20 ts
chongchonghe Jun 16, 2026
379fe09
docs: explain why flux is excluded from VODE convergence checks
chongchonghe Jun 16, 2026
3897c74
docs: complete photoionization documentation, fix flux explanation
chongchonghe Jun 16, 2026
00550cc
docs: use LaTeX math throughout photoionization documentation
chongchonghe Jun 16, 2026
fa30d5c
vode
chongchonghe Jun 16, 2026
e7d34c8
Merge branch 'development' into chong/photo-opt2
chongchonghe Jun 21, 2026
814304e
update Microphysics
chongchonghe Jun 21, 2026
6ad318e
refactor(photochem): use hard-coded atol/rtol in DTypeFront instead o…
chongchonghe Jun 21, 2026
aa3d85a
refactor(photochem): update atol/rtol for OneZone and Stromgren tests
chongchonghe Jun 21, 2026
5e31e14
ci: scope GPU pipelines to DTypeFront and StromgrenSphere tests
chongchonghe Jun 21, 2026
547a8fa
refactor(photochem): add species_failure_tolerance aligned with atol_…
chongchonghe Jun 21, 2026
45001c1
perf(DTypeFront): raise atol_rad_num to 5e-2 and radiation_failure_to…
chongchonghe Jun 21, 2026
9efd639
remove some unused parameters from dock
chongchonghe Jun 21, 2026
08147cf
docs(photoionization): add beta definition, Krumholz 2007 cooling, an…
chongchonghe Jun 21, 2026
707a1be
feat(photochem): guard against simultaneous resampled cooling and pho…
chongchonghe Jun 22, 2026
9cd4b9f
fix(photochem): gate Jacobian column-5 entries on the rn[0] clamp
chongchonghe Jun 22, 2026
b5ff7b1
docs(photoionization): remove SetAtolFromPhysics/derived-atol sections
chongchonghe Jun 22, 2026
55d912e
add bib
chongchonghe Jun 22, 2026
d9b4ddb
Address Ben's review: radiation_failure_tolerance factor, citations, …
chongchonghe Jun 22, 2026
ebf8002
Merge branch 'development' into chong/photo-opt2
chongchonghe Jun 22, 2026
f98d2f4
fix(Stromgren): set atol_rad_num same order as atol_spec per Ben's re…
chongchonghe Jun 22, 2026
d7a2c07
kurmholz :
chongchonghe Jun 23, 2026
c9c4a81
docs(photoionization): clarify species/radiation failure tolerance roles
chongchonghe Jun 23, 2026
ad12f38
Merge branch 'development' into chong/photo-opt2
chongchonghe Jun 23, 2026
cef8805
rewrite
chongchonghe Jun 23, 2026
ca45302
revert CI
chongchonghe Jun 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions inputs/DTypeFront.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ amr.v = 0 # verbosity in Amr
# *****************************************************************
# Resolution and refinement
# *****************************************************************
amr.n_cell = [64, 64, 64]
amr.n_cell = [8, 8, 8]
amr.max_level = 0 # number of levels = max_level + 1
amr.blocking_factor = 32 # grid size must be divisible by this
amr.blocking_factor = 8 # grid size must be divisible by this
amr.max_grid_size = 128 # at least 128 for GPUs
do_reflux = 0
do_subcycle = 0
suppress_output = 0

max_timesteps = 10000
stop_time = 2.9e12

stromgen.primary_species_1 = 1.0e-10
Expand All @@ -39,7 +38,20 @@ integrator.subtract_internal_energy = 0
integrator.X_reject_buffer = 1e100
integrator.ode_max_steps = 50000

plotfile_interval = 1000000
plotfile_interval = -1
plotfile_prefix = "DType"

network.allow_mixed_cell_cooling = 0


max_timesteps = 10

integrator.atol_spec = 1e-3 # cm^-3; 1e-4 × n_H = physical negligibility floor
integrator.rtol_spec = 1e-2
integrator.atol_rad_num = 1e-2 # cm^-3; must exceed N_gamma_floor = Erad_floor/E_photon ~ 3.5e-4 so dark cells return in one VODE step
integrator.radiation_failure_tolerance = 0.1 # N_gamma can dip to -atol_rad_num = -0.01 in cells where photons are fully absorbed; must exceed atol_rad_num
integrator.rtol_rad_num = 1e-2
integrator.atol_rad_flux = 1e-2 # normalized flux (dimensionless); crossover y_cross = atol/rtol = 1, always absolute control
integrator.rtol_rad_flux = 1e-2
integrator.atol_enuc = 1.24e8 # erg/g; ~2.5% of e at T=37 K neutral gas
integrator.rtol_enuc = 1e-2
6 changes: 4 additions & 2 deletions src/networks/photoionization/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void actual_rhs(const burn_t &state, Ar
const amrex::Real n_e = state.xn[0];
const amrex::Real n_HI = state.xn[1];
const amrex::Real n_HII = state.xn[2];
const amrex::Real n_gamma = state.rn[0];
const amrex::Real n_gamma =
amrex::max(state.rn[0], 0.0_rt); // clamp at zero: prevents sign reversal if VODE steps rn[0] slightly negative within tolerance
const amrex::Real n_gamma_flux = state.rn[1];

int molecular_process_switch = 1;
Expand Down Expand Up @@ -174,7 +175,8 @@ template <class MatrixType> AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void actual
const amrex::Real n_e = state.xn[0];
const amrex::Real n_HI = state.xn[1];
const amrex::Real n_HII = state.xn[2];
Comment thread
chongchonghe marked this conversation as resolved.
const amrex::Real n_gamma = state.rn[0];
const amrex::Real n_gamma =
amrex::max(state.rn[0], 0.0_rt); // clamp at zero: prevents sign reversal if VODE steps rn[0] slightly negative within tolerance
Comment thread
BenWibking marked this conversation as resolved.
const amrex::Real n_gamma_flux = state.rn[1];

int molecular_process_switch = 1;
Expand Down
3 changes: 2 additions & 1 deletion src/problems/DTypeFront/testDTypeFront.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ template <> struct Physics_Traits<DTypeFront> {

template <> struct RadSystem_Traits<DTypeFront> {
static constexpr double c_hat_over_c = c_hat / C::c_light;
static constexpr double Erad_floor = 1e-99;
static constexpr double Erad_floor =
Comment thread
BenWibking marked this conversation as resolved.
Outdated
C::a_rad * 1.0; // a_rad * (1 K)^4; N_gamma_floor ~ 3.5e-4 cm^-3 < atol_rad_num, negligible ionization over 10 steps
static constexpr int beta_order = 0;
static constexpr auto ChemBands() { return ChemBandsHeader_; }
};
Expand Down
Loading