{"action":"created","issue":{"url":"https://api.github.com/repos/mit-crpg/openmc/issues/732","repository_url":"https://api.github.com/repos/mit-crpg/openmc","labels_url":"https://api.github.com/repos/mit-crpg/openmc/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/issues/732/comments","events_url":"https://api.github.com/repos/mit-crpg/openmc/issues/732/events","html_url":"https://github.com/mit-crpg/openmc/pull/732","id":181310831,"number":732,"title":"Track Density-Weighted Average MGXS","user":{"login":"wbinventor","id":209492,"avatar_url":"https://avatars.githubusercontent.com/u/209492?v=3","gravatar_id":"","url":"https://api.github.com/users/wbinventor","html_url":"https://github.com/wbinventor","followers_url":"https://api.github.com/users/wbinventor/followers","following_url":"https://api.github.com/users/wbinventor/following{/other_user}","gists_url":"https://api.github.com/users/wbinventor/gists{/gist_id}","starred_url":"https://api.github.com/users/wbinventor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbinventor/subscriptions","organizations_url":"https://api.github.com/users/wbinventor/orgs","repos_url":"https://api.github.com/users/wbinventor/repos","events_url":"https://api.github.com/users/wbinventor/events{/privacy}","received_events_url":"https://api.github.com/users/wbinventor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-06T02:30:23Z","updated_at":"2016-10-06T21:15:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/732","html_url":"https://github.com/mit-crpg/openmc/pull/732","diff_url":"https://github.com/mit-crpg/openmc/pull/732.diff","patch_url":"https://github.com/mit-crpg/openmc/pull/732.patch"},"body":"This PR fixes an issue in the `MGXS.get_subdomain_avg_xs(...)` method, among a few other minor bug fixes. Currently, this method will take the geometric average of the MGXS for a bunch of distribcells or mesh cells. However, the geometric average does not preserve global reactivity.\r\n\r\nInstead, a *track density-weighted (TD-weighted)* average MGXS should be computed. Fortunately, this is as simple as substituting `Tally.summation(...)` for `Tally.average(...)` in the `get_subdomain_avg_xs(...)` method. In effect, this computes the  average MGXS from tally sums which are equivalent to what one would obtain if an explicit cell or material tally were specified for the subdomains of interest. And as my thesis broadly confirms, the TD-weighted average MGXS does indeed preserve global reactivity.\r\n\r\nI made these changes a few months ago, and ran into some issues when merging with the develop branch earlier today due to #723 and #725. As a result, this PR is likely not ready for merging - I'm not yet sure I've fixed all of the issues. I haven't been able to run my scripts which use TD-weighted MGXS since something with the new `MeshFilter` is breaking when loading from a statepoint. I'll post here again once I have a chance to sort that out."},"comment":{"url":"https://api.github.com/repos/mit-crpg/openmc/issues/comments/252090933","html_url":"https://github.com/mit-crpg/openmc/pull/732#issuecomment-252090933","issue_url":"https://api.github.com/repos/mit-crpg/openmc/issues/732","id":252090933,"user":{"login":"smharper","id":4622797,"avatar_url":"https://avatars.githubusercontent.com/u/4622797?v=3","gravatar_id":"","url":"https://api.github.com/users/smharper","html_url":"https://github.com/smharper","followers_url":"https://api.github.com/users/smharper/followers","following_url":"https://api.github.com/users/smharper/following{/other_user}","gists_url":"https://api.github.com/users/smharper/gists{/gist_id}","starred_url":"https://api.github.com/users/smharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smharper/subscriptions","organizations_url":"https://api.github.com/users/smharper/orgs","repos_url":"https://api.github.com/users/smharper/repos","events_url":"https://api.github.com/users/smharper/events{/privacy}","received_events_url":"https://api.github.com/users/smharper/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T21:15:23Z","updated_at":"2016-10-06T21:15:23Z","body":"Sorry, #725 broke statepoint backwards compatibility with mesh filters.  Previously, the `bins` for mesh filters were mesh indices but #725 changed that to mesh ids.\r\n\r\nIf your statepoints are for big runs that are hard to rebuild, I can probably write a script for you to manually convert the indices to ids in your statepoints."}}
{"actor":{"display_login":"smharper"}}