diff options
-rw-r--r-- | param.ccl | 41 | ||||
-rw-r--r-- | src/decode_pars.F77 | 9 | ||||
-rw-r--r-- | src/include/Scalar_CalcTmunu.inc | 2 | ||||
-rw-r--r-- | src/include/param_defs.inc | 15 | ||||
-rw-r--r-- | src/metric.F77 | 9 | ||||
-rw-r--r-- | src/metrics/Kerr_KerrSchild.F77 | 8 | ||||
-rw-r--r-- | src/metrics/Schwarzschild_BL.F77 | 71 | ||||
-rw-r--r-- | src/metrics/make.code.defn | 1 |
8 files changed, 139 insertions, 17 deletions
@@ -210,6 +210,7 @@ KEYWORD exact_model "The exact solution/coordinates used in thorn exact" # "Schwarzschild/EF" :: "Schwarzschild spacetime in Eddington-Finkelstein coordinates" "Schwarzschild/PG" :: "Schwarzschild spacetime in Painleve-Gullstrand coordinates" +"Schwarzschild/BL" :: "Schwarzschild spacetime in Brill-Lindquist coordinates" "Schwarzschild/Novikov":: "Schwarzschild spacetime in Novikov coordinates" "Schwarzschild-Lemaitre":: "Schwarzschild metric in Schwarzschild coordinates, with cosmological constant" "Kerr/Boyer-Lindquist" :: "Kerr spacetime in Boyer-Lindquist coordinates" @@ -387,6 +388,22 @@ REAL Schwarzschild_PG__epsilon "Schwarzschild/PG: numerical fudge" ################################################################################ +# +# parameters for Schwarzschild metric in Brill-Lindquist coordinates +# + +REAL Schwarzschild_BL__mass "Schwarzschild/BL: BH mass" +{ +(0.0:* :: "any real number > 0.0" +} 1.0 + +REAL Schwarzschild_BL__epsilon "Schwarzschild/BL: numerical fudge" +{ +0.0:* :: "any real number >= 0.0" +} 1.e-16 + +################################################################################ + # parameters for Schwarzschild metric in Novikov coordinates REAL Schwarzschild_Novikov__mass "Schwarzschild/Novikov: BH mass" @@ -458,6 +475,30 @@ REAL Kerr_KerrSchild__spin \ -1.0:1.0 :: "dimensionless spin parameter a = J/m^2 for Kerr black hole" } 0.6 +REAL Kerr_KerrSchild__x \ + "Kerr/Kerr-Schild: x-coordinate of black hole" +{ +(*:*) :: "" +} 0.0 + +REAL Kerr_KerrSchild__y \ + "Kerr/Kerr-Schild: y-coordinate of black hole" +{ +(*:*) :: "" +} 0.0 + +REAL Kerr_KerrSchild__z \ + "Kerr/Kerr-Schild: z-coordinate of black hole" +{ +(*:*) :: "" +} 0.0 + +REAL Kerr_KerrSchild__t \ + "Kerr/Kerr-Schild: time offset of black hole" +{ +(*:*) :: "" +} 0.0 + ################################################################################ # diff --git a/src/decode_pars.F77 b/src/decode_pars.F77 index 4aa7370..6574d23 100644 --- a/src/decode_pars.F77 +++ b/src/decode_pars.F77 @@ -43,9 +43,6 @@ c@@*/ DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS -c local variables - character*100 warn_buffer - cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c @@ -69,6 +66,8 @@ c black hole spacetimes decoded_exact_model = EXACT__Schwarzschild_EF elseif (CCTK_Equals(exact_model, "Schwarzschild/PG") .ne. 0) then decoded_exact_model = EXACT__Schwarzschild_PG + elseif (CCTK_Equals(exact_model, "Schwarzschild/BL") .ne. 0) then + decoded_exact_model = EXACT__Schwarzschild_BL elseif (CCTK_Equals(exact_model, "Schwarzschild/Novikov") .ne. 0) then decoded_exact_model = EXACT__Schwarzschild_Novikov elseif (CCTK_Equals(exact_model, "Kerr/Boyer-Lindquist") .ne. 0) then @@ -121,9 +120,7 @@ c miscellaneous spacetimes elseif (CCTK_Equals(exact_model, "constant density star") .ne. 0) then decoded_exact_model = EXACT__constant_density_star else - write (warn_buffer, '(a,a,a)') - $ 'Unknown exact_model = "', exact_model, '"' - call CCTK_WARN(0, warn_buffer) + call CCTK_WARN(0, "Unknown exact_model") endif cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc diff --git a/src/include/Scalar_CalcTmunu.inc b/src/include/Scalar_CalcTmunu.inc index bb704eb..6da31cb 100644 --- a/src/include/Scalar_CalcTmunu.inc +++ b/src/include/Scalar_CalcTmunu.inc @@ -51,6 +51,8 @@ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c no stress-energy tensor in this model elseif (decoded_exact_model .eq. EXACT__Schwarzschild_PG) then c no stress-energy tensor in this model + elseif (decoded_exact_model .eq. EXACT__Schwarzschild_BL) then +c no stress-energy tensor in this model elseif (decoded_exact_model .eq. EXACT__Schwarzschild_Novikov) then c no stress-energy tensor in this model elseif (decoded_exact_model .eq. EXACT__Kerr_BoyerLindquist) then diff --git a/src/include/param_defs.inc b/src/include/param_defs.inc index fd18591..2361c5f 100644 --- a/src/include/param_defs.inc +++ b/src/include/param_defs.inc @@ -39,13 +39,14 @@ c Minkowski spacetime c black hole spacetimes #define EXACT__Schwarzschild_EF 10 #define EXACT__Schwarzschild_PG 11 -#define EXACT__Schwarzschild_Novikov 12 -#define EXACT__Kerr_BoyerLindquist 13 -#define EXACT__Kerr_KerrSchild 14 -#define EXACT__Schwarzschild_Lemaitre 15 -#define EXACT__multi_BH 16 -#define EXACT__Alvi 17 -#define EXACT__Thorne_fakebinary 18 +#define EXACT__Schwarzschild_BL 12 +#define EXACT__Schwarzschild_Novikov 13 +#define EXACT__Kerr_BoyerLindquist 14 +#define EXACT__Kerr_KerrSchild 15 +#define EXACT__Schwarzschild_Lemaitre 16 +#define EXACT__multi_BH 17 +#define EXACT__Alvi 18 +#define EXACT__Thorne_fakebinary 19 c cosmological spacetimes #define EXACT__Lemaitre 50 diff --git a/src/metric.F77 b/src/metric.F77 index 1d83dec..1fdc0b5 100644 --- a/src/metric.F77 +++ b/src/metric.F77 @@ -110,6 +110,15 @@ c $ guxx, guyy, guzz, guxy, guyz, guxz, $ psi, Tmunu_flag) + elseif (decoded_exact_model .eq. EXACT__Schwarzschild_BL) then + call Exact__Schwarzschild_BL( + $ x, y, z, t, + $ gdtt, gdtx, gdty, gdtz, + $ gdxx, gdyy, gdzz, gdxy, gdyz, gdxz, + $ gutt, gutx, guty, gutz, + $ guxx, guyy, guzz, guxy, guyz, guxz, + $ psi, Tmunu_flag) + elseif (decoded_exact_model .eq. EXACT__Schwarzschild_Novikov) then call Exact__Schwarzschild_Novikov(x,y,z,t, $ gdtt, gdtx, gdty, gdtz, diff --git a/src/metrics/Kerr_KerrSchild.F77 b/src/metrics/Kerr_KerrSchild.F77 index 79619cd..f2fb45a 100644 --- a/src/metrics/Kerr_KerrSchild.F77 +++ b/src/metrics/Kerr_KerrSchild.F77 @@ -66,10 +66,10 @@ C t0 is never used, but is here for illustration, and we introduce C x0 and y0 also only for clarity. C Note that z0 = 0 means z = vt for the BH. - t0 = gamma * (t - boostv * z) - z0 = gamma * (z - boostv * t) - x0 = x - y0 = y + t0 = gamma * ((t - Kerr_KerrSchild__t) - boostv * (z - Kerr_KerrSchild__z)) + z0 = gamma * ((z - Kerr_KerrSchild__z) - boostv * (t - Kerr_KerrSchild__t)) + x0 = x - Kerr_KerrSchild__x + y0 = y - Kerr_KerrSchild__y C Coordinate distance to center of black hole. Note it moves! diff --git a/src/metrics/Schwarzschild_BL.F77 b/src/metrics/Schwarzschild_BL.F77 new file mode 100644 index 0000000..f9d63f7 --- /dev/null +++ b/src/metrics/Schwarzschild_BL.F77 @@ -0,0 +1,71 @@ +c Schwarzschild spacetime in Brill-Lindquist coordinates. +C +c $Header$ + +#include "cctk.h" +#include "cctk_Parameters.h" + + subroutine Exact__Schwarzschild_BL( + $ x, y, z, t, + $ gdtt, gdtx, gdty, gdtz, + $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, + $ gutt, gutx, guty, gutz, + $ guxx, guyy, guzz, guxy, guyz, guzx, + $ psi, Tmunu_flag) + + implicit none + + DECLARE_CCTK_PARAMETERS + +c input arguments + CCTK_REAL x, y, z, t + +c output arguments + CCTK_REAL gdtt, gdtx, gdty, gdtz, + $ gdxx, gdyy, gdzz, gdxy, gdyz, gdzx, + $ gutt, gutx, guty, gutz, + $ guxx, guyy, guzz, guxy, guyz, guzx + CCTK_REAL psi + LOGICAL Tmunu_flag + +c local variables + CCTK_REAL eps, m + +c local variables + CCTK_REAL r, psi4 + +C This is a vacuum spacetime with no cosmological constant + Tmunu_flag = .false. + +C Get parameters of the exact solution. + + eps = Schwarzschild_BL__epsilon + m = Schwarzschild_BL__mass + + r = ((x**2 + y**2 + z**2)**2 + eps**4) ** 0.25d0 + psi4 = (1 + m / (2 * r)) ** 4 + + gdtt = -1 + gdtx = 0 + gdty = 0 + gdtz = 0 + gdxx = psi4 + gdyy = psi4 + gdzz = psi4 + gdxy = 0 + gdyz = 0 + gdzx = 0 + + gutt = -1 + gutx = 0 + guty = 0 + gutz = 0 + guxx = 1 / psi4 + guyy = 1 / psi4 + guzz = 1 / psi4 + guxy = 0 + guyz = 0 + guzx = 0 + + return + end diff --git a/src/metrics/make.code.defn b/src/metrics/make.code.defn index b50ab0f..ba33ccd 100644 --- a/src/metrics/make.code.defn +++ b/src/metrics/make.code.defn @@ -14,6 +14,7 @@ SRCS = Minkowski.F77 \ \ Schwarzschild_EF.F77 \ Schwarzschild_PG.F77 \ + Schwarzschild_BL.F77 \ Schwarzschild_Novikov.F77 \ Kerr_BoyerLindquist.F77 \ Kerr_KerrSchild.F77 \ |