00001 subroutine sourceterm_trfreeG_corot(souten)
00002 use phys_constant, only : pi
00003 use def_matter_parameter, only : ber, radi
00004 use def_metric, only : psi, alph
00005 use def_metric_rotshift, only : ovxd, ovyd, ovzd
00006 use def_matter, only : emdg
00007 use grid_parameter, only : nrg, ntg, npg
00008 use def_metric_hij, only : hxxu, hxyu, hxzu, hyyu, hyzu, hzzu, &
00009 & hxxd, hxyd, hxzd, hyyd, hyzd, hzzd
00010 use interface_interpo_linear_type0
00011 implicit none
00012 real(8), pointer :: souten(:,:,:,:)
00013 real(8) :: gamu(1:3,1:3), gamd(1:3,1:3)
00014 real(8) :: sab(1:3,1:3), ovd(1:3)
00015
00016 real(8) :: emdgc, hhgc, pregc, psigc, rhogc,
00017 hhxxu, hhxyu, hhxzu, hhyyu, hhyzu, hhzzu, &
00018 san, utgc, zfac, &
00019 hhxxd, hhxyd, hhxzd, hhyyd, hhyzd, hhzzd, &
00020 psigc4, sgam, tfsab, trsab, ene, &
00021 ovxgc, ovygc, ovzgc
00022 integer :: ipg, irg, itg, ia, ib, ic
00023
00024
00025
00026 san = 1.0d0/3.0d0
00027
00028 do ipg = 1, npg
00029 do itg = 1, ntg
00030 do irg = 1, nrg
00031
00032 call interpo_linear_type0(psigc,psi,irg,itg,ipg)
00033 psigc4 = psigc**4
00034 call interpo_linear_type0(emdgc,emdg,irg,itg,ipg)
00035 call peos_q2hprho(emdgc,hhgc,pregc,rhogc,ene)
00036 utgc = hhgc/ber
00037
00038 zfac = 1.0d0
00039 if (emdgc <= 1.0d-14) zfac = 0.0d0
00040
00041 call interpo_linear_type0(hhxxu,hxxu,irg,itg,ipg)
00042 call interpo_linear_type0(hhxyu,hxyu,irg,itg,ipg)
00043 call interpo_linear_type0(hhxzu,hxzu,irg,itg,ipg)
00044 call interpo_linear_type0(hhyyu,hyyu,irg,itg,ipg)
00045 call interpo_linear_type0(hhyzu,hyzu,irg,itg,ipg)
00046 call interpo_linear_type0(hhzzu,hzzu,irg,itg,ipg)
00047 gamu(1,1) = hhxxu + 1.0d0
00048 gamu(1,2) = hhxyu
00049 gamu(1,3) = hhxzu
00050 gamu(2,2) = hhyyu + 1.0d0
00051 gamu(2,3) = hhyzu
00052 gamu(3,3) = hhzzu + 1.0d0
00053 gamu(2,1) = gamu(1,2)
00054 gamu(3,1) = gamu(1,3)
00055 gamu(3,2) = gamu(2,3)
00056
00057 call interpo_linear_type0(hhxxd,hxxd,irg,itg,ipg)
00058 call interpo_linear_type0(hhxyd,hxyd,irg,itg,ipg)
00059 call interpo_linear_type0(hhxzd,hxzd,irg,itg,ipg)
00060 call interpo_linear_type0(hhyyd,hyyd,irg,itg,ipg)
00061 call interpo_linear_type0(hhyzd,hyzd,irg,itg,ipg)
00062 call interpo_linear_type0(hhzzd,hzzd,irg,itg,ipg)
00063 gamd(1,1) = hhxxd + 1.0d0
00064 gamd(1,2) = hhxyd
00065 gamd(1,3) = hhxzd
00066 gamd(2,2) = hhyyd + 1.0d0
00067 gamd(2,3) = hhyzd
00068 gamd(3,3) = hhzzd + 1.0d0
00069 gamd(2,1) = gamd(1,2)
00070 gamd(3,1) = gamd(1,3)
00071 gamd(3,2) = gamd(2,3)
00072
00073 call interpo_linear_type0(ovxgc,ovxd,irg,itg,ipg)
00074 call interpo_linear_type0(ovygc,ovyd,irg,itg,ipg)
00075 call interpo_linear_type0(ovzgc,ovzd,irg,itg,ipg)
00076 ovd(1) = ovxgc
00077 ovd(2) = ovygc
00078 ovd(3) = ovzgc
00079
00080 do ic = 1, 6
00081 ia = 1 + ic/4 + ic/6
00082 ib = ic - (ic/4)*2 - ic/6
00083
00084 sab(ia,ib) = hhgc*rhogc*utgc**2*psigc4**2*ovd(ia)*ovd(ib)
00085 end do
00086
00087 sab(2,1) = sab(1,2)
00088 sab(3,1) = sab(1,3)
00089 sab(3,2) = sab(2,3)
00090
00091 trsab = 0.0d0
00092 do ib = 1, 3
00093 do ia = 1, 3
00094 trsab = trsab + gamu(ia,ib) * sab(ia,ib)
00095 end do
00096 end do
00097
00098 do ic = 1, 6
00099 ia = 1 + ic/4 + ic/6
00100 ib = ic - (ic/4)*2 - ic/6
00101 sgam = san*gamd(ia,ib)
00102 tfsab = sab(ia,ib) - sgam*trsab
00103 souten(irg,itg,ipg,ic) = 2.0d0*(- radi**2*8.0d0*pi*tfsab*zfac)
00104 end do
00105 end do
00106 end do
00107 end do
00108
00109 end subroutine sourceterm_trfreeG_corot