From ebf32895e8e1f72142211e705703ad8598461b6d Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Tue, 24 Sep 2024 10:04:36 -0700 Subject: [PATCH] add commented out option for a donut of scalar in Advection --- Exec/Advection/prob.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Exec/Advection/prob.cpp b/Exec/Advection/prob.cpp index e37ab47..b90b4db 100644 --- a/Exec/Advection/prob.cpp +++ b/Exec/Advection/prob.cpp @@ -114,12 +114,18 @@ init_custom_prob( const Real r2 = x*x + y*y; const Real rad = 0.1 * (prob_hi[0]-prob_lo[0]); const Real radsq = rad*rad; + const Real rad_inner = 0.05 * (prob_hi[0]-prob_lo[0]); + const Real rad_inner_sq = rad_inner*rad_inner; if (l_use_salt) { state(i,j,k,Salt_comp)= S0; } + // Single circle of scalar (default) state(i, j, k, Scalar_comp) = std::exp(-r2/(2.*radsq)); + + // Donut of scalar + //state(i, j, k, Scalar_comp) = 1.25 * (std::exp(-r2/(2.*radsq)) - std::exp(-r2/(2*rad_inner_sq))); }); // Construct a box that is on x-faces