Skip to content

Commit 71eb243

Browse files
authored
Merge pull request #19 from jaykalinani/main
Apply radiative boundary conditions to Z4c variables
2 parents 96e5bcb + 0842024 commit 71eb243

File tree

57 files changed

+2589
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2589
-10
lines changed

NewRadX/configuration.ccl

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Configuration definition for thorn NewRadX
22

33
REQUIRES Loop
4+
5+
PROVIDES NewRadX
6+
{
7+
}

Z4c/configuration.ccl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Configuration definitions for thorn Z4C
22

3-
REQUIRES Arith Loop
3+
REQUIRES Arith Loop NewRadX

Z4c/interface.ccl

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ USES INCLUDE HEADER: sum.hxx
1414
USES INCLUDE HEADER: vec.hxx
1515
USES INCLUDE HEADER: vect.hxx
1616

17+
USES INCLUDE HEADER: newradx.hxx
1718

1819

1920
CCTK_INT FUNCTION GetCallFunctionCount()

Z4c/param.ccl

+45-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ BOOLEAN calc_constraints "Calculate constraints" STEERABLE=recover
1313
} yes
1414

1515

16-
1716
BOOLEAN set_Theta_zero "set Theta to zero, which converts Z4c to BSSN"
1817
{
1918
} no
@@ -57,3 +56,48 @@ CCTK_REAL epsdiss "Dissipation coefficient <arXiv:gr-qc/0610128>" STEERABLE=alwa
5756
{
5857
0.0:* :: ""
5958
} 0.32
59+
60+
KEYWORD boundary_conditions "boundary conditions"{
61+
"NewRadX" :: "radiative boundary conditions using NewRadX"
62+
"CarpetX" :: "use CarpetX default boundary conditions"
63+
} "CarpetX"
64+
65+
CCTK_INT n_chi "n power of outgoing boundary r^n fall off rate for chi"
66+
{
67+
0:2 :: "1 is reasonable"
68+
} 1
69+
70+
CCTK_INT n_gammat "n power of outgoing boundary r^n fall off rate for gammat_ij"
71+
{
72+
0:2 :: "1 is reasonable"
73+
} 1
74+
75+
CCTK_INT n_Kh "n power of outgoing boundary r^n fall off rate for Kh"
76+
{
77+
0:2 :: "Maybe 1?"
78+
} 1
79+
80+
CCTK_INT n_At "n power of outgoing boundary r^n fall off rate for At_ij"
81+
{
82+
0:2 :: "Maybe 1?"
83+
} 1
84+
85+
CCTK_INT n_Gamt "n power of outgoing boundary r^n fall off rate for Gamt^i"
86+
{
87+
0:2 :: "Maybe 1?"
88+
} 1
89+
90+
CCTK_INT n_Theta "n power of outgoing boundary r^n fall off rate for Theta"
91+
{
92+
0:2 :: "Maybe 1?"
93+
} 1
94+
95+
CCTK_INT n_alphaG "n power of outgoing boundary r^n fall off rate for alpha"
96+
{
97+
0:2 :: "1 is my guess"
98+
} 1
99+
100+
CCTK_INT n_betaG "n power of outgoing boundary r^n fall off rate for beta"
101+
{
102+
0:2 :: "1 is my guess"
103+
} 1

Z4c/schedule.ccl

+39-8
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,43 @@ SCHEDULE Z4c_RHS IN Z4c_RHSGroup
247247
WRITES: Theta_rhs(interior)
248248
WRITES: alphaG_rhs(interior)
249249
WRITES: betaG_rhs(interior)
250-
# SYNC: chi_rhs
251-
# SYNC: gamma_tilde_rhs
252-
# SYNC: K_hat_rhs
253-
# SYNC: A_tilde_rhs
254-
# SYNC: Gam_tilde_rhs
255-
# SYNC: Theta_rhs
256-
# SYNC: alphaG_rhs
257-
# SYNC: betaG_rhs
250+
SYNC: chi_rhs
251+
SYNC: gamma_tilde_rhs
252+
SYNC: K_hat_rhs
253+
SYNC: A_tilde_rhs
254+
SYNC: Gam_tilde_rhs
255+
SYNC: Theta_rhs
256+
SYNC: alphaG_rhs
257+
SYNC: betaG_rhs
258258
} "Calculate Z4c RHS"
259+
260+
if (CCTK_Equals(boundary_conditions, "NewRadX")) {
261+
SCHEDULE Z4c_apply_newradx_boundary_conditions IN Z4c_RHSGroup AFTER Z4c_RHS
262+
{
263+
LANG: C
264+
READS: chi(everywhere)
265+
READS: gamma_tilde(everywhere)
266+
READS: K_hat(everywhere)
267+
READS: A_tilde(everywhere)
268+
READS: Gam_tilde(everywhere)
269+
READS: Theta(everywhere)
270+
READS: alphaG(everywhere)
271+
READS: betaG(everywhere)
272+
READS: chi_rhs(everywhere)
273+
READS: gamma_tilde_rhs(everywhere)
274+
READS: K_hat_rhs(everywhere)
275+
READS: A_tilde_rhs(everywhere)
276+
READS: Gam_tilde_rhs(everywhere)
277+
READS: Theta_rhs(everywhere)
278+
READS: alphaG_rhs(everywhere)
279+
READS: betaG_rhs(everywhere)
280+
WRITES: chi_rhs(interior)
281+
WRITES: gamma_tilde_rhs(interior)
282+
WRITES: K_hat_rhs(interior)
283+
WRITES: A_tilde_rhs(interior)
284+
WRITES: Gam_tilde_rhs(interior)
285+
WRITES: Theta_rhs(interior)
286+
WRITES: alphaG_rhs(interior)
287+
WRITES: betaG_rhs(interior)
288+
} "Apply radiative boundary conditions to Z4c RHS variables using NewRadX"
289+
}

Z4c/src/apply_newrad.cxx

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Apply NewRadX boundary conditions to Z4c variables
2+
//=============================================================================
3+
4+
#include <cctk.h>
5+
#include <cctk_Arguments.h>
6+
#include <cctk_Parameters.h>
7+
#include <newradx.hxx>
8+
9+
using namespace NewRadX;
10+
11+
namespace Z4c {
12+
13+
extern "C" void Z4c_apply_newradx_boundary_conditions(CCTK_ARGUMENTS) {
14+
DECLARE_CCTK_ARGUMENTSX_Z4c_apply_newradx_boundary_conditions;
15+
DECLARE_CCTK_PARAMETERS;
16+
17+
NewRadX_Apply(cctkGH, chi, chi_rhs, 1, 1, n_chi);
18+
NewRadX_Apply(cctkGH, gammatxx, gammatxx_rhs, 1, 1, n_gammat);
19+
NewRadX_Apply(cctkGH, gammatxy, gammatxy_rhs, 0, 1, n_gammat);
20+
NewRadX_Apply(cctkGH, gammatxz, gammatxz_rhs, 0, 1, n_gammat);
21+
NewRadX_Apply(cctkGH, gammatyy, gammatyy_rhs, 1, 1, n_gammat);
22+
NewRadX_Apply(cctkGH, gammatyz, gammatyz_rhs, 0, 1, n_gammat);
23+
NewRadX_Apply(cctkGH, gammatzz, gammatzz_rhs, 1, 1, n_gammat);
24+
NewRadX_Apply(cctkGH, Kh, Kh_rhs, 0, 1, n_Kh);
25+
NewRadX_Apply(cctkGH, Atxx, Atxx_rhs, 0, 1, n_At);
26+
NewRadX_Apply(cctkGH, Atxy, Atxy_rhs, 0, 1, n_At);
27+
NewRadX_Apply(cctkGH, Atxz, Atxz_rhs, 0, 1, n_At);
28+
NewRadX_Apply(cctkGH, Atyy, Atyy_rhs, 0, 1, n_At);
29+
NewRadX_Apply(cctkGH, Atyz, Atyz_rhs, 0, 1, n_At);
30+
NewRadX_Apply(cctkGH, Atzz, Atzz_rhs, 0, 1, n_At);
31+
NewRadX_Apply(cctkGH, Gamtx, Gamtx_rhs, 0, 1, n_Gamt);
32+
NewRadX_Apply(cctkGH, Gamty, Gamty_rhs, 0, 1, n_Gamt);
33+
NewRadX_Apply(cctkGH, Gamtz, Gamtz_rhs, 0, 1, n_Gamt);
34+
NewRadX_Apply(cctkGH, Theta, Theta_rhs, 0, 1, n_Theta);
35+
NewRadX_Apply(cctkGH, alphaG, alphaG_rhs, 1, 1, n_alphaG);
36+
NewRadX_Apply(cctkGH, betaGx, betaGx_rhs, 0, 1, n_betaG);
37+
NewRadX_Apply(cctkGH, betaGy, betaGy_rhs, 0, 1, n_betaG);
38+
NewRadX_Apply(cctkGH, betaGz, betaGz_rhs, 0, 1, n_betaG);
39+
}
40+
41+
} // namespace Z4c

Z4c/src/make.code.defn

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
SRCS = \
55
adm.cxx \
66
adm2.cxx \
7+
apply_newrad.cxx \
78
constraints.cxx \
89
enforce.cxx \
910
initial1.cxx \

Z4c/test/qc0.par

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
2+
# run.me:
3+
# run.cores: 40
4+
# run.memory: 1.0e9
5+
# run.time: 7200.0
6+
7+
ActiveThorns = "
8+
ADMBaseX
9+
CarpetX
10+
CoordinatesX
11+
ErrorEstimator
12+
IOUtil
13+
ODESolvers
14+
TmunuBaseX
15+
TwoPuncturesX
16+
Z4c
17+
"
18+
19+
Cactus::cctk_show_schedule = no
20+
21+
Cactus::presync_mode = "mixed-error"
22+
23+
Cactus::terminate = "iteration"
24+
Cactus::cctk_itlast = 3
25+
26+
CarpetX::verbose = no
27+
CarpetX::poison_undefined_values = no
28+
29+
CarpetX::xmin = -20.0
30+
CarpetX::ymin = -20.0
31+
CarpetX::zmin = -20.0
32+
33+
CarpetX::xmax = 20.0
34+
CarpetX::ymax = 20.0
35+
CarpetX::zmax = 20.0
36+
37+
CarpetX::ncells_x = 48
38+
CarpetX::ncells_y = 48
39+
CarpetX::ncells_z = 24
40+
41+
CarpetX::max_tile_size_x = 1024000
42+
CarpetX::max_tile_size_y = 4
43+
CarpetX::max_tile_size_z = 4
44+
45+
CarpetX::reflection_z = yes
46+
47+
CarpetX::boundary_x = "dirichlet"
48+
CarpetX::boundary_y = "dirichlet"
49+
CarpetX::boundary_upper_x = "dirichlet"
50+
CarpetX::boundary_upper_y = "dirichlet"
51+
CarpetX::boundary_upper_z = "dirichlet"
52+
53+
CarpetX::ghost_size = 3
54+
55+
CarpetX::max_num_levels = 1
56+
CarpetX::regrid_every = 16
57+
CarpetX::regrid_error_threshold = 0.03125
58+
59+
ErrorEstimator::region_shape = "cube"
60+
ErrorEstimator::scale_by_resolution = yes
61+
62+
CarpetX::prolongation_type = "ddf"
63+
CarpetX::prolongation_order = 5
64+
65+
ODESolvers::verbose = no
66+
ODESolvers::method = "RK4"
67+
CarpetX::dtfac = 0.25
68+
69+
ADMBaseX::initial_data = "TwoPunctures"
70+
ADMBaseX::initial_lapse = "TwoPunctures-averaged"
71+
72+
# QC-0 setup
73+
TwoPuncturesX::par_b = 1.168642873
74+
TwoPuncturesX::par_m_plus = 0.453
75+
TwoPuncturesX::par_m_minus = 0.453
76+
TwoPuncturesX::par_P_plus [1] = +0.3331917498
77+
TwoPuncturesX::par_P_minus[1] = -0.3331917498
78+
79+
TwoPuncturesX::npoints_A = 16
80+
TwoPuncturesX::npoints_B = 16
81+
TwoPuncturesX::npoints_phi = 8
82+
83+
TwoPuncturesX::grid_setup_method = "evaluation"
84+
85+
TwoPuncturesX::TP_epsilon = 1.0e-2
86+
TwoPuncturesX::TP_Tiny = 1.0e-2
87+
TwoPuncturesX::adm_tol = 1e-6
88+
TwoPuncturesX::Newton_tol = 1e-6
89+
90+
TwoPuncturesX::verbose = yes
91+
92+
Z4c::calc_ADM_vars = yes
93+
Z4c::calc_ADMRHS_vars = yes
94+
Z4c::calc_constraints = yes
95+
96+
Z4c::chi_floor = 1.0e-6
97+
Z4c::alphaG_floor = 1.0e-8
98+
Z4c::epsdiss = 0.32
99+
Z4c::boundary_conditions = "NewRadX"
100+
101+
IO::out_dir = $parfile
102+
IO::out_every = 1
103+
IO::parfile_write = no
104+
105+
CarpetX::out_metadata = no
106+
CarpetX::out_norm_vars = " "
107+
CarpetX::out_norm_omit_unstable = yes
108+
109+
CarpetX::out_tsv_vars = "
110+
ADMBaseX::metric
111+
ADMBaseX::curv
112+
ADMBaseX::lapse
113+
ADMBaseX::shift
114+
"
115+

Z4c/test/qc0/TwoPuncturesX.bbh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ==================================
2+
# Numerical Relativity Metadata file
3+
# ==================================
4+
#
5+
# This file contains information about the simulation provided by the
6+
# TwoPuncturesX thorn. The format is described in the NR Data Format Document
7+
# http://arxiv.org/abs/0709.0093 [draft SVN r707].
8+
9+
[metadata]
10+
initial-ADM-energy = 1.0078763090171796
11+
initial-ADM-angular-momentumx = 0
12+
initial-ADM-angular-momentumy = 0
13+
initial-ADM-angular-momentumz = 0.77876432749233837
14+
initial-separation = 2.3372857460000001
15+
initial-data-type = Bowen-York
16+
initial-data-bibtex-keys = Bowen:1980yu Brandt:1997tf Ansorg:2004ds
17+
initial-bh-position1x = 1.168642873
18+
initial-bh-position1y = 0
19+
initial-bh-position1z = 0
20+
initial-bh-position2x = -1.168642873
21+
initial-bh-position2y = 0
22+
initial-bh-position2z = 0
23+
initial-bh-momentum1x = 0
24+
initial-bh-momentum1y = 0.33319174979999999
25+
initial-bh-momentum1z = 0
26+
initial-bh-momentum2x = 0
27+
initial-bh-momentum2y = -0.33319174979999999
28+
initial-bh-momentum2z = 0
29+
initial-bh-spin1x = 0
30+
initial-bh-spin1y = 0
31+
initial-bh-spin1z = 0
32+
initial-bh-spin2x = 0
33+
initial-bh-spin2y = 0
34+
initial-bh-spin2z = 0
35+
initial-bh-puncture-adm-mass1 = 0.51681958833218156
36+
initial-bh-puncture-adm-mass2 = 0.51681958829931418
37+
initial-bh-puncture-bare-mass1 = 0.45300000000000001
38+
initial-bh-puncture-bare-mass2 = 0.45300000000000001

0 commit comments

Comments
 (0)