@@ -63,6 +63,29 @@ analytic solution, giving:
6363 (256, 512) 2.437072009e-05
6464```
6565
66+ ## 2-d Spherical Geometry
67+
68+ An analytic convergence test with 2D spherical geometry is done
69+ using the initial condition constructed with spherical-bessel function
70+ and legendre polynomial, which tests both radial and theta dependence.
71+ Run with:
72+
73+ ```
74+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.bessel amr.n_cell=64 64
75+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.bessel amr.n_cell=128 128
76+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.bessel amr.n_cell=256 256
77+ ```
78+
79+ After each run, the norm of the errror against the analytic solution
80+ shows 2nd order accuracy:
81+
82+ ```
83+ base resolution L-inf error
84+ (64 , 64) 0.0008168088258
85+ (128, 128) 0.0002035772451
86+ (256, 256) 5.109916938e-05
87+ ```
88+
6689
6790## SDC-4 in 1-d
6891
@@ -252,3 +275,72 @@ Temp& 1.770452e-06 & 3.966033724 & 1.132894e-07 \\
252275```
253276
254277e.g. we see fourth-order convergence in the temperature
278+
279+
280+ ## 2-d spherical geometry (with AMR)
281+
282+ We use a non-center Gaussian initial condition to test
283+ resolution convergence and AMR for 2D spherical geometry.
284+
285+ First compile with power law conductivity:
286+
287+ ```
288+ make DIM=2 CONDUCTIVITY_DIR=powerlaw -j 20
289+ ```
290+
291+ Now run using:
292+
293+ ```
294+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.gaussian amr.plot_per = 0.001 amr.n_cell=32 32 castro.fixed_dt=3.2e-6
295+ mv diffuse_plt00314 diffuse_sph_32
296+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.gaussian amr.plot_per = 0.001 amr.n_cell=64 64 castro.fixed_dt=1.6e-6
297+ mv diffuse_plt00626 diffuse_sph_64
298+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.gaussian amr.plot_per = 0.001 amr.n_cell=128 128 castro.fixed_dt=8.e-7
299+ mv diffuse_plt01251 diffuse_sph_128
300+ ./Castro2d.gnu.MPI.ex inputs.2d.sph.gaussian amr.plot_per = 0.001 amr.n_cell=256 256 castro.fixed_dt=4.e-7
301+ mv diffuse_plt02501 diffuse_sph_256
302+ ```
303+
304+ Now use the RichardsonConvergence Script:
305+
306+ ```
307+ ./RichardsonConvergenceTest2d.gnu.ex coarFile=diffuse_sph_32 mediFile=diffuse_sph_64 fineFile=diffuse_sph_128 > convergence_diffusion.2d.lo.out
308+ ./RichardsonConvergenceTest2d.gnu.ex coarFile=diffuse_sph_64 mediFile=diffuse_sph_128 fineFile=diffuse_sph_256 > convergence_diffusion.2d.hi.out
309+ ```
310+
311+ For the lower resolution runs, e.g. ` convergence_diffusion.2d.lo.out ` :
312+
313+ ```
314+ Level L1 norm of Error in Each Component
315+ -----------------------------------------------
316+ rho_E 2.681136e-04 1.811933 7.636120e-05
317+ rho_e 2.681136e-04 1.811933 7.636120e-05
318+ Temp 2.681136e-04 1.811933 7.636120e-05
319+ pressure 1.787424e-04 1.811933 5.090747e-05
320+ soundspeed 1.458607e+00 1.797880 4.194908e-01
321+ entropy 2.867059e+04 1.786225 8.312456e+03
322+ thermal_cond 6.322558e-04 1.841497 1.764196e-04
323+ diff_coeff 6.322558e-04 1.841497 1.764196e-04
324+ diff_term 2.631251e-01 1.915835 6.973300e-02
325+ ```
326+
327+ For the higher resolution run, e.g. ` convergence_diffusion.2d.hi.out ` :
328+
329+ ```
330+ Level L1 norm of Error in Each Component
331+ -----------------------------------------------
332+ Warning: BoxArray lengths are not the same at level 0
333+ level: 0
334+ Warning: BoxArray lengths are not the same at level 1
335+ level: 1
336+ Warning: BoxArray lengths are not the same at level 0
337+ rho_E 7.636120e-05 2.046783 1.848118e-05
338+ rho_e 7.636120e-05 2.046783 1.848118e-05
339+ Temp 7.636120e-05 2.046783 1.848118e-05
340+ pressure 5.090747e-05 2.046783 1.232079e-05
341+ soundspeed 4.194908e-01 2.034310 1.024081e-01
342+ entropy 8.312456e+03 2.020431 2.048891e+03
343+ thermal_cond 1.764196e-04 2.066769 4.211021e-05
344+ diff_coeff 1.764196e-04 2.066769 4.211021e-05
345+ diff_term 6.973300e-02 1.903361 1.864102e-02
346+ ```
0 commit comments