[Users] Achieve Cell-Center in NR simulation

Erik Schnetter schnetter at cct.lsu.edu
Mon Jun 24 10:21:38 CDT 2019


Steve

Carpet supports cell-centred refinement. To use it, you have to enable
it officially, and also (as mentioned by others) modify the boundary
conditions. With vertex centred refinement (the default), you need to
place grid points right onto the boundaries. With cell centring, you
need to ensure that all cell centres ("grid points") straddle the
boundaries. It is also necessary to use CoordBase to set up the domain
and boundaries, which you already do.

Set

Carpet::refinement_centering = "cell"

CoordBase::boundary_staggered_{x,y,z}{lower,upper} = yes
CoordBase::boundary_shiftout_{x,y,z}{lower,upper} = 0   # this is also
the default

ReflectionSymmetry::avoid_origin_{x,y,z} = yes   # this is also the default
ReflectionSymmetry::avoid_origin_upper_{x,y,z} = yes   # this is also
the default

I find it convenient to enable 1D ASCII output for a certain variable
(e.g. the lapse) and then study this file, looking at the coordinates
of the quantity that is output. These coordinates are the cell
centres. Compare this to your expectation. For example, these
coordinate must straddle the origin; if you have a symmetry, then the
number of symmetry points (i.e. the number of points with negative
coordinates) must be the same as the number of ghost points (probably
3); fine grid points must straddle the coarse grid points, etc.

If this works, then do this for another resolution, e.g. refining by a
factor of 2. (I am talking about a convergence test here, not about
AMR mesh refinement.) In this case, the new (finer) cell boundaries
must be exactly aligned with the old (coarser) cells. For this test, I
like to set up grid such that the number of higher-resolution cells is
exactly twice the number of finer-resolution cells.

If these two tests work, then you have a consistent grid structure. If
this doesn't work, then there is a slight inconsistency that will make
proper convergence tests and/or comparison of norms to analytic
solutions impossible. I will be happy to help further.

It also helps me to draw sketches on a blackboard, e.g. drawing as
square that is then subdivided into four squares. The locations of the
centres of the squares are the grid points. All boundaries must be
aligned with an edge of a square. The thorn CoordBase has some 1D
sketches that might also help.

-erik

On Sun, Jun 23, 2019 at 4:10 AM Steve Hawk <steve-hawk1998 at outlook.com> wrote:
>
> Hello:
> Thanks for giving some hints about adaptive mesh refinement with the help of Roland, but I feel sorry that I came across some new problems about cell-centering when I try to simulate "the transition from wormholes to trumpets” considering Schwartzchild metric.
>
> Since the singularity (0,0,0) exists under the metric of Schwartzchild, I want to make use of cell-centered method to avoid the singularity. Although there is an option CartGrid3D::avoid_origin = “yes” in the thorn CartGrid3D, it seems that it doesn’t works properly: the data related to the grid points (0,0,0) is still been calculated (very large!). The related par file is attached in the attachment.
>
> So I am wondering is there a method to solve the problem or any parameters of thorns governing the cell-centering methods?
>
>
> Thanks!
> Best Regards!
>
>
> Xiaoxiao
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/


More information about the Users mailing list