svalinn / r2s-act

Rigorous 2 Step Activation Workflow
4 stars 7 forks source link

Void rejection with uniform sampling in source.F90 #19

Closed erelson closed 11 years ago

erelson commented 11 years ago

Previously had thought that void fraction information for each voxel would be needed by MCNP in order to do void rejection with uniform sampling for photon transport... On pondering this, I believe, and think I have shown, that void rejection is easier to implement.

If MCNP finds that a particle starts in a void, we can resample within the same voxel (rather than resample entire problem) until a valid position is found.

I'm almost certain this is correct, and easily compatible with the current implementation (i.e. the 'gammas' file format for uniform sampling), but need to ponder/discuss, implement and test this. This is basically the same solution that I applied to void rejection when voxel sampling a few weeks ago.

gonuke commented 11 years ago

What could be most valuable, is to know which DAGMCNP cells are in each voxel. For the source sampling phase, this may be more important than the material volume fractions since it can limit the number of very expensive point-in-volume tests you need to do.

Another little implementation details is that it might be best to check the implicit complement last, as it is often the most complicated, and often void. It might be possible to check all the NON-implicit complement first and then deem it in the implicit complement if not in the others - and never actually test the implicit complement....

erelson commented 11 years ago

Current status is that this is implemented - both for resampling within the voxel, and resampling the entire problem. The latter is not necessarily a fair game. Two relevant options added to r2s.cfg (also discussed in #20)