[Users] Achieve Cell-Center in NR simulation
Haas, Roland
rhaas at illinois.edu
Mon Jun 24 10:33:15 CDT 2019
Hello Steve,
using Carpet's cell centered refinement you should enable the
CarpetLib parameter:
CarpetLib::use_higher_order_restriction = "yes"
and possibly increase the default value of
CarpetLib::restriction_order_space
from its default value of 3. Note that values larger than 3 can be very
slow.
This parameter controls the polynomial order used by CarpetLib's
Lagrange restriction operators, which is used for example for the
metric quantities.
Otherwise (for *cell centered grids only*) CarpetLib uses linear
order (averaging) which is appropriate for cell averaged quantities
like the fluid density but not the best for quantities that are
sampled at the cell center like the metric.
CarpetLib's ENO and WENO operators are not affected by this option and
always use averaging for restriction.
Yours,
Roland
> 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
>
>
>
--
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20190624/f0e5bbb2/attachment-0001.bin
More information about the Users
mailing list