Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neutral gas temperature equation #47

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion bbb/bbb.v
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ tibg real [eV] /1.e-20/ +input #backgrd ion eng sor to limit te~tebg
iteb integer /2/ +input #exponent of (tebg*ev/te)**iteb for bkg sor
temin real [eV] /0.03/ +input #min value of te allow; if less, reset to
temin2 real [eV] /0.03/ +input #soft floor with te=sqrt[te**2+(temin2*ev)**2]
tgmin real [eV] /0.03/ # min value of tg allowed
pwrbkg_c real [W/m**3] /1.e3/ +input #const background factor in pwrebkg express
pwribkg_c real [W/m**3] /1.e3/ +input #const background factor in pwribkg express
cfwjdotelim real /1./ +input #factor scaling reduction of wjdote if te<tebg
Expand All @@ -106,7 +107,8 @@ pcolwid real [m] /0./ +input #width of plasma column for 1-D gas-box
eion real [eV] /5./ +input #energy that ionized ion is born with
ediss real [eV] /10./ +input
#elec eng lost by mol. dissoc; should = 2*eion
ebind real [eV] /13.6/ +input
cfdiss real /1./ # fraction of neutrals that are from dissociations.
ebind real [eV] /13.6/ +input
#binding energy carried by hydrogen ion
afix real [e] /50./ +input #Te,i for fixed cond.(concap), visc.(convis)
coef real /0.96/ +input #factor for ion viscosity: was 1.92 ???
Expand Down Expand Up @@ -218,8 +220,16 @@ rup21 real /1./ +input #rup21=up2/up1 if isup1up2
isupgon(ngspmx) integer /ngspmx*0/ +input #user:=1 for par neutral vel. eqn.; index igsp
isteon integer /1/ +input #user:turns on (=1) electron energy eqn.
istion integer /1/ +input #user:turns on (=1) ion enegy eqn.
istiexclg integer /0/ # Ti is only solved for ions (=1, cftiexclg=0.0).
istiinclg_test integer /0/ # not often used. for one to turn on Tg
# from a converged case without Tg turned on.
# One can start using =1 while cftiexclg=1,
# then slowly reducing cftiexclg to 0 and
# turn this switch back to =0.
isngon(ngspmx) integer /6*1/ +input #user:turns on (=1) neutral eqn.; index igsp
istgon(ngspmx) integer /6*0/ +input #user:turns on (=1) gas enegy eqn.
ismanufactured(ngspmx) integer /6*0/ # =0, pwrsorg = 0.0
# =1, turns on manufactured source pwrsorg for varification of gas enegy eqn.
isphion integer /0/ +input #user:turns on (=1) potential eqn.
isphiofft integer /0/ +input #user:=1 leaves old cur. on & ex=-d(phis)/dx; must be used
#with isphion=0
Expand Down Expand Up @@ -268,6 +278,11 @@ cnfy real /1./ +input #Y-flux coef for conv. in n-eq.
cnsor real /1./ +input #Coef for particle src. in n-eq.
cfneut real /1./ +input #Coef for fluid neutrals contrib's to resid's
cfnidh real /1./ +input #Coef for neutral-ion drift heating
cfnidh2 real /0./ +input #the above coef (cfnidh=1.0) is not exactly the real coef for neutral-ion drift heating term. That's why we introduce cfnidh2 but only for testing. Default =0.0: nothing; =1.0 (only for testing), remove the drift heating term.
cfnidhgy real /0./ +input # =1, consider vgy(,,1)**2 for n-i drift heating, assuming vy(,,0) negligible
cfnidhg2 real /0./ +input # =1, consider vg2(,,1)**2 for n-i drift heating, assuming v2(,,0) negligible
cfnidhdis real /0./ +input # =1, consider drift heating term (vg(,,1)-vg(,,2))^2 for molecular dissociation.
cfnidhmol real /0./ +input # =1, consider vg2(,,2)**2 for n-i drift heating, e.g. H2,D2 dissociation.
cfupcx real /1./ +input #Coef for nucx*(up_ion - up_gas) momentum coupling
cfticx real /1./ +input #Coef for nucx*(up_ion-up_gas)**2 heating in Ti Eq
cfupimpg real /0./ +input #Coef for impur up Cx/elast drag on up=0 imp gas
Expand All @@ -277,6 +292,10 @@ cnflux(ngspmx) real /ngspmx*1./ +input #coef for particle flux in n-eq. (resco)
chradi real /1./ +input #Coef for hyd. ioniz. rad. loss in elec. eng. eq.
chradr real /1./ +input #Coef for hyd. recomb. rad. loss in elec. eng. eq.
chioniz real /1./ +input #Coef for hydrogen ionization in elec. eng. eq.
cfizmol real /0./ #..Tom: Coef adding hyd ioniz rate to molec dissociation
# rate to mimic ioniz of mols not in svdiss.
# Tom added it for me, however surprised it is not
# present in V8.0.0
ifxnsgi integer /0/ +input #=1 sets ne for <sig*v>_i to cne_sgvi
cne_sgvi real [1/m**3] /1.e18/ +input #ne for <sig*v>_i if ifxnsgi=1
ctsor real /1./ +input #Coef for eng. src. in Ti eq. 0.5*mi*up**2*psor
Expand Down Expand Up @@ -324,6 +343,7 @@ vboost real /1./ +input #previously scaled eqp; no longer in use
cvgp real /1./ +input #Coef for v.Grad(p) ion/elec eng. terms
cvgpg real /1./ +input #Coef for v.Grad(pg) gas eng. terms
cfvgpx(1:nispmx) real /nispmx*1./ +input #Coefs for x components of v.grad(p) in ti-eq
cftiexclg real /1./ +input #Coef for including atom gas in Ti eq.
cfvgpy(1:nispmx) real /nispmx*1./ +input #Coefs for y components of v.grad(p) in ti-eq
cfvgpgx(1:ngspmx) real /ngspmx*0./ +input # Coefs for v*grad(pg) term (poloidal component) for Tg if isupgon=0.
cfvgpgy(1:ngspmx) real /ngspmx*0./ +input # Coefs for v*grad(pg) term (poloidal component) for Tg if isupgon=0.
Expand Down Expand Up @@ -469,6 +489,7 @@ istgcore(ngspmx) integer /ngspmx*1/ +input #switch for neutral-density core B.C.
#=0, set tg(ixcore,0,igsp)=ti(ixcore,0)
#=1, set fixed temp tgcore(igsp)
#if > 1, set zero grad; tg(,0,)=tg(,1,)
cftgticore(ngspmx) real /ngspmx*1./ +input #..
curcore(1:nispmx) real [A] /0.,30*0./ +input #value of current from core if isnicore=0
lzcore(1:nispmx) real [kg/ms] /nispmx*0./ +input #tor. ang. mom dens core bdry; phi eqn
lzflux(1:nispmx) real [kg/s**2]/nispmx*0./ +input #tor. ang. mom dens flux core bdry; up eqn
Expand Down Expand Up @@ -496,6 +517,8 @@ tepltl real [eV] /2./ +input #left plate Te B.C. if ibctepl=0
tipltl real [eV] /2./ +input #left plate Ti B.C. if ibctipl=0
tepltr real [eV] /2./ +input #right plate Te B.C. if ibcteplr=0
tipltr real [eV] /2./ +input #right plate Ti B.C. if ibctiplr=0
cftgtipltl(ngspmx) real /ngspmx*1./ +input #left plate Tg B.C. if ibctgpl=?
cftgtipltr(ngspmx) real /ngspmx*1./ +input #right plate Tg B.C. if ibctgpr=?
tbmin real [eV] /.1/ +input #min. wall & pf temp for extrap. b.c.(isextrt..)
nbmin real [m**-3] /1.e17/ +input #min. wall & pf den for extrap. b.c.(isextrn..)
ngbmin real [m**-3] /1.e10/ +input #min. core gas den for extrap. b.c.(isextrngc)
Expand Down Expand Up @@ -525,6 +548,8 @@ istgpfc(ngspmx) integer/ngspmx*0/ +input #switch for PF BC on Tg(,0,igsp)
# =2, set Tg scale length to lytg(1,
# =3, eng flux = 2Tg*Maxw-flux
# >2, report error in input
cftgtiwc(ngspmx) real /ngspmx*1./ +input #wall Tg B.C. if istgwc=?
cftgtipfc(ngspmx) real /ngspmx*1./ +input #pfc Tg B.C. if istgpfc=?
tewalli(0:nx+1) _real [eV] +input #/(nx+2)*0./
#inner wall Te for istepfc=1.; = tedge if not set
tiwalli(0:nx+1) _real [eV] +input #/(nx+2)*0./
Expand Down Expand Up @@ -871,12 +896,14 @@ recycmrb_use(0:ny+1,ngspmx,nxptmx) _real +maybeinput #outer plt mom-recycl coeff
recycmlb(0:ny+1,ngspmx,nxptmx) _real +maybeinput #total inner plt mom recycling coeff
recycmrb(0:ny+1,ngspmx,nxptmx) _real +maybeinput #total outer plt mom recycling coeff
recyce real /0./ +input #energy recycling/Rp for inertial gas
recycwe real /0./ +input #energy recycling/Rp for inertial gas on walls and prfs
recycl real /1./ +input #recycling coef. at a limiter (ix_lim)
recycml real /0.1/ +input #momentum recycling/Rp for gas at limtr
recycc(ngspmx) real /6*1./ +input #core recycling coeff. if isnicore=3
albedoc(ngspmx) real /6*1./ +input #core neut albedo for isngcore=0
albedolb(ngspmx,nxptmx) _real /1./ +input #albedo at inner plate if ndatlb=0
albedorb(ngspmx,nxptmx) _real /1./ +input #albedo at outer plate if ndatrb=0
cfalbedo real /2./ +input #coef. for Tg Eq. due to albedo
ndatlb(ngspmx,nxptmx) _integer /0/ +maybeinput #number of recycp data pts on inner plt
ndatrb(ngspmx,nxptmx) _integer /0/ +maybeinput #number of recycp data pts on outer plt
ydatlb(ngspmx,50,nxptmx) _real [m] /0./ +maybeinput #inner data pt location from sep.
Expand Down Expand Up @@ -1701,6 +1728,7 @@ volpsor(0:nx+1,0:ny+1,1:nisp) _real [1/s]+maybeinput #current src into ions in c
volmsor(0:nx+1,0:ny+1,1:nisp) _real [kg m/s**2] +maybeinput #up mom src in cell ix,iy
voljcsor(0:nx+1,0:ny+1) _real [A] +maybeinput #uniform core-region curr sor. in ix,iy
volpsorg(0:nx+1,0:ny+1,1:ngsp) _real [1/s]+maybeinput #curr source for gas in cell ix,iy
pwrsorg(0:nx+1,0:ny+1,1:ngsp) _real [1/s]+maybeinput #power source for gas in cell ix,iy; only for manufactured solution verification
pondpot(0:nx+1,0:ny+1) _real [V] /0./ +maybeinput #elec ponderomotive potential
psgov_use(0:nx+1,0:ny+1,1:ngsp) _real [1/m**3 s]+maybeinput #user-specified gas source
jcvsor real [A] /0./ +maybeinput #total core-region current for voljcsor
Expand Down Expand Up @@ -2076,6 +2104,7 @@ cfvli(nisp) _real #/nisp*0./+input #scal fac for individ ion rate nuvl
l_parloss real [m] /1.e20/ +input #parall length for nuvl loss rate
eqp(0:nx+1,0:ny+1) _real [1/m**3]#Te,i equipart. fact; needs *(Te-Ti)*vol
eqpg(0:nx+1,0:ny+1,ngsp) _real [1/m**3]#Tg,i equipart. fact; needs *(Tg-Ti)*vol
#..: modified to incorporate the separation of Tg and Ti.
engcoolm(0:nx+1,0:ny+1) _real [J/s] #cool rate ion/atoms by mols if ishymol=1
eeli(0:nx+1,0:ny+1) _real [J] #electron energy loss per ionization
pradhyd(0:nx+1,0:ny+1) _real [W/m**3] /0./#power radiated by hydrogen
Expand Down
Loading
Loading