Dear Fluka experts,
I’m trying to model volumetric source of complex geometry which is a cylinder with a hole (as shown on the picture). I’ve tried to describe it mathematically by using source.f routine but the result was not satisfying. Is it possible to describe this geometry of the source without using source.f routine? Can I use MREG or MMAT in the source.f user routine?
Thank you in advance,
it is possible to use the
CALL GEOREG ( X, Y, Z, NREG, IDISC )
subroutine for this purpose. It will return the number of the region (NREG) which the point with the coordiantes X, Y, Z belongs to. (Note: There are some ambiguities if the point is on a border between regions. IDISC variable indicates if the point is outside the geometry.)
I prepared a quick proof of concept source routine and flair project: source.f (9.8 KB) region_source.flair (2.3 KB)
The source routine uses a recursive subroutine, which first uniformly samples in a box around the volume, then check the region number and finally rejects / accepts the location.
The boundaries of the box and region number of the desired volume is provided at the initial call.