From da03b9939e72f3f8f0347fe2138c58cb52d183f3 Mon Sep 17 00:00:00 2001 From: Umansky Date: Thu, 15 Feb 2024 10:07:37 -0800 Subject: [PATCH] New switch bbb.isimpwallsor, which is used if one wants to add explicit ion wall sources --- bbb/bbb.v | 2 ++ bbb/odesetup.m | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bbb/bbb.v b/bbb/bbb.v index 4dd6182f..516c4211 100755 --- a/bbb/bbb.v +++ b/bbb/bbb.v @@ -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 diff --git a/bbb/odesetup.m b/bbb/odesetup.m index 2cbc559f..d012b270 100755 --- a/bbb/odesetup.m +++ b/bbb/odesetup.m @@ -63,7 +63,6 @@ cc Use(Rccoef) *======================================================================= *//computation// - id = 1 call gallot("Grid",0) call gallot("Stat",0) @@ -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') @@ -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 @@ -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 @@ -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 @@ -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) @@ -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)