I am trying to set up a volumetric source of an arbitrary geometry given by an external file. Therefore I create a voxel geometry but I would like every voxel to be a separate source (different weights for every source). For now I set up a second data file to use with source_newgen.f which generates one source in every single voxel.
Is it possible to change this in a way that every single voxel is a volumetric source (and every point inside the voxel can be the source) as it can be defined with the BEAMPOS card and SDUM CART-VOL?
I already read through this thread. Maybe I overlooked something but it did not help me any further than where I am now.
To my knowledge it is possible to set up different weights for particles coming from different source by using directly the routine source_newgen.f with the appropriate variables.
It is also possible to have a spatial distribution in a voxel directly in the routine as long as you know its position.
Could you forward us your routine/ input file/ source for us to have a closer look?
I am using source_newgen.f with a changed “read_phase_space_file” subroutine in source_library.inc. The new routine “read_phase_position_file” was not implemented by myself though and as I am also new to fortran I am not 100% sure why certain things were done/changed (especially that probability/intensity part in the end).
Your question caused a bit of confusion for us, since the voxel geometry (as it is used in FLUKA, see the manual), is not related to the source, and we thought you want to create a source based on one of that.
But, after taking a look at you input files / user routines, it is clear, that you want to create a voxel like distributed source.
The only thing missing from your source routine was to distribute the source location around the center of the “voxel”. This can be done easily in the source routine by: