Skip to content

Commit

Permalink
add changes for 24.12
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Nov 30, 2024
1 parent 362e87f commit 4bf3b28
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 11 deletions.
26 changes: 26 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 15 additions & 10 deletions Exec/science/xrb_spherical/inputs.He.1000Hz
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
15 changes: 14 additions & 1 deletion Source/hydro/Castro_ctu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<Real>(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");
}

});
}

Expand Down
2 changes: 2 additions & 0 deletions Source/hydro/trace_ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -108,6 +109,7 @@ Castro::trace_ppm(const Box& bx,
break;
}
}
#endif
}
#endif

Expand Down

0 comments on commit 4bf3b28

Please sign in to comment.