00001 subroutine sourceterm_MoC_WL_corot(souvec)
00002
00003 use phys_constant, only : pi
00004 use grid_parameter, only : nrg, ntg, npg
00005 use coordinate_grav_r, only : hrg
00006 use trigonometry_grav_phi, only : hsinphig, hcosphig
00007 use trigonometry_grav_theta, only : hsinthg, hcosthg
00008 use def_metric, only : psi, alph, bvxd, bvyd, bvzd, tfkij
00009 use def_metric_hij, only : hxxd, hxyd, hxzd, hyyd, hyzd, hzzd
00010 use def_matter, only : emdg
00011 use def_matter_parameter, only : ome, ber, radi
00012 use def_vector_phi, only: hvec_phig
00013 use interface_interpo_linear_type0
00014 implicit none
00015
00016 real(8), pointer :: souvec(:,:,:,:)
00017 real(8) :: vphig(3)
00018 real(8) :: emdgc, rhogc, pregc, hhgc, ene, utgc, oterm, zfac, rjj
00019 real(8) :: psigc, alpgc
00020 real(8) :: hhxxd, hhxyd, hhxzd, hhyxd, hhyyd, hhyzd,
00021 hhzxd, hhzyd, hhzzd
00022 integer :: ipg, irg, itg, ii
00023
00024 do ii = 1, 3
00025
00026 do ipg = 1, npg
00027 do itg = 1, ntg
00028 do irg = 1, nrg
00029
00030 call interpo_linear_type0(hhxxd,hxxd,irg,itg,ipg)
00031 call interpo_linear_type0(hhxyd,hxyd,irg,itg,ipg)
00032 call interpo_linear_type0(hhxzd,hxzd,irg,itg,ipg)
00033 call interpo_linear_type0(hhyyd,hyyd,irg,itg,ipg)
00034 call interpo_linear_type0(hhyzd,hyzd,irg,itg,ipg)
00035 call interpo_linear_type0(hhzzd,hzzd,irg,itg,ipg)
00036 hhyxd = hhxyd
00037 hhzxd = hhxzd
00038 hhzyd = hhyzd
00039
00040 call interpo_linear_type0(psigc,psi,irg,itg,ipg)
00041 call interpo_linear_type0(alpgc,alph,irg,itg,ipg)
00042 call interpo_linear_type0(emdgc,emdg,irg,itg,ipg)
00043
00044 zfac = 1.0d0
00045 if (emdgc <= 1.0d-14) then
00046 emdgc = 1.0d-14
00047 zfac = 0.0d0
00048 end if
00049 call peos_q2hprho(emdgc, hhgc, pregc, rhogc, ene)
00050 utgc = hhgc/ber
00051 vphig(1) = hvec_phig(irg,itg,ipg,1)
00052 vphig(2) = hvec_phig(irg,itg,ipg,2)
00053 vphig(3) = hvec_phig(irg,itg,ipg,3)
00054 oterm = 0.0d0
00055
00056 if (ii == 1) oterm = hhxxd*ome*vphig(1) &
00057 & + hhxyd*ome*vphig(2) &
00058 & + hhxzd*ome*vphig(3)
00059 if (ii == 2) oterm = hhyxd*ome*vphig(1) &
00060 & + hhyyd*ome*vphig(2) &
00061 & + hhyzd*ome*vphig(3)
00062 if (ii == 3) oterm = hhzxd*ome*vphig(1) &
00063 & + hhzyd*ome*vphig(2) &
00064 & + hhzzd*ome*vphig(3)
00065 rjj = hhgc*rhogc*alpgc*utgc**2*psigc**4*oterm
00066
00067 souvec(irg,itg,ipg,ii) = radi**2*16.0d0*pi*alpgc*rjj*zfac
00068
00069 end do
00070 end do
00071 end do
00072 end do
00073
00074 end subroutine sourceterm_MoC_WL_corot
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085