functions in hex.i - t
track_combine
nlist = track_combine(nm,cm,sm, np,cp,sp, c, s) combine two track_reduce results NM,CM,SM, and NP,CP,SP, which represent the first and second halves of a set of rays. See bi_dir for a typical application. The returned NLIST is NM+NP, or NM+NP-1 for those rays where the final CM is identical to the initial CP. C, S, together with NLIST are the output arrays, as for track_reduce. Interpreted function, defined at i0/hex.i line 270SEE ALSO: track_reduce, bi_dir
track_integ
result= track_integ(nlist, transp, selfem, last) integrates a transport equation by doing the sums: transparency(i) = transparency(i-1) * TRANSP(i) emissivity(i) = emissivity(i-1) * TRANSP(i) + SELFEM(i) returning only the final values transparency(n) and emissivity(n). The NLIST is a list of n values, so that many transport integrals can be performed simultaneously; sum(NLIST) = numberof(TRANSP) = numberof(SELFEM). The result is 2-by-dimsof(NLIST). If TRANSP is nil, result is dimsof(NLIST) sums of SELFEM. If SELFEM is nil, result is dimsof(NLIST) products of TRANSP. TRANSP and SELFEM may by 2D to do multigroup integrations simultaneously. By default, the group dimension is first, but if LAST is non-nil and non-zero, the group dimension is second. In either case, the result will be ngroup-by-2-by-dimsof(NLIST). track_solve is the higher-level interface. Interpreted function, defined at i0/hex.i line 397SEE ALSO: track_reduce, track_solve, track_solve
track_reduce
nlist= track_reduce(c, s) or nlist= track_reduce(c, s, rays, slimits) compresses the C and S returns from the tracking routines (see hex5_track) to the following form: [cell1,cell2,cell3,..., cell1,cell2,cell3,..., ...] [s1-s0,s2-s1,s3-s2,..., s1-s0,s2-s1,s3-s2,..., ...] returning nlist as [#hits, #hits, ...] In this form, any negative #hits are combined with the preceding positive values, and #hits=1 (indicating a miss) appear as #hits=0 in nlist. Hence, nlist always has exactly Nrays elements. If RAYS is supplied, it is used to force the dimensions of the returned nlist to match the dimensions of RAYS (the value of RAYS is never used). The RAYS argument need not have the trailing 2 dimension, so if you specified RAYS as [P,Q] if the call to hex5_track, you can use just P or Q as the RAYS argument to track_reduce. If SLIMITS is supplied, it should be [smin,smax] or [smin,smax]- by-dimsof(nlist) in order to reject input S values outside the specified limits. The C list will be culled appropriately, and the first and last returned ds values adjusted. With a non-zero flip= keyword, the order of the elements of C and S within each group of #hits is reversed, so that a subsequent track_solve will track the ray backwards. If you use this, both the ray direction input to the tracking routine and any SLIMITS argument here should refer to the reverse of the ray you intend to track. Interpreted function, defined at i0/hex.i line 158SEE ALSO: hex5_track, c_adjust, track_solve, track_integ, bi_dir,
track_combine
track_solve
result= track_solve(nlist, c, s, akap, ekap, last) integrates a transport equation for NLIST, C, and S returned by track_reduce (and optionally c_adjust). The RAYS argument is used only to set the dimensions of the result. AKAP and EKAP are mesh-sized arrays of opacity and emissivity, respectively. They may have an additional group dimension, as well. The units of AKAP are 1/length (where length is the unit of S), while EKAP is (spectral) power per unit area (length^2), where the power is what ever units you want the result in. The emission per unit volume of material is EKAP*AKAP; an optically thick block of material emits EKAP per unit surface. The NLIST is a list of n values, so that many transport integrals can be performed simultaneously; sum(NLIST) = numberof(AKAP) = numberof(EKAP). The result is 2-by-dimsof(NLIST), where the first element of the first index is the transmission fraction through the entire ray path, and the second element of the result is the self-emission along the ray, which has the same units as EKAP. If EKAP is nil, result is dimsof(NLIST) -- exactly the same as the transparency (1st element of result) when both EKAP and AKAP are specified. If AKAP is nil, result is dimsof(NLIST). In this case, EKAP must have units of emission per unit volume instead of per unit area; the result will be the sum of EKAP*S along each ray. AKAP and EKAP may by 2D to do multigroup integrations simultaneously. By default, the group dimension is first, but if LAST is non-nil and non-zero, the group dimension is last. In either case, the result will be ngroup-by-2-by-dimsof(NLIST). To use in conjuction with hex5_track, one might do this: c= hex5_track(mesh, rays, s); nlist= track_reduce(c, s, rays); c_adjust, c, mesh; // if necessary result= track_solve(nlist, c, s, akap, ekap); Interpreted function, defined at i0/hex.i line 456SEE ALSO: track_reduce, hex5_track