Skip to content
Merged
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
59 changes: 59 additions & 0 deletions bbb/bbb.v
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ cfrecom real /1./ +input
igas integer /0/ +input #=1 invokes local rate eqn. for ng
ngbackg(ngspmx) real [1/m**3] /ngspmx*1.e14/ +input
#background gas density
cfbackg(ngspmx) real /ngspmx*1./ +input
# background gas source rescale factor
ingb integer /2/ +input
#background gas source=nuiz*ngbackg*
# (.9+.1*(ngbackg/ng)**ingb)
Expand Down Expand Up @@ -858,6 +860,63 @@ cftgtipltl(ngspmx) real /ngspmx*1./ +threadprivate #left plate Tg B.C.: tg
cftgtipltr(ngspmx) real /ngspmx*1./ +threadprivate #right plate Tg B.C.: tg = cftgtipltr*ti if istgrb=5
cgengmpl real /1./ +input #scale fac mol plate eng loss for Maxw
cgengmw real /1./ +input #scale fac mol wall eng loss for Maxw
isvacuummodel(ngspmx) integer /6*0/ +input #user:(=0) default model for neutral outer boundary conditions
# (=1) using DEGAS2-calculated tele-transport matrix, half-Mxwellian for outgoing neutrals
# (=2) CX-diffusion for outgoing neutrals
# (=3) combination for outgoing neutrals
cftelematrix(0:nx+1,0:nx+1,ngspmx) _real /0./ +maybeinput # tele-transport matrix if isvacuummodel > 0
cfpuffmatrix(0:nx+1,ngspmx) _real /0./ +maybeinput # placeholder for puffing matrix if isvacuummodel > 0
# assuming point puff source, so, the matrix shape is (1,nx)
cfteleout real /1./ +input # scale fac tele-transport neutral source for half-Maxw
fngyteleout(0:nx+1,ngspmx) _real # flux of tele-transport neutral going out of the outer boundary,
fngytelein(0:nx+1,ngspmx) _real # flux of tele-transport neutral coming back into the outer boundary,
# = fngyteleout*cftelematrix
fngytelemaxw(0:nx+1,ngspmx) _real # flux of tele-transport neutral going out of the outer boundary, assuming half-Maxw
fngytelediff(0:nx+1,ngspmx) _real # flux of tele-transport neutral going out of the outer boundary, assuming CX diffusion
# Three compoments: fngytelediff1 + fngytelediff2 + fngytelediff3
# 1) fngytelediff1 = c1*ng
# 2) fngytelediff2 = c2*dng/dtau, where dng/dtau is gradient of ng parallel to the wall
# 3) fngytelediff3 = c3*dng/dnu, where dng/dnu is gradient of ng along the wall normal
fngytelediff1(0:nx+1,ngspmx) _real # first component of fngytelediff
fngytelediff2(0:nx+1,ngspmx) _real # second component of fngytelediff
fngytelediff3(0:nx+1,ngspmx) _real # third component of fngytelediff
fngytelediff30(0:nx+1,ngspmx) _real # third component of fngytelediff before applying limiter
cftelelim real [m] /1./ +input # scale factor for fngytelediff3 limiter, limiting the maximum fngytelediff3 below lambda_i/lambda_n ~ 1.0
ntelelim real /2./ +input # exponent for fngytelediff3 limiter
lteleout real [m] /1./ +input # scale length used to calculate neutral Knusen number, Kn = lmfp/lteleout
Kn(0:nx+1,ngspmx) _real # Knusen number at the outer boundary, = lmfpn/lteleout, where lmfpn = sqrt(Tg/mg)/nucx
Knb1 real /0.01/ +input # lower bound of Knusen number
Knb2 real /1./ +input # upper bound of Knusen number
# if Kn <= Knb1, fngyteleout = fngytelediff
# else if Kn >= Knb2, fngyteleout = fngytelemaxw
# else fngyteleout = c1*fngytelemaxw + c2*fngytelediff
# where c1 = (Kn-Knb1)/(Knb2-Knb1), and c2 = 1-c1
fmgyteleout(0:nx+1,ngsp) _real # mom. flux of tele-transport neutral going out of the outer boundary,
fmgytelein(0:nx+1,ngsp) _real # mom. flux of tele-transport neutral coming back into the outer boundary,
# = 0. for current model, assuming wall absorb all the mom. and energy
fmgytelemaxw(0:nx+1,ngsp) _real # mom. flux of tele-transport neutral going out of the outer boundary, assuming half-Maxw
# fegytelemaxw = fngytelemaxw*mu_p
fmgytelediff(0:nx+1,ngsp) _real # mom. flux of tele-transport neutral going out of the outer boundary, assuming CX diffusion
# Three compoments: fmgytelediff1 + fmgytelediff2 + fmgytelediff3
# 1) fmgytelediff1 = fngytelediff1*mu_p
# 2) fmgytelediff2 = fngytelediff2*mu_p + 'something' ('something' ignored for current model)
# 3) fmgytelediff3 = fngytelediff3*mu_p
fmgytelediff1(0:nx+1,ngsp) _real # first component of fmgytelediff
fmgytelediff2(0:nx+1,ngsp) _real # second component of fmgytelediff
fmgytelediff3(0:nx+1,ngsp) _real # third component of fmgytelediff
fegyteleout(0:nx+1,ngsp) _real # eng. flux of tele-transport neutral going out of the outer boundary,
fegytelein(0:nx+1,ngsp) _real # eng. flux of tele-transport neutral coming back into the outer boundary,
# = 0. for current model, assuming wall absorb all the mom. and energy
fegytelemaxw(0:nx+1,ngsp) _real # eng. flux of tele-transport neutral going out of the outer boundary, assuming half-Maxw
# fegytelemaxw = fngytelemaxw*(0.5mu_p^2 + 2T), omit 0.5mu_p^2 for internal
fegytelediff(0:nx+1,ngsp) _real # eng. flux of tele-transport neutral going out of the outer boundary, assuming CX diffusion
# Three compoments: fegytelediff1 + fegytelediff2 + fegytelediff3
# 1) fegytelediff1 = fngytelediff1*(0.5mu_p^2 + 2Ti), omit 0.5mu_p^2 for internal
# 2) fegytelediff2 = fngytelediff2*(0.5mu_p^2 + 5/2Ti), omit 0.5mu_p^2 for internal
# 3) fegytelediff3 = fngytelediff3*(0.5mu_p^2 + 5/2Ti), omit 0.5mu_p^2 for internal
fegytelediff1(0:nx+1,ngsp) _real # first component of fegytelediff
fegytelediff2(0:nx+1,ngsp) _real # second component of fegytelediff
fegytelediff3(0:nx+1,ngsp) _real # third component of fegytelediff

***** Outpwall:
# Arrays used to communicate wall fluxes to a wall simulation code
Expand Down
13 changes: 13 additions & 0 deletions bbb/odesetup.m
Original file line number Diff line number Diff line change
Expand Up @@ -6715,6 +6715,19 @@ c_mpi call MPI_BARRIER(uedgeComm, ierr)
write(*,*) "atom energy equation. "
write(*,*) ""
endif
#if (isvacuummodel(1) .gt. 0) then # add warning messages, but not sure where is the best place to add
# write(*,*) ""
# write(*,*) ""
# write(*,*) " **** WARNING ****"
# write(*,*) "You are using neutral vacuum transport model with isvacuummodel > 0"
# if (isvacuummodel(1) .gt. 0) then
# write(*,*) "You set isvacuummodel(1) > 1, a DEGAS2 pre-calculated tele-transport matrix is required"
# endif
# write(*,*) "Here is your current tele-transport Matrix"
# if (cftelematrix(1,1,1) .eq. 0.0) then
# write(*,*) "All elements are ZEROS, you HAVE NOT set up your tele-transport matrix cftelematrix"
# endif
#endif

c... TODO: checks used to be on nigmx, a local parameter set in
c... pandf while these checks were located there. Checks moved
Expand Down
Loading
Loading