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

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Wed Mar 27 20:48:53 CDT 2013


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

Modified:
 /trunk/
  param.ccl, schedule.ccl
 /trunk/src/
  GRHydro_BondiM.c

Log:
 GRHydro: add parameters to set Bondi solution only in certain range.
 
 From: Roland Haas <rhaas at tapir.caltech.edu>

File Changes:

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

File [modified]: GRHydro_BondiM.c
Delta lines: +17 -0
===================================================================
--- trunk/src/GRHydro_BondiM.c	2013-01-11 15:04:15 UTC (rev 196)
+++ trunk/src/GRHydro_BondiM.c	2013-03-28 01:48:53 UTC (rev 197)
@@ -84,6 +84,7 @@
 
 //some math helpers
 #define SQR(x) ((x)*(x))
+#define CUBE(x) ((x)*(x)*(x))
 
 
 static CCTK_REAL  Mdot, rs, vs_sq, vs, cs_sq, cs, rhos, hs, K, Qdot, gamma_eos, r_sol;
@@ -902,6 +903,19 @@
 ***********************************************************************************/
 void GRHydro_BondiM(CCTK_ARGUMENTS)
 {
+  GRHydro_BondiM_Internal(CCTK_PASS_CTOC, 1e100, -1e100);
+}
+
+void GRHydro_BondiM_Range(CCTK_ARGUMENTS)
+{
+  DECLARE_CCTK_PARAMETERS;
+  GRHydro_BondiM_Internal(CCTK_PASS_CTOC, bondi_freeze_inner_radius,
+                          bondi_freeze_outer_radius);
+}
+
+
+void GRHydro_BondiM_Internal(CCTK_ARGUMENTS, CCTK_REAL range_min, CCTK_REAL range_max)
+{
   DECLARE_CCTK_ARGUMENTS;
   DECLARE_CCTK_PARAMETERS;
   CCTK_REAL det;
@@ -1134,6 +1148,9 @@
 
     rspher = x_spher[RR]; 
 
+    if(rspher > range_min && rspher < range_max)
+      continue;
+
     /* Find nearest point in the Bondi solution : */
     j = (int)  ( 0.5 +  (log10(rspher) - logrmin) / dlogr ) ; 
 

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

File [modified]: param.ccl
Delta lines: +14 -0
===================================================================
--- trunk/param.ccl	2013-01-11 15:04:15 UTC (rev 196)
+++ trunk/param.ccl	2013-03-28 01:48:53 UTC (rev 197)
@@ -395,6 +395,20 @@
   (0:* :: "positive"
 } 1.0
 
+CCTK_BOOLEAN bondi_evolve_only_annulus "reset to initial data outside of bondi_freeze_inner_radius and bondi_freeze_outer_radius"
+{
+} "no"
+
+CCTK_REAL bondi_freeze_inner_radius "reset to initial at radii below this"
+{
+  *:* :: "any value"
+} -1.
+
+CCTK_REAL bondi_freeze_outer_radius "reset to initial at radii above this"
+{
+  *:* :: "any value"
+} 1e300
+
 # For Poloidal Magnetic field test:
 
 CCTK_REAL poloidal_A_b  "Vector potential strength"

File [modified]: schedule.ccl
Delta lines: +7 -0
===================================================================
--- trunk/schedule.ccl	2013-01-11 15:04:15 UTC (rev 196)
+++ trunk/schedule.ccl	2013-03-28 01:48:53 UTC (rev 197)
@@ -250,6 +250,13 @@
   } "setup GRHydro vars for the magnetized Bondi solution"
 }
 
+if(bondi_evolve_only_annulus) {
+SCHEDULE GRHydro_BondiM_Range IN HydroBase_Con2Prim BEFORE Con2Prim
+{
+  LANG: C
+} "force analytic solution outside anulus"
+}
+
 if (CCTK_EQUALS(initial_Bvec, "poloidalmagfield") || CCTK_EQUALS(initial_Avec, "poloidalmagfield"))
 {
 #  SCHEDULE GRHydro_PoloidalMagFieldM AT CCTK_INITIAL AFTER IN HydroBase_Initial AFTER rnsid_init AFTER TOV_Initial_Data after CCCC_StarMapper_InitialData



More information about the Commits mailing list