INTEGRALS: Fix sign of diffusion terms in reconnection rate measure.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
70b7a7077c
commit
8457574567
@ -744,7 +744,7 @@ module integrals
|
||||
! diffusion of magnetic energy through the lower X boundary
|
||||
!
|
||||
inarr(26) = inarr(26) &
|
||||
+ sum(tmp(1,:,:) * pdata%q(ibz,nb,nb:ne,nb:ne) &
|
||||
- sum(tmp(1,:,:) * pdata%q(ibz,nb,nb:ne,nb:ne) &
|
||||
- tmp(2,:,:) * pdata%q(iby,nb,nb:ne,nb:ne)) * dyz
|
||||
#else /* NDIMS == 3 */
|
||||
! the Y component of current density
|
||||
@ -762,7 +762,7 @@ module integrals
|
||||
! diffusion of magnetic energy through the lower X boundary
|
||||
!
|
||||
inarr(26) = inarr(26) &
|
||||
+ sum(tmp(1,:,:) * pdata%q(ibz,nb,nb:ne, : ) &
|
||||
- sum(tmp(1,:,:) * pdata%q(ibz,nb,nb:ne, : ) &
|
||||
- tmp(2,:,:) * pdata%q(iby,nb,nb:ne, : )) * dyz
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
@ -816,7 +816,7 @@ module integrals
|
||||
! diffusion of magnetic energy through the upper X boundary
|
||||
!
|
||||
inarr(26) = inarr(26) &
|
||||
- sum(tmp(1,:,:) * pdata%q(ibz,ne,nb:ne,nb:ne) &
|
||||
+ sum(tmp(1,:,:) * pdata%q(ibz,ne,nb:ne,nb:ne) &
|
||||
- tmp(2,:,:) * pdata%q(iby,ne,nb:ne,nb:ne)) * dyz
|
||||
#else /* NDIMS == 3 */
|
||||
! the Y component of current density
|
||||
@ -834,7 +834,7 @@ module integrals
|
||||
! diffusion of magnetic energy through the upper X boundary
|
||||
!
|
||||
inarr(26) = inarr(26) &
|
||||
- sum(tmp(1,:,:) * pdata%q(ibz,ne,nb:ne, : ) &
|
||||
+ sum(tmp(1,:,:) * pdata%q(ibz,ne,nb:ne, : ) &
|
||||
- tmp(2,:,:) * pdata%q(iby,ne,nb:ne, : )) * dyz
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
@ -929,13 +929,15 @@ module integrals
|
||||
- 0.5d+00 * (pdata%q(iby,nb:ne,nb ,nbu:neu) &
|
||||
- pdata%q(iby,nb:ne,nb ,nbl:nel)) / dh(3)
|
||||
|
||||
inarr(15) = inarr(15) - sum(sign(tmp(:,1,:), &
|
||||
! diffusion of Bx through the lower Y boundary
|
||||
!
|
||||
inarr(15) = inarr(15) + sum(sign(tmp(:,1,:), &
|
||||
pdata%q(ibx,nb:ne,nb,nb:ne))) * dxz
|
||||
|
||||
! diffusion of magnetic energy through the lower Y boundary
|
||||
!
|
||||
inarr(27) = inarr(27) &
|
||||
+ sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,nb,nb:ne) &
|
||||
- sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,nb,nb:ne) &
|
||||
- tmp(:,2,:) * pdata%q(ibz,nb:ne,nb,nb:ne)) * dxz
|
||||
#else /* NDIMS == 3 */
|
||||
! the Z component of current density
|
||||
@ -950,13 +952,15 @@ module integrals
|
||||
tmp(:,2,:) = (pdata%q(ibz,nb:ne,nb , : ) &
|
||||
- pdata%q(ibz,nb:ne,nbl, : )) / dh(2)
|
||||
|
||||
inarr(15) = inarr(15) - sum(sign(tmp(:,1,:), &
|
||||
! diffusion of Bx through the lower Y boundary
|
||||
!
|
||||
inarr(15) = inarr(15) + sum(sign(tmp(:,1,:), &
|
||||
pdata%q(ibx,nb:ne,nb , : ))) * dxz
|
||||
|
||||
! diffusion of magnetic energy through the lower Y boundary
|
||||
!
|
||||
inarr(27) = inarr(27) &
|
||||
+ sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,nb, : ) &
|
||||
- sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,nb, : ) &
|
||||
- tmp(:,2,:) * pdata%q(ibz,nb:ne,nb, : )) * dxz
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
@ -1047,13 +1051,15 @@ module integrals
|
||||
- 0.5d+00 * (pdata%q(ibz,nbu:neu,ne,nb :ne ) &
|
||||
- pdata%q(ibz,nbl:nel,ne,nb :ne )) / dh(1)
|
||||
|
||||
inarr(15) = inarr(15) + sum(sign(tmp(:,1,:), &
|
||||
! diffusion of Bx through the upper Y boundary
|
||||
!
|
||||
inarr(15) = inarr(15) - sum(sign(tmp(:,1,:), &
|
||||
pdata%q(ibx,nb:ne,ne,nb:ne))) * dxz
|
||||
|
||||
! diffusion of magnetic energy through the upper Y boundary
|
||||
!
|
||||
inarr(27) = inarr(27) &
|
||||
- sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,ne,nb:ne) &
|
||||
+ sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,ne,nb:ne) &
|
||||
- tmp(:,2,:) * pdata%q(ibz,nb:ne,ne,nb:ne)) * dxz
|
||||
#else /* NDIMS == 3 */
|
||||
! the Z component of current density
|
||||
@ -1068,13 +1074,15 @@ module integrals
|
||||
tmp(:,2,:) = 0.5d+00 * (pdata%q(ibz,nbl:nel,ne, : ) &
|
||||
- pdata%q(ibz,nbu:neu,ne, : )) / dh(1)
|
||||
|
||||
inarr(15) = inarr(15) + sum(sign(tmp(:,1,:), &
|
||||
! diffusion of Bx through the upper Y boundary
|
||||
!
|
||||
inarr(15) = inarr(15) - sum(sign(tmp(:,1,:), &
|
||||
pdata%q(ibx,nb:ne,ne, : ))) * dxz
|
||||
|
||||
! diffusion of magnetic energy through the upper Y boundary
|
||||
!
|
||||
inarr(27) = inarr(27) &
|
||||
- sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,ne, : ) &
|
||||
+ sum(tmp(:,1,:) * pdata%q(ibx,nb:ne,ne, : ) &
|
||||
- tmp(:,2,:) * pdata%q(ibz,nb:ne,ne, : )) * dxz
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
@ -1129,13 +1137,15 @@ module integrals
|
||||
- 0.5d+00 * (pdata%q(ibz,nbu:neu,nb:ne,nb ) &
|
||||
- pdata%q(ibz,nbl:nel,nb:ne,nb )) / dh(1)
|
||||
|
||||
inarr(18) = inarr(18) - sum(sign(tmp(:,:,2), &
|
||||
! diffusion of Bx through the lower Z boundary
|
||||
!
|
||||
inarr(18) = inarr(18) + sum(sign(tmp(:,:,2), &
|
||||
pdata%q(ibx,nb:ne,nb:ne,nb))) * dxy
|
||||
|
||||
! diffusion of magnetic energy through the lower Z boundary
|
||||
!
|
||||
inarr(28) = inarr(28) &
|
||||
+ sum(tmp(:,:,1) * pdata%q(iby,nb:ne,nb:ne,nb) &
|
||||
- sum(tmp(:,:,1) * pdata%q(iby,nb:ne,nb:ne,nb) &
|
||||
- tmp(:,:,2) * pdata%q(ibx,nb:ne,nb:ne,nb)) * dxy
|
||||
|
||||
end if ! resistivity
|
||||
@ -1184,13 +1194,15 @@ module integrals
|
||||
- 0.5d+00 * (pdata%q(ibz,nbu:neu,nb:ne,ne ) &
|
||||
- pdata%q(ibz,nbl:nel,nb:ne,ne )) / dh(1)
|
||||
|
||||
inarr(18) = inarr(18) + sum(sign(tmp(:,:,1), &
|
||||
! diffusion of Bx through the upper Z boundary
|
||||
!
|
||||
inarr(18) = inarr(18) - sum(sign(tmp(:,:,2), &
|
||||
pdata%q(ibx,nb:ne,nb:ne,ne))) * dxy
|
||||
|
||||
! diffusion of magnetic energy through the upper Z boundary
|
||||
!
|
||||
inarr(28) = inarr(28) &
|
||||
- sum(tmp(:,:,1) * pdata%q(iby,nb:ne,nb:ne,ne) &
|
||||
+ sum(tmp(:,:,1) * pdata%q(iby,nb:ne,nb:ne,ne) &
|
||||
- tmp(:,:,2) * pdata%q(ibx,nb:ne,nb:ne,ne)) * dxy
|
||||
|
||||
end if ! resistivity
|
||||
|
Loading…
x
Reference in New Issue
Block a user