Gyroviscosity in the NIMROD code A.Y. Pankin D. D. Schnack C. Sovinec S. E. Kruger
Outline Introduction Two possible implementations Testing GV in the NIMROD code Convergence Summary
ε = ω / Ω i ξ = V 0 /V thi δ = ρ i / L Gyroviscous force εξ V i t + ξ δv i V i = 1 n δ p + Π i 0 Π i i + ξ E + V i B p 0 ( ) ratio of the characteristic frequency to the ion gyro-frequency ratio of the characteristic flow velocity to the ion thermal speed ratio of the ion Larmor (gyro-) radius to the macroscopic scale length Properties of Fluid Models Model V i ω β J B Whistlers KAW Hall V thi /δ Ω ci O(δ ) MHD mn dv i Yes No + O(δ) dt Ideal V thi δω ci O(δ) O(δ) No No MHD Drift δv thi δ O(1) Ωci p + O(δ ) No Yes GV force is not caused by particle collisions GV force is nor dissipative
Π i = Π + Π + Π gv Π = 3 η 0 b W b ( ) I 1 3 bb Π = η 1 ( I bb) W I bb Π gv = η 3 Stress tensor ( ) 1 ( I bb) ( I bb) :W [ b W ( I+ 3bb) ( I+ 3bb) W b], + 4[ ( I bb) W bb + transpose]} where W is the rate of strain tensor : W = V + ( V) T 3 I ( V ) η 3 = nt i Ω, η 0 Ω = eb m i = 0.96 nt i ν, η 1 = 3 10 is the ion gyro - frequency nt i ν Ω,
First Implantation: Hooke s law Linear relationship between stress and rate of strain : Π ij = E ijkl W kl Elastic constant tensor : Symmetry : E ijkl Π ij W kl E ijkl = E jikl E ijkl = E 14444 4444 ijlk 3 Π and W are symmetric E ijkl ( B) = E klij ( B) 144 4443 B is a pseudo-vector (Onsager) Elastic constant tensor for a magnetized plasma : E ijkl = 1 η 3( ε imk b m u lj + ε jmk b m u li ), u αβ = δ αβ + 3b α b β E xxxy = E xxyx = E yyxy = E yyyx = η 3 E xyxx = E yxxx = E xyyy = E yxyy = 1 η 3 E xzyz = E zxxy = E zxyz = E zxzy = E yzxz = E zyxz = E zyzx = E yzzx = η 4 (Cartesian representation, b = e z ) 81 components, 16 non - zero, 1 independent (single parameter dependence)
First Implantation: continue Cartesian rate of strain tensor : W = V i + V i T 3 Ι V i ( V) kl = V l x k W ij = A ijkl ( V) kl A ijkl = δ il δ kj + δ ik δ lk 3 δ ijδ km δ ml Write stress directly in terms of rate of strain : Π ij = E ijkl A klmn ( V) mn = D ijmn ( V) mn D ijmn = 1 η 3 ε izn δ mj + 3δ mz δ jz Symmetries : [ ( ) + ε izm ( δ nj + 3δ nz δ jz ) +ε jzn ( δ mi + 3δ mz δ iz ) + ε jzm ( δ nj + 3δ nz δ iz )] Assumes B locally aligned with z axis D ijmn = D jimn, D ijmn = D ijnm, D ijmn = D mnij These symmetries assure GV stress non - dissipative : V Π GV d 3 x = 0
First Implantation: Computation of GV stress 1. Compute D ijmn once at beginning of run. Transform D ijmn to cylindrical coordinates at each spatial location, depending on local direction of magnetic field D αβγδ = S iα S jβ D ijkl S kγ S lδ i, j, k, l = x, y,x α, β, γ, δ = r,θ,z cosα sinα 0 S = cosβ sinα cosβ cosα sinβ sinβ sinα sinβ cosα cosβ α = tan 1 B r, β = tan 1 B r + B θ B θ B z 3. Stress tensor components in cylindrical coordinates is Π ij = V r r ( V) 1 V = r r θ V θ r V r z D ijmn ( V) mn V θ r 1 V r r θ + V r r V θ z V z r 1 V z r θ V z z 4. FE divergence in cylindrical coordinates ( Π GV ) p = dv ( α p D α q ) V q,.
Second Implementation A r,p,n Based on weak formulation of the stress tensor force - dxa ν,p,n Π = dx( A ) T ν,p,n :Π ds Π A ν,p,n α p,n 0 0 r α = p,n 0 0 z in r α 0 α r A z,p,n α 0 p,n 0 r α = 0 p,n 0 z 0 in r α 0 IS ZERO for non-slip boundary conditions A φ,p,n α 0 0 p,n r α = 0 0 p,n z α 0 in r r α Find product ( A ) T :Π ν,p,n and heating - V :Π - > - dxa ν,p,n V :Π
c----------------------------------------------------------------------- c stress tensor for gyro-viscosity c----------------------------------------------------------------------- IF (gyr_visc>0) THEN ALLOCATE(wtmp(3,3,SIZE(int,),SIZE(int,3))) ALLOCATE(b_cross_w(3,3,SIZE(int,),SIZE(int,3))) DO imode=1,nmodes wtmp=0. DO iy=1,ncy DO ix=1,ncx vtmp(1:3,1)=vten(1:3,ix,iy,imode) vtmp(1:3,)=vten(4:6,ix,iy,imode) vtmp(1:3,3)=vten(7:9,ix,iy,imode) T W = V ptmp=vtmp+transpose(vtmp) 3 Ι V i + V i i btmp(1:3,1)=3.(be_eq(1:3,ix,iy)+be(1:3,ix,iy,imode)) (be_eq(1,ix,iy)+be(1,ix,iy,imode)) /btot(ix,iy) btmp(1:3,)=3.(be_eq(1:3,ix,iy)+be(1:3,ix,iy,imode)) ( I+ 3bb) (be_eq(,ix,iy)+be(,ix,iy,imode)) /btot(ix,iy) btmp(1:3,3)=3.(be_eq(1:3,ix,iy)+be(1:3,ix,iy,imode)) (be_eq(3,ix,iy)+be(3,ix,iy,imode)) /btot(ix,iy) btmp(1,1) = 1+btmp(1,1) btmp(,) = 1+btmp(,) btmp(3,3) = 1+btmp(3,3) DO i1=1,3 DO i=1,3 DO i3=1,3 wtmp(i1,i,ix,iy)=wtmp(i1,i,ix,iy)+ptmp(i1,i3) W ( I+ 3bb) btmp(i3,i) call math_cart_cross(b_cross_w(1,:,:,:), be_eq(:,:,:)+be(:,:,:,imode), wtmp(:,1,:,:),1._r8) call b math_cart_cross(b_cross_w(,:,:,:), W ( I+ 3bb) be_eq(:,:,:)+be(:,:,:,imode), wtmp(:,,:,:),1._r8) call math_cart_cross(b_cross_w(3,:,:,:), be_eq(:,:,:)+be(:,:,:,imode), wtmp(:,3,:,:),1._r8) DO iy=1,ncy DO ix=1,ncx η 3 [ b W ( I+ 3bb) ( I+ 3bb) W b] ptmp = gyr_visc(ti_eq(1,ix,iy)zeff)/ (1.9e4btot(ix,iy)) (b_cross_w(:,:,ix,iy) +TRANSPOSE(b_cross_w(:,:,ix,iy))) piten(1:3,ix,iy,imode)= $ piten(1:3,ix,iy,imode)-ptmp(1:3,1) piten(4:6,ix,iy,imode)= $ piten(4:6,ix,iy,imode)-ptmp(1:3,) Π i = piten(7:9,ix,iy,imode)= Π i + Π gv $ piten(7:9,ix,iy,imode)-ptmp(1:3,3) DEALLOCATE(wtmp,b_cross_w) IF (eq_flow/='none') THEN ALLOCATE(wtmpr(3,3,SIZE(int,),SIZE(int,3))) ALLOCATE(b_cross_wr(3,3,SIZE(int,),SIZE(int,3))) DO iy=1,ncy DO ix=1,ncx vtmpr(1:3,1)=veqten(1:3,ix,iy) vtmpr(1:3,)=veqten(4:6,ix,iy) vtmpr(1:3,3)=veqten(7:9,ix,iy) ptmpr=vtmpr+transpose(vtmpr) btmpr(1:3,1)=3.be_eq(1:3,ix,iy)be_eq(1,ix,iy) /btot(ix,iy) btmpr(1:3,)=3.be_eq(1:3,ix,iy)be_eq(,ix,iy) /btot(ix,iy) btmpr(1:3,3)=3.be_eq(1:3,ix,iy)be_eq(3,ix,iy) /btot(ix,iy) btmpr(1,1) = 1+btmpr(1,1) btmpr(,) = 1+btmpr(,) btmpr(3,3) = 1+btmpr(3,3) vtmpr=0. DO i1=1,3 DO i=1,3 DO i3=1,3 wtmpr(i1,i,ix,iy)=wtmpr(i1,i,ix,iy) +ptmpr(i1,i3)btmpr(i3,i) call math_cart_cross(b_cross_wr(1,:,:,:),be_eq, wtmpr(:,1,:,:),1._r8) call math_cart_cross(b_cross_wr(,:,:,:),be_eq, wtmpr(:,,:,:),1._r8) call math_cart_cross(b_cross_wr(3,:,:,:),be_eq, wtmpr(:,3,:,:),1._r8) DO iy=1,ncy DO ix=1,ncx ptmpr = gyr_visczeffti_eq(1,ix,iy)/ (1.9e4btot(ix,iy)) (b_cross_wr(:,:,ix,iy) +TRANSPOSE(b_cross_wr(:,:,ix,iy))) pi_veq(1:3,ix,iy)= $ pi_veq(1:3,ix,iy)-ptmpr(1:3,1) pi_veq(4:6,ix,iy)= $ pi_veq(4:6,ix,iy)-ptmpr(1:3,) pi_veq(7:9,ix,iy)= $ pi_veq(7:9,ix,iy)-ptmpr(1:3,3) DEALLOCATE(wtmpr,b_cross_wr) ENDIF ENDIF
Testing GV implementation Without gyroviscosity With gyroviscosity
Testing GV implementation Dispersion relation Parallel Propagation Dispersion relation: ( ω ± ω 4 )( ω ± ω W ) = ω A ω A ω 4 ω W = B 0 k z µ 0 mn = V A k z = η k 4 z mn = V thi Ω k z = B k 0 z µ 0 ne = ω A Ω = 1 ( ρ k ) Ω i z Ω = 1 ( β ρ k ) Ω i z If ρ i k z <<1, the solutions for the left and right polarized waves are ω L ± = V A k z ±1+ 1+ β β ρ k ( ) i z ω R ± = V A k z ±1 1+ β β ρ k ( ) i z Perpendicular Propagation Dispersion relation: ω s ω + ω A =1+ ω s ω s = C s k x, ω 3 = ω 4 /. ω = V A k x 1+ γβ + β 16 ρ ( ik x ) The mode is elliptically polarized in the plane perpendicular to B iv y = ± 1 β V x 4 1+ γβ/ ρ k i x ω 3 + ω A
Testing GV implementation Without gyroviscosity With gyroviscosity