[Commits] [svn:einsteintoolkit] GRHydro_InitData/trunk/src/ (Rev. 202)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Wed Mar 27 20:49:01 CDT 2013


User: rhaas
Date: 2013/03/27 08:49 PM

Modified:
 /trunk/src/
  GRHydro_BondiM.c

Log:
 GRHydro_Init_Data: damp hydro quantities to atmosphere inside of rKS < 1 M
 
 From: Roland Haas <rhaas at tapir.caltech.edu>

File Changes:

Directory: /trunk/src/
======================

File [modified]: GRHydro_BondiM.c
Delta lines: +13 -0
===================================================================
--- trunk/src/GRHydro_BondiM.c	2013-03-28 01:48:59 UTC (rev 201)
+++ trunk/src/GRHydro_BondiM.c	2013-03-28 01:49:00 UTC (rev 202)
@@ -1238,6 +1238,19 @@
       Bvecz(i) = bondi_bmag*SQR(M)*z[i]/sqrt(det)/CUBE(r[i]);
     }
 
+    // damp everything down to atmosphere inside of 1M
+    if(rspher < M) {
+      const CCTK_REAL smooth = 0.5*(1+tanh(tan(M_PI*(rspher/M-0.5))));
+      rho[i] *= smooth;  
+      velx(i) *= smooth;
+      vely(i) *= smooth;
+      velz(i) *= smooth;
+      eps[i] *= smooth;
+      Bvecx(i) *= smooth;
+      Bvecy(i) *= smooth;
+      Bvecz(i) *= smooth;
+    }
+
     Prim2ConGenM(*GRHydro_eos_handle,gxx[i],gxy[i],
                  gxz[i],gyy[i],gyz[i],gzz[i],
                  det, &dens[i],&sx(i),&sy(i),&sz(i),



More information about the Commits mailing list