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

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Thu Aug 9 01:21:05 CDT 2012


User: rhaas
Date: 2012/08/09 01:21 AM

Modified:
 /trunk/src/
  GRHydro_PoloidalMagFieldM.F90

Log:
 A couple of changes:
 1) Calculate divergence of B in MoL PseudoEvolution and set its Prolongation="Restrict".
 2) Correct the source terms and fluxes for the Bfield and the divergence cleaning field when having a non-flat space-time.
 3) Make sure alpha factors match between UpdateCalculation and fluxes definition.
 4) Include 1/sqrt(detg) factor in calculation of \epsilon^{\muijk} in the cross product to obtain the Bfield form the vector potential.
 
 From: Philipp Moesta <pmoesta at tapir.caltech.edu>

File Changes:

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

File [modified]: GRHydro_PoloidalMagFieldM.F90
Delta lines: +7 -4
===================================================================
--- trunk/src/GRHydro_PoloidalMagFieldM.F90	2012-08-09 06:11:31 UTC (rev 136)
+++ trunk/src/GRHydro_PoloidalMagFieldM.F90	2012-08-09 06:21:04 UTC (rev 137)
@@ -58,6 +58,7 @@
   
   CCTK_INT :: i, j, k, nx, ny, nz
   CCTK_REAL :: det
+  CCTK_REAL :: sdet
   CCTK_REAL :: dx,dy,dz
   CCTK_REAL :: rhofac, delPcut, maxP_Pcut
   CCTK_REAL :: Aphi, Ax, Ay, Az
@@ -112,12 +113,14 @@
      Ay_dx = Aphi + x(i,j,k)*Aphi_dx
      Ay_dz = x(i,j,k)*Aphi_dz
 
-     Bvecx(i,j,k) = alp(i,j,k)*Ay_dz
-     Bvecy(i,j,k) = -alp(i,j,k)*Ax_dz
-     Bvecz(i,j,k) = alp(i,j,k)*(Ax_dy-Ay_dx)
            
      det=SPATIAL_DETERMINANT(gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k))
-           
+     sdet = sqrt(det) 
+     
+     Bvecx(i,j,k) = Ay_dz/sdet
+     Bvecy(i,j,k) = - Ax_dz/sdet
+     Bvecz(i,j,k) = (Ax_dy-Ay_dx)/sdet
+
            if (CCTK_EQUALS(GRHydro_eos_type,"Polytype")) then
               call Prim2ConPolyM(GRHydro_eos_handle,gxx(i,j,k),gxy(i,j,k),&
                    gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k),&



More information about the Commits mailing list