From 141747ae0a1523db13065f793748ee44bf02d655 Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Fri, 12 Sep 2025 11:04:14 -0700 Subject: [PATCH 1/5] best guess --- .../Tests/circuits/Candice/inputs_candice20 | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/Examples/Tests/circuits/Candice/inputs_candice20 b/Examples/Tests/circuits/Candice/inputs_candice20 index f71a78cd7..e6b03063c 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice20 +++ b/Examples/Tests/circuits/Candice/inputs_candice20 @@ -1,9 +1,7 @@ -# See parameters in https://github.com/ECP-WarpX/artemis/pull/43 - ################################ ####### GENERAL PARAMETERS ###### ################################# -max_step = 1 +max_step = 5000000 amr.n_cell = n_cellx n_celly n_cellz amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez @@ -20,14 +18,12 @@ amr.max_level = 0 boundary.field_lo = pml pml pml boundary.field_hi = pml pml pml -my_constants.offset_y = -1100.e-6 - ################################# ############ NUMERICS ########### ################################# warpx.verbose = 1 -warpx.cfl = 0.8 +warpx.cfl = 0.6 # vacuum or macroscopic algo.em_solver_medium = macroscopic @@ -35,12 +31,12 @@ algo.em_solver_medium = macroscopic # laxwendroff or backwardeuler algo.macroscopic_sigma_method = laxwendroff -macroscopic.sigma_function(x,y,z) = "sigma_0 + (sigma_si - sigma_0) * (z <= h_si)" -macroscopic.epsilon_function(x,y,z) = "eps_0 + eps_0 * (eps_r_si - 1.) * (z <= h_si)" -macroscopic.mu_function(x,y,z) = "mu_0 + mu_0 * (mu_r_si - 1.) * (z <= h_si)" +macroscopic.sigma_function(x,y,z) = "sigma_0" +macroscopic.epsilon_function(x,y,z) = "eps_0 + eps_0 * (eps_r_si - 1.) * (z <= h_bot) + eps_0 * (eps_r_si - 1.) * (z >= h_top)" +macroscopic.mu_function(x,y,z) = "mu_0" -macroscopic.npy_k_index = 0 -macroscopic.npy_k_index2 = 3 +macroscopic.npy_k_index = 98 # should be n_cellz/2-"3um" +macroscopic.npy_k_index2 = 100 # should be n_cellz/2 # comment for PEC, uncomment these for GDS-PEC macroscopic.sigma_npy_file = "voyageurs_layer1.npy" @@ -50,7 +46,7 @@ algo.use_PEC_mask = 1 macroscopic.mu_npy_file = "voyageurs_layer1.npy" macroscopic.mu_npy_file2 = "voyageurs_layer2.npy" -macroscopic.mu_npy_value = 1.25663706e-06 +macroscopic.mu_npy_value = 1.25663707e-06 ################################# ############ FIELDS ############# @@ -62,11 +58,11 @@ macroscopic.mu_npy_value = 1.25663706e-06 ############### my_constants.n_cellx = 7544 my_constants.n_celly = 7544 -my_constants.n_cellz = 4 +my_constants.n_cellz = 200 my_constants.max_grid_sizex = 92 my_constants.max_grid_sizey = 92 -my_constants.max_grid_sizez = 4 +my_constants.max_grid_sizez = 200 my_constants.blocking_factor = 2 my_constants.prob_lox = 0. @@ -94,9 +90,10 @@ my_constants.mu_0 = 1.25663706212e-06 my_constants.mu_r_si = 1.0 ############### -# silicon and palladium cross section +# layer heights ############### -my_constants.h_si = 150.e-6 +my_constants.h_top = 150.e-6 +my_constants.h_bot = 147.e-6 ############### # derived quantities and fundamental constants - don't touch these @@ -104,7 +101,7 @@ my_constants.h_si = 150.e-6 my_constants.pi = 3.14159265358979 -my_constants.freq = 8.6e9 +my_constants.freq = 7.5e9 my_constants.TP = 1./freq # grid spacing @@ -127,13 +124,22 @@ my_constants.flag_ss = 2 warpx.E_excitation_on_grid_style = parse_E_excitation_grid_function warpx.Ex_excitation_flag_function(x,y,z) = "flag_none" -warpx.Ey_excitation_flag_function(x,y,z) = "flag_ss * 0" +# thin excitation +warpx.Ey_excitation_flag_function(x,y,z) = "flag_ss * ( (y >= 702.5e-6 + ddy) * (y <= 712.5e-6 - ddy) + (y >= 717.5e-6 + ddy) * (y <= 727.5e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 162.5e-6 - ddx) * (x < 162.5e-6 + ddx)" +# excitation near left boundary +#warpx.Ey_excitation_flag_function(x,y,z) = "flag_ss * ( (y >= 531.25e-6 + ddy) * (y <= 623.75e-6 - ddy) + (y >= 806.25e-6 + ddy) * (y <= 898.75e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 1.25e-6 - ddx) * (x < 1.25e-6 + ddx)" + warpx.Ez_excitation_flag_function(x,y,z) = "flag_none" # This is a source on a qubit control line warpx.Ex_excitation_grid_function(x,y,z,t) = "0." -warpx.Ey_excitation_grid_function(x,y,z,t) = "0." +# thin excitation +warpx.Ey_excitation_grid_function(x,y,z,t) = "exp(-(t-3*TP)**2/(2*TP**2))*sin(2*pi*freq*t) * + ( (y >= 702.5e-6 + ddy) * (y <= 712.5e-6 - ddy) - (y >= 717.5e-6 + ddy) * (y <= 727.5e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 162.5e-6 - ddx) * (x < 162.5e-6 + ddx)" +# excitation near left boundary +#warpx.Ey_excitation_grid_function(x,y,z,t) = "exp(-(t-3*TP)**2/(2*TP**2))*sin(2*pi*freq*t) * +# ( (y >= 531.25e-6 + ddy) * (y <= 623.75e-6 - ddy) - (y >= 806.25e-6 + ddy) * (y <= 898.75e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 1.25e-6 - ddx) * (x < 1.25e-6 + ddx)" warpx.Ez_excitation_grid_function(x,y,z,t) = "0." ############### @@ -146,7 +152,9 @@ warpx.particle_io_nfiles=64 diagnostics.diags_names = plt ############### # full plotfiles -plt.intervals = 1 -plt.fields_to_plot = Ex Ey Ez Bx By Bz mu +plt.intervals = 1000 +plt.fields_to_plot = Ex Ey Ez Bx By Bz mu epsilon plt.diag_type = Full plt.file_min_digits = 7 +plt.diag_lo = 0. 0. 145.51e-6 +plt.diag_hi = 9430.e-6 9430.e-6 151.49e-6 From b99f6016a78013d711cdd5a2f282b1be9a66a544 Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Fri, 12 Sep 2025 12:56:18 -0700 Subject: [PATCH 2/5] checkpointing --- Examples/Tests/circuits/Candice/inputs_candice20 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Examples/Tests/circuits/Candice/inputs_candice20 b/Examples/Tests/circuits/Candice/inputs_candice20 index e6b03063c..c3e291fcc 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice20 +++ b/Examples/Tests/circuits/Candice/inputs_candice20 @@ -149,7 +149,7 @@ warpx.Ez_excitation_grid_function(x,y,z,t) = "0." warpx.field_io_nfiles=64 warpx.particle_io_nfiles=64 -diagnostics.diags_names = plt +diagnostics.diags_names = plt chk ############### # full plotfiles plt.intervals = 1000 @@ -158,3 +158,8 @@ plt.diag_type = Full plt.file_min_digits = 7 plt.diag_lo = 0. 0. 145.51e-6 plt.diag_hi = 9430.e-6 9430.e-6 151.49e-6 + +chk.intervals = 100000 +chk.diag_type = Full +chk.format = checkpoint +chk.file_min_digits = 7 From de09cc890d61692ceae7f930b4b4d05bca3a7d5e Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Fri, 12 Sep 2025 13:08:27 -0700 Subject: [PATCH 3/5] refine_grid_layout=0 --- Examples/Tests/circuits/Candice/inputs_candice20 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/Tests/circuits/Candice/inputs_candice20 b/Examples/Tests/circuits/Candice/inputs_candice20 index c3e291fcc..cf6bc047d 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice20 +++ b/Examples/Tests/circuits/Candice/inputs_candice20 @@ -6,7 +6,7 @@ max_step = 5000000 amr.n_cell = n_cellx n_celly n_cellz amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez amr.blocking_factor = blocking_factor -amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids +amr.refine_grid_layout = 0 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids geometry.dims = 3 geometry.prob_lo = prob_lox prob_loy prob_loz From 5540177f812bfb862926497a1ac4b0d4cbcc7bb6 Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Fri, 12 Sep 2025 13:39:01 -0700 Subject: [PATCH 4/5] comment --- Examples/Tests/circuits/Candice/inputs_candice20 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Examples/Tests/circuits/Candice/inputs_candice20 b/Examples/Tests/circuits/Candice/inputs_candice20 index cf6bc047d..967aee185 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice20 +++ b/Examples/Tests/circuits/Candice/inputs_candice20 @@ -126,9 +126,6 @@ warpx.E_excitation_on_grid_style = parse_E_excitation_grid_function warpx.Ex_excitation_flag_function(x,y,z) = "flag_none" # thin excitation warpx.Ey_excitation_flag_function(x,y,z) = "flag_ss * ( (y >= 702.5e-6 + ddy) * (y <= 712.5e-6 - ddy) + (y >= 717.5e-6 + ddy) * (y <= 727.5e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 162.5e-6 - ddx) * (x < 162.5e-6 + ddx)" -# excitation near left boundary -#warpx.Ey_excitation_flag_function(x,y,z) = "flag_ss * ( (y >= 531.25e-6 + ddy) * (y <= 623.75e-6 - ddy) + (y >= 806.25e-6 + ddy) * (y <= 898.75e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 1.25e-6 - ddx) * (x < 1.25e-6 + ddx)" - warpx.Ez_excitation_flag_function(x,y,z) = "flag_none" @@ -137,9 +134,6 @@ warpx.Ex_excitation_grid_function(x,y,z,t) = "0." # thin excitation warpx.Ey_excitation_grid_function(x,y,z,t) = "exp(-(t-3*TP)**2/(2*TP**2))*sin(2*pi*freq*t) * ( (y >= 702.5e-6 + ddy) * (y <= 712.5e-6 - ddy) - (y >= 717.5e-6 + ddy) * (y <= 727.5e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 162.5e-6 - ddx) * (x < 162.5e-6 + ddx)" -# excitation near left boundary -#warpx.Ey_excitation_grid_function(x,y,z,t) = "exp(-(t-3*TP)**2/(2*TP**2))*sin(2*pi*freq*t) * -# ( (y >= 531.25e-6 + ddy) * (y <= 623.75e-6 - ddy) - (y >= 806.25e-6 + ddy) * (y <= 898.75e-6 - ddy)) * (z > h_top - ddz) * (z < h_top + ddz) * (x > 1.25e-6 - ddx) * (x < 1.25e-6 + ddx)" warpx.Ez_excitation_grid_function(x,y,z,t) = "0." ############### @@ -153,7 +147,7 @@ diagnostics.diags_names = plt chk ############### # full plotfiles plt.intervals = 1000 -plt.fields_to_plot = Ex Ey Ez Bx By Bz mu epsilon +plt.fields_to_plot = Ex Ey Ez Bx By Bz mu plt.diag_type = Full plt.file_min_digits = 7 plt.diag_lo = 0. 0. 145.51e-6 @@ -163,3 +157,6 @@ chk.intervals = 100000 chk.diag_type = Full chk.format = checkpoint chk.file_min_digits = 7 + +# if you restart, remove mu, sigma, and epsilon from plotfile +#amr.restart = diags/chk0100000 From bbe8add97644f0851925c6ee06272d5aee707d60 Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Tue, 23 Sep 2025 13:49:05 -0700 Subject: [PATCH 5/5] fix max_grid_size --- Examples/Tests/circuits/Candice/inputs_PMLdemo | 4 +++- Examples/Tests/circuits/Candice/inputs_candice17 | 5 +++-- Examples/Tests/circuits/Candice/inputs_candice18 | 4 +++- Examples/Tests/circuits/Candice/inputs_candice19 | 4 +++- Examples/Tests/circuits/Candice/inputs_candice20 | 4 +++- Examples/Tests/circuits/Candice/inputs_inductor_on_cap | 4 +++- Examples/Tests/circuits/Candice/inputs_inductor_on_cap_PEC | 4 +++- Examples/Tests/circuits/Candice/inputs_inductortest | 4 +++- .../circuits/Candice/inputs_metal_quibit_circuit_8_qubit_v2 | 4 +++- Examples/Tests/circuits/Candice/inputs_singleresonator | 4 +++- 10 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Examples/Tests/circuits/Candice/inputs_PMLdemo b/Examples/Tests/circuits/Candice/inputs_PMLdemo index 5db7fd289..a946af0c0 100644 --- a/Examples/Tests/circuits/Candice/inputs_PMLdemo +++ b/Examples/Tests/circuits/Candice/inputs_PMLdemo @@ -6,7 +6,9 @@ max_step = 20000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_candice17 b/Examples/Tests/circuits/Candice/inputs_candice17 index 10d36524b..2f9acee09 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice17 +++ b/Examples/Tests/circuits/Candice/inputs_candice17 @@ -5,8 +5,9 @@ ################################# max_step = 1000000 -amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_candice18 b/Examples/Tests/circuits/Candice/inputs_candice18 index 70012faad..c6ed7ffb2 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice18 +++ b/Examples/Tests/circuits/Candice/inputs_candice18 @@ -6,7 +6,9 @@ max_step = 1000000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_candice19 b/Examples/Tests/circuits/Candice/inputs_candice19 index b700c737f..10866884e 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice19 +++ b/Examples/Tests/circuits/Candice/inputs_candice19 @@ -6,7 +6,9 @@ max_step = 10000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_candice20 b/Examples/Tests/circuits/Candice/inputs_candice20 index f71a78cd7..ba87c22be 100644 --- a/Examples/Tests/circuits/Candice/inputs_candice20 +++ b/Examples/Tests/circuits/Candice/inputs_candice20 @@ -6,7 +6,9 @@ max_step = 1 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_inductor_on_cap b/Examples/Tests/circuits/Candice/inputs_inductor_on_cap index 9230da7a7..948557744 100644 --- a/Examples/Tests/circuits/Candice/inputs_inductor_on_cap +++ b/Examples/Tests/circuits/Candice/inputs_inductor_on_cap @@ -6,7 +6,9 @@ max_step = 200000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_inductor_on_cap_PEC b/Examples/Tests/circuits/Candice/inputs_inductor_on_cap_PEC index 80cbacefb..398022c96 100644 --- a/Examples/Tests/circuits/Candice/inputs_inductor_on_cap_PEC +++ b/Examples/Tests/circuits/Candice/inputs_inductor_on_cap_PEC @@ -6,7 +6,9 @@ max_step = 200000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_inductortest b/Examples/Tests/circuits/Candice/inputs_inductortest index a5d875bad..dc1b0c243 100644 --- a/Examples/Tests/circuits/Candice/inputs_inductortest +++ b/Examples/Tests/circuits/Candice/inputs_inductortest @@ -6,7 +6,9 @@ max_step = 2000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_metal_quibit_circuit_8_qubit_v2 b/Examples/Tests/circuits/Candice/inputs_metal_quibit_circuit_8_qubit_v2 index e7e00be67..db8c2c259 100644 --- a/Examples/Tests/circuits/Candice/inputs_metal_quibit_circuit_8_qubit_v2 +++ b/Examples/Tests/circuits/Candice/inputs_metal_quibit_circuit_8_qubit_v2 @@ -6,7 +6,9 @@ max_step = 10 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids diff --git a/Examples/Tests/circuits/Candice/inputs_singleresonator b/Examples/Tests/circuits/Candice/inputs_singleresonator index 56f0cbc61..e4f838901 100644 --- a/Examples/Tests/circuits/Candice/inputs_singleresonator +++ b/Examples/Tests/circuits/Candice/inputs_singleresonator @@ -6,7 +6,9 @@ max_step = 10000 amr.n_cell = n_cellx n_celly n_cellz -amr.max_grid_size = max_grid_sizex max_grid_sizey max_grid_sizez +amr.max_grid_size_x = max_grid_sizex +amr.max_grid_size_y = max_grid_sizey +amr.max_grid_size_z = max_grid_sizez amr.blocking_factor = blocking_factor amr.refine_grid_layout = 1 # if n_MPI > n_grids, the grids will be successively divided in half until n_MPI <= n_grids