aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@f2ea251b-07d6-4a45-8f2c-a162b3fa7596>2010-07-30 03:19:48 +0000
committerknarf <knarf@f2ea251b-07d6-4a45-8f2c-a162b3fa7596>2010-07-30 03:19:48 +0000
commitad24f5ae91858a17759f91055f6ace4918cbc557 (patch)
tree485ec8071ecc961eade059e941501a49b049785f
parentb4cd4a188ab721cdb729aa01e77ada392042358a (diff)
a few corrections (rho~=0 handling, shift fix), still unknown: correct curvature transformation -> bin_ns.h mentioned K^{ij} being exported, but Eric G. mentioned it is K_{ij}, which indeed results in lesser mom-constraint violation. However, both versions do not converge - unlike the ham constraint violation
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Meudon_Bin_NS/trunk@8 f2ea251b-07d6-4a45-8f2c-a162b3fa7596
-rw-r--r--schedule.ccl2
-rw-r--r--src/Bin_NS.cc32
2 files changed, 19 insertions, 15 deletions
diff --git a/schedule.ccl b/schedule.ccl
index 8145e2e..a174c93 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -12,7 +12,7 @@ if (CCTK_EQUALS (initial_data, "ID_Bin_NS") ||
LANG: C
} "Check parameters"
- SCHEDULE ID_Bin_NS_initialise IN ADMBase_InitialData
+ SCHEDULE ID_Bin_NS_initialise IN HydroBase_Initial
{
LANG: C
} "Set up binary neutron star initial data"
diff --git a/src/Bin_NS.cc b/src/Bin_NS.cc
index 3714bc2..66dd9df 100644
--- a/src/Bin_NS.cc
+++ b/src/Bin_NS.cc
@@ -11,7 +11,6 @@
using namespace std;
-
static void set_dt_from_domega (CCTK_ARGUMENTS,
CCTK_REAL const* const var,
CCTK_REAL * const dtvar,
@@ -113,9 +112,9 @@ void ID_Bin_NS_initialise (CCTK_ARGUMENTS)
alp[i] = bin_ns.nnn[i];
- betax[i] = bin_ns.beta_x[i];
- betay[i] = bin_ns.beta_y[i];
- betaz[i] = bin_ns.beta_z[i];
+ betax[i] = -bin_ns.beta_x[i];
+ betay[i] = -bin_ns.beta_y[i];
+ betaz[i] = -bin_ns.beta_z[i];
CCTK_REAL g[3][3];
g[0][0] = bin_ns.g_xx[i];
@@ -158,25 +157,30 @@ void ID_Bin_NS_initialise (CCTK_ARGUMENTS)
gyz[i] = g[1][2];
gzz[i] = g[2][2];
- kxx[i] = k[0][0];
- kxy[i] = k[0][1];
- kxz[i] = k[0][2];
- kyy[i] = k[1][1];
- kyz[i] = k[1][2];
- kzz[i] = k[2][2];
+ kxx[i] = ku[0][0] * coord_unit;
+ kxy[i] = ku[0][1] * coord_unit;
+ kxz[i] = ku[0][2] * coord_unit;
+ kyy[i] = ku[1][1] * coord_unit;
+ kyz[i] = ku[1][2] * coord_unit;
+ kzz[i] = ku[2][2] * coord_unit;
rho[i] = bin_ns.nbar[i] / rho_unit;
-
+
eps[i] = rho[i] * bin_ns.ener_spec[i] / ener_unit;
vel[i ] = bin_ns.u_euler_x[i] / vel_unit;
vel[i+ npoints] = bin_ns.u_euler_y[i] / vel_unit;
vel[i+2*npoints] = bin_ns.u_euler_z[i] / vel_unit;
-
+
+ if (rho[i] < 1.e-20) {
+ rho[i ] = 1.e-20;
+ vel[i ] = 0.0;
+ vel[i+ npoints] = 0.0;
+ vel[i+2*npoints] = 0.0;
+ }
+
} // for i
-
-
CCTK_INFO ("Calculating time derivatives of lapse and shift");
{
// Angular velocity