[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 287)
bcmsma at astro.rit.edu
bcmsma at astro.rit.edu
Tue Nov 1 17:19:55 CDT 2011
User: bmundim
Date: 2011/11/01 05:19 PM
Modified:
/trunk/src/
GRHydro_SourceM.F90, GRHydro_TmunuM.F90
Log:
RIT dev: Implement comoving contravariant magnetic 4-vector.
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_SourceM.F90
Delta lines: +1 -1
===================================================================
--- trunk/src/GRHydro_SourceM.F90 2011-10-25 18:45:10 UTC (rev 286)
+++ trunk/src/GRHydro_SourceM.F90 2011-11-01 22:19:55 UTC (rev 287)
@@ -252,7 +252,7 @@
rhohstarW2 = (rho(i,j,k)*(one + eps(i,j,k)) + press(i,j,k)+ b2)*&
w_lorentz(i,j,k)**2
- pstar = press(i,j,k)+b2/2.d0
+ pstar = press(i,j,k)+0.5d0*b2
!!$ For a change, these are T^{ij}
File [modified]: GRHydro_TmunuM.F90
Delta lines: +13 -1
===================================================================
--- trunk/src/GRHydro_TmunuM.F90 2011-10-25 18:45:10 UTC (rev 286)
+++ trunk/src/GRHydro_TmunuM.F90 2011-11-01 22:19:55 UTC (rev 287)
@@ -67,12 +67,16 @@
#define Bvecx(i,j,k) Bvec(i,j,k,1)
#define Bvecy(i,j,k) Bvec(i,j,k,2)
#define Bvecz(i,j,k) Bvec(i,j,k,3)
+#define bcomx(i,j,k) bcom(i,j,k,1)
+#define bcomy(i,j,k) bcom(i,j,k,2)
+#define bcomz(i,j,k) bcom(i,j,k,3)
subroutine GRHydro_TmunuM(CCTK_ARGUMENTS)
implicit none
DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_PARAMETERS
CCTK_REAL :: velxlow, velylow, velzlow
CCTK_REAL :: betaxlow, betaylow, betazlow, beta2
@@ -119,7 +123,7 @@
!!$ square of the lorentz factor.
rhohstarw2 = w_lorentz(i,j,k)**2*(rho(i,j,k)*(1.0D0 + eps(i,j,k)) + press(i,j,k) + b2)
- pstar = press(i,j,k)+b2/2.d0
+ pstar = press(i,j,k)+0.5d0*b2
!!$ Calculate lower components of 4-velocity (without the Lorent factor).
!!$ uxlow = velxlow
@@ -142,6 +146,14 @@
eTxz(i,j,k) = eTxz(i,j,k) + rhohstarw2*velxlow*velzlow + pstar*gxz(i,j,k) - bxlow*bzlow
eTyz(i,j,k) = eTyz(i,j,k) + rhohstarw2*velylow*velzlow + pstar*gyz(i,j,k) - bylow*bzlow
+ if(calculate_bcom .ne. 0) then
+ bcom_sq(i,j,k) = b2
+ bcom0(i,j,k) = w_lorentz(i,j,k)*bdotv/alp(i,j,k)
+ bcomx(i,j,k) = Bvecx(i,j,k)/w_lorentz(i,j,k) + bcom0(i,j,k)*(alp(i,j,k)*velx(i,j,k)-betax(i,j,k))
+ bcomy(i,j,k) = Bvecy(i,j,k)/w_lorentz(i,j,k) + bcom0(i,j,k)*(alp(i,j,k)*vely(i,j,k)-betay(i,j,k))
+ bcomz(i,j,k) = Bvecz(i,j,k)/w_lorentz(i,j,k) + bcom0(i,j,k)*(alp(i,j,k)*velz(i,j,k)-betaz(i,j,k))
+ endif
+
end do
end do
end do
More information about the Commits
mailing list