The USER_PARTICLE_INFO
routine enables
you to access or update particle data that is not directly accessible
in the user interface. For example:
particle seed (
ISEED
) (required for anything that uses random numbers)particle mode (
PMODE
) (required to distinguish 'regular' particles from 'wall (film)' particles)breakup flag (
BREAKUP
) (indicates whether particle broke up due to external forces)
The USER_PARTICLE_INFO
routine is called
with three arguments (where all three arguments are integer values):
For example CALL USER_PARTICLE_INFO(IACTION,IWHAT,IVALUE)
.
IACTION
can have two values, 1
or 2
.
1
transfers the value stored inIVALUE
back to the particle tracker to be used there2
picks up the requested data from internal tracker data structures and stores it inIVALUE
for use in User Fortran code.
IWHAT
can have values of 1
, 2
or 3
, and these refer
to the different internal particle properties ISEED
, PMODE
and BREAKUP
respectively.
The proper use of USER_PARTICLE_INFO
is
as follows (the example is for a particle seed):
C C---- Pick up particle seed from tracker C IACTION = 2 IWHAT = 1 CALL USER_PARTICLE_INFO(IACTION,IWHAT,ISEED) <User code follows, that needs and updates ISEED> C C---- Store updated particle seed back to tracker C IACTION = 1 IWHAT = 1 CALL USER_PARTICLE_INFO(IACTION,IWHAT,ISEED)
You can retrieve or write an integer IVALUE
to any of these data properties, which in turn will affect the internal
particle calculations.