Description
NWL utils currently rely on using some value for wall_s to root solve for theta, assuming the points lie on the surface defined by that wall_s value. For a custom FW (constant offset or whatever), this doesn't work.
My suggestion is an approach in which the surface used for calculating the NWL is already broken up into the appropriate patches during the geometry creation phase (using the point cloud definition and some cubit commands). The surface source retains the surface id which the particle crossed. The corners of each bin would then also be known ahead of time (from the point cloud). I think dagmc files retain the same surface IDs as in cubit, if not this is much harder. No root finding is required for this approach, and it works the same for a wall_s surface and a custom one.
The following steps jump to mind to implement this.
- Add a method to the surface object that build the faceted representation in cubit, keeping things like surface id and area as metadata
- Add a function that extracts the source information and puts it in some useful format (probably use the centroid of each bin to refer to the NWL value)
An alternative would be to find the poloidal angle for which the offset vector from the plasma surface in the toroidal plane passes through the point where the neutron crossed the first wall. This approach can be used to bin the crossings and perform the area approximation/normalization in a similar manner to how it is currently implemented. I think this should be provided as an alternate method, alongside the current implementation.
I'd suggest the following steps to implement this.
- Add a utility to find where the normal on a poloidal profile will pass through a point in space. There is potential with the convex profiles to have multiple points on the profile satisfying the condition, but for small offsets this is not really a concern (known issue with parastell). This is also useful for creating theta, phi plots of mesh tally results.
- Modify NWL utils to use either wall_s or the utility in 1 to find theta
- Modify NWL utils to use the utility in 1 to do the area approximation/normalization
2 and 3 could be combined.
Activity