I am trying to setup a simple simulation using CarpetRegrid2's AMR
capability. As Erik has already pointed out to me (off list), the
adaptive-refinement triggering code is still under development.
Nevertheless, I would really like to get it working.
In my current test case, I am using Kranc to solve a Klein-Gordon
equation (with a non-linear potential). With the provided initial
conditions, the system has an expanding bubble. This works well when
refinement is turned off. To be clear, the evolution equation is:
evolCalc =
{
Name -> "SFBubble_Evolve",
Schedule -> {"in MoL_CalcRHS"},
Where -> Interior,
Shorthands -> {},
Equations -> {
dot[chi] -> chiM,
dot[chiM] -> PD[chi,li,lj] Euc[ui,uj] - Vchi[chi]
}
};
where Vchi[chi_] := V'[chi] (V is the potential). The AMR level_mask is
set by:
lvlmskSet =
{
Name -> "SFBubble_SetLevelMask",
Schedule -> {"AT preregrid"},
Where -> Interior,
Shorthands -> { adchix, adchiy, adchiz },
Equations ->
{
adchix -> fabs[dx PD[chi,1]],
adchiy -> fabs[dy PD[chi,2]],
adchiz -> fabs[dz PD[chi,3]],
"level_mask" -> (
Max[
adchix, adchiy, adchiz
]/dchimax
) /. Max[a_, b_, c_] -> fmax[a, fmax[b, c]]
}
};
(in words: the value of chi should not change by more than dchimax over
the length of one grid cell)
I am using the Periodic thorn to provide periodic boundary conditions.
I've attached six pictures. They are at t = 0, the first level 1
intermediate time step, and the first coarse time step. The first three
pictures are the value of chi on a slice through the middle of the box.
The second three pictures are the value of level_mask. As can be seen in
the second chi image, the interpolation into the refined region seems to
be incorrect. The "boundary" seems to have appeared in the middle of the
block. I have also attached the block descriptions. Is there something I
could be doing incorrectly which would cause this? Otherwise, does
anyone have any ideas on where to look for the problem?
I am using the trunk version as of this morning.
Thank you in advance,
Hal
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory