From 4bf3b289ea7ced041e559f807ff32588d7937f07 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sat, 30 Nov 2024 09:51:22 -0500 Subject: [PATCH] add changes for 24.12 --- CHANGES.md | 26 +++++++++++++++++++++ Exec/science/xrb_spherical/inputs.He.1000Hz | 25 ++++++++++++-------- Source/hydro/Castro_ctu.cpp | 15 +++++++++++- Source/hydro/trace_ppm.cpp | 2 ++ 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ed65cbc0b4..736dbe4685 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,29 @@ +# 24.12 + + * update clang-tidy CI (#2992, #3002) + + * fix `problo` != 0 in non-Cartesian coords (#3001) + + * fix `apply_av` in spherical (#3000) + + * update `xrb_spherical` analysis (#2999) + + * add spherical support to plm (#2996, #2997) + + * fix coverity issue (#2998) + + * fix geometric source term in ppm tracing for spherical (#2995) + + * fix dloga for non-radial direction in tracing (#2994) + + * fix `scale_flux` in 1d for Cartesian (#2991) + + * add the `xrb_spherical` problem setup (#2972) + + * add a new distance function that works for all geometries (#2990) + + * fix confusing geom name in derive (#2989) + # 24.11 * a new well-balanced method was added to the CTU PPM solver. This diff --git a/Exec/science/xrb_spherical/inputs.He.1000Hz b/Exec/science/xrb_spherical/inputs.He.1000Hz index 17864ed3f3..853731ef25 100644 --- a/Exec/science/xrb_spherical/inputs.He.1000Hz +++ b/Exec/science/xrb_spherical/inputs.He.1000Hz @@ -6,8 +6,8 @@ stop_time = 3.0 geometry.is_periodic = 0 0 geometry.coord_sys = 2 # 0 => cart, 1 => RZ 2=>spherical geometry.prob_lo = 1.1e6 0 -geometry.prob_hi = 1.13072e6 3.1415926 -amr.n_cell = 768 2304 #192 1152 +geometry.prob_hi = 1.13072e6 0.5235987755982988 +amr.n_cell = 96 144 #192 1152 # >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<< # 0 = Interior 3 = Symmetry @@ -27,10 +27,10 @@ castro.ambient_outflow_vel = 1 # WHICH PHYSICS castro.do_hydro = 1 -castro.do_react = 1 -castro.do_rotation = 1 +castro.do_react = 0 +castro.do_rotation = 0 castro.do_grav = 1 -castro.do_sponge = 1 +castro.do_sponge = 0 castro.small_temp = 1.e6 castro.small_dens = 1.e-5 @@ -39,7 +39,11 @@ castro.ppm_type = 1 castro.grav_source_type = 2 castro.use_pslope = 1 castro.ppm_well_balanced = 1 -castro.pslope_cutoff_density = 1.e4 +castro.pslope_cutoff_density = 1.e1 + +castro.difmag = 0.0 +castro.use_flattening = 0 +castro.use_geom_source = 0 gravity.gravity_type = ConstantGrav @@ -48,7 +52,7 @@ gravity.const_grav = -1.5e14 # 1000Hz Spinning Frequency # Might want to use a more realistic spinning frequency like 500Hz -castro.rotational_period = 0.001 +castro.rotational_period = 0.0 # Centrifugal is not important since NS would simply deform to accommodate for it castro.rotation_include_centrifugal = 0 @@ -91,7 +95,7 @@ amr.max_level = 0 #2 # maximum level number allowed amr.ref_ratio = 4 2 2 2 # refinement ratio amr.regrid_int = 2 2 2 2 # how often to regrid amr.blocking_factor = 16 # block factor in grid generation -amr.max_grid_size = 128 +amr.max_grid_size = 256 amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est # CHECKPOINT FILES @@ -100,7 +104,8 @@ amr.check_int = 250 # number of timesteps between checkpoints # PLOTFILES amr.plot_file = flame_wave_1000Hz_plt # root name of plotfile -amr.plot_per = 5.e-3 # number of seconds between plotfiles +#amr.plot_per = 5.e-3 # number of seconds between plotfiles +amr.plot_int = 1 amr.derive_plot_vars = ALL amr.small_plot_file = flame_wave_1000Hz_smallplt # root name of plotfile @@ -110,7 +115,7 @@ amr.derive_small_plot_vars = abar x_velocity y_velocity z_velocity enuc # problem initialization -problem.dtemp = 1.2e9 +problem.dtemp = 0 problem.theta_half_max = 1.745e-2 problem.theta_half_width = 5.279e-3 diff --git a/Source/hydro/Castro_ctu.cpp b/Source/hydro/Castro_ctu.cpp index 18756b0b71..c245b71d4c 100644 --- a/Source/hydro/Castro_ctu.cpp +++ b/Source/hydro/Castro_ctu.cpp @@ -29,6 +29,10 @@ Castro::consup_hydro(const Box& bx, { Real volinv = 1.0 / geometry_util::volume(i, j, k, geomdata); + if (n == UMY && i == 4 && j == 0) { + std::cout << "original velocities = " << U_new(i,j,k,UMX) << " " << U_new(i,j,k,UMY) << std::endl; + } + U_new(i,j,k,n) = U_new(i,j,k,n) + dt * ( flux0(i, j,k,n) * geometry_util::area(i, j, k, 0, geomdata) - flux0(i+1,j,k,n) * geometry_util::area(i+1, j, k, 0, geomdata) @@ -76,9 +80,18 @@ Castro::consup_hydro(const Box& bx, // Add gradp term to polar(theta) momentum equation for Spherical 2D geometry Real r = geomdata.ProbLo(0) + (static_cast(i) + 0.5_rt) * geomdata.CellSize(0); - U_new(i,j,k,UMY) += - dt * (qy(i,j+1,k,GDPRES) - qy(i,j,k,GDPRES)) / (r * geomdata.CellSize(1)); + //U_new(i,j,k,UMY) += - dt * (qy(i,j+1,k,GDPRES) - qy(i,j,k,GDPRES)) / (r * geomdata.CellSize(1)); #endif } + + if (n == UMY && i == 4 && j == 0) { + std::cout << "new velocities = " << U_new(i,j,k,UMX) << " " << U_new(i,j,k,UMY) << std::endl; + std::cout << "x fluxes: " << flux0(i, j, k, UMY) << " " << flux1(i+1, j, k, UMY) << std::endl; + std::cout << "y fluxes: " << flux1(i, j, k, UMY) << " " << flux1(i, j+1, k, UMY) << std::endl; + std::cout << "y pressures: " << qy(i,j,k,GDPRES) << " " << qy(i,j+1,k,GDPRES) << std::endl; + //amrex::Error("stop"); + } + }); } diff --git a/Source/hydro/trace_ppm.cpp b/Source/hydro/trace_ppm.cpp index a824fbb56f..b3cc378eb9 100644 --- a/Source/hydro/trace_ppm.cpp +++ b/Source/hydro/trace_ppm.cpp @@ -83,6 +83,7 @@ Castro::trace_ppm(const Box& bx, for (int n = 0; n < NQSRC; n++) { do_source_trace[n] = 0; +#if 0 // geometric source terms in r-direction for nonCartesian coordinate // or theta-direction in spherical coordinate need tracing @@ -108,6 +109,7 @@ Castro::trace_ppm(const Box& bx, break; } } +#endif } #endif