Skip to content

Commit

Permalink
Revert '**' for squares in drift terms
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Nov 7, 2024
1 parent c1bddbd commit f5ce7d5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bbb/oderhs.m
Original file line number Diff line number Diff line change
Expand Up @@ -4601,21 +4601,23 @@ ccc call volave(nx, ny, j2, j5, i2, i5, ixp1(0,0), ixm1(0,0),
c to the friction force between neutrals and ions
up1cc = 0.5*(up(ix,iy,1)+up(ix1,iy,1))
upgcc = 0.5*(up(ix,iy,iigsp)+up(ix1,iy,iigsp))
vycc = (cfnidhgy**0.5)*0.5*(vy(ix,iy,iigsp)+vy(ix1,iy,iigsp))
v2cc = (cfnidhg2**0.5)*0.5*(v2(ix,iy,iigsp)+v2(ix1,iy,iigsp))
vycc = cfnidhgy*(vy(ix,iy,iigsp)+vy(ix1,iy,iigsp))
. * (vy(ix,iy,iigsp)+vy(ix1,iy,iigsp))
v2cc = cfnidhg2*(v2(ix,iy,iigsp)+v2(ix1,iy,iigsp))
. * (v2(ix,iy,iigsp)+v2(ix1,iy,iigsp))

c Ion rate from CX
psicx(ix,iy) = cfticx*nucx(ix,iy,1)*ng(ix,iy,1)*vol(ix,iy)

c Ion energy source/sink from ioniz & recom
seik(ix,iy) = cfneut * cfneutsor_ei * cfnidh *
. 0.5*mi(1) * ( (up1cc-upgcc)*(up1cc-upgcc) + vycc**2 + v2cc**2) *
. 0.5*mi(1) * ( (up1cc-upgcc)*(up1cc-upgcc) + vycc + v2cc) *
. ( psor(ix,iy,1) + cftiexclg*psorrg(ix,iy,1)
. + (1 + cftiexclg) * psicx(ix,iy) )

c Ion energy source from mol. diss
seid(ix,iy) = cftiexclg * cfneut * cfneutsor_ei * cnsor
. * (eion*ev + cfnidhdis*0.5*mg(1)*(upgcc*upgcc + vycc**2 + v2cc**2) )
. * (eion*ev + cfnidhdis*0.5*mg(1)*(upgcc*upgcc + vycc + v2cc) )
. * psordis(ix,iy)

c Ion energy source from drift heating
Expand All @@ -4637,18 +4639,18 @@ ccc call volave(nx, ny, j2, j5, i2, i5, ixp1(0,0), ixm1(0,0),
. + (1.0-cftiexclg)*seit(ix,iy)

c Atom kinetic energy source from recom & CX
seak(ix,iy) = 0.5*mg(1) * ( (up1cc-upgcc)*(up1cc-upgcc) + vycc**2 + v2cc**2 )
seak(ix,iy) = 0.5*mg(1) * ( (up1cc-upgcc)*(up1cc-upgcc) + vycc + v2cc )
. * (psorrg(ix,iy,1)+psicx(ix,iy))

c Atom kinetic energy source from diss
sead(ix,iy) = ( eion*ev + cfnidh*cfnidhdis*0.5*mg(1)*
. (upgcc*upgcc + vycc**2 + v2cc**2) )*psordis(ix,iy)
. (upgcc*upgcc + vycc + v2cc) )*psordis(ix,iy)


c Atom energy source from drift heating
seadh(ix,iy) = cfnidh2* ( -mg(1) *up1cc*upgcc
. * (psorrg(ix,iy,1)+psicx(ix,iy))
. + 0.5*mg(1) * (upgcc**upgcc + vycc**2 + v2cc**2)
. + 0.5*mg(1) * (upgcc**upgcc + vycc + v2cc)
. * (psor(ix,iy,1)+psorrg(ix,iy,1)+2*psicx(ix,iy)) )

reseg(ix,iy,1) = reseg(ix,iy,1)
Expand Down

0 comments on commit f5ce7d5

Please sign in to comment.