Skip to content

Commit

Permalink
New switch bbb.isimpwallsor, which is used if one wants to add explic…
Browse files Browse the repository at this point in the history
…it ion wall sources
  • Loading branch information
Umansky committed Feb 15, 2024
1 parent abc7d61 commit da03b99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions bbb/bbb.v
Original file line number Diff line number Diff line change
Expand Up @@ -2953,6 +2953,8 @@ fniyos_io integer /0/ +maybeinput #=0,a flag to signal whether to read/wr
feeyosn_io integer /0/ +maybeinput #=0,a flag to signal whether to read/write kyi_use
feiyosn_io integer /0/ +maybeinput #=0,a flag to signal whether to read/write kyi_use
isvolsorext integer /0/ +maybeinput #volsor sources if =0; or user sors if =1
isimpwallsor integer /0/ +maybeinput #user imp ion wall fluxes; may have
# prob with ixendo for nyomitmx>0
***** Interp:
#Variables for the interpolation
Expand Down
19 changes: 11 additions & 8 deletions bbb/odesetup.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ cc Use(Rccoef)

*=======================================================================
*//computation//

id = 1
call gallot("Grid",0)
call gallot("Stat",0)
Expand Down Expand Up @@ -737,7 +736,6 @@ cc ixmdp(2) = ixpt1(2) + nxcore(igrid,2) - 1 + nxxpt
* ---------------------------------------------------------------------
* preliminaries.
* ---------------------------------------------------------------------

* -- check nx, ny, nhsp --
if (nx.lt.1 .or. ny.lt.1 .or. nhsp.lt.1) then
call xerrab ('ueinit -- faulty argument nx, ny, nhsp')
Expand Down Expand Up @@ -1075,6 +1073,7 @@ call syld96(matt,matp,cion,cizb,crmb)
c ... Set up new grid geometry, if desired.
if(newgeo .eq. 1) then
call nphygeo

c... "zero out" sx at ixpt2(1) if isfixlb=2 and ixpt1(1).le.0 to prevent
c... flux thru cut
if (isfixlb(1).eq.2 .and. ixpt1(1).le.0 .and. ixpt2(1).ge.0) then
Expand Down Expand Up @@ -1238,7 +1237,6 @@ call sfill(ny+2, flalftgy, flalftgya(0:), 1)
flalftgya(0) = 1.e20
flalftgya(ny) = 1.e20
endif

c... set wall sources
call walsor

Expand All @@ -1251,15 +1249,17 @@ call sfill(ny+2, flalftgy, flalftgya(0:), 1)
c... set volume power sources if the internal Gaussian sources desired
if (isvolsorext == 0) call volsor

c ... Set impurity sources on inner and outer walls.
call imp_sorc_walls (nx, nzspt, xcpf, xcwo, sy(0,0), sy(0,ny),
c ... Set impurity sources on inner and outer walls; poss prob if nyomitmx>0
if (isimpwallsor == 1) then #impurity wall-flux sources
call imp_sorc_walls (nx, nzspt, xcpf, xcwo, sy(0,0), sy(0,ny),
. ixp1(0,0), ixp1(0,ny), fnzysi, fnzyso)
endif

c ... Initialize molecular thermal equilibration array in case not computed
do igsp = 1,ngsp
call s2fill (nx+2, ny+2, 0.0e0, eqpg(0:,0:,igsp), 1, nx+2)
enddo

*--- bbbbbb begin ifloop b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
if (ig .eq. 1 .and. restart .eq. 0) then
*--- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Expand Down Expand Up @@ -1722,8 +1722,6 @@ call s2fill (nx+2, ny+2, 0., nueli(0:,0:,ifld), 1, nx+2)
enddo
enddo

ccc write(*,*) 'Just initialized psorc, etc.in ueinit; nisp = ',nisp

do ifld = 1, nusp
call s2fill (nx+2, ny+2, 0., fmixy(0:,0:,ifld), 1, nx+2)
call s2fill (nx+2, ny+2, 0., frici(0:,0:,ifld), 1, nx+2)
Expand Down Expand Up @@ -1810,6 +1808,11 @@ call pandf1(-1,-1,0,ipar(1),tv,yl,yldot)
endif
*--- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

c ... Now that new indexing (e.g., ixendi, ixendo etc.) is done, set
c ... impurity wall sources that depend on these indices.
ccc call imp_sorc_walls (nx, nzspt, xcpf, xcwo, sy(0,0), sy(0,ny),
ccc . ixp1(0,0), ixp1(0,ny), fnzysi, fnzyso)

c ... Set variable-normalization array.
call set_var_norm (iscolnorm, neq, numvar, yl, norm_cons,
. floor_cons, suscal)
Expand Down

0 comments on commit da03b99

Please sign in to comment.