02.05.2014 Views

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.5. The subroutine package pengeom 169<br />

(if any) and so on. The process ends when we have determined the body IBODY that<br />

contains the point, or as soon as we conclude that the point is outside the material<br />

system (i.e. in a void region). Notice that, when we have found that a module KB does<br />

contain the point, to do the next step we only need to consider the surfaces KS such<br />

that FLAG(KB, KS) = 1, 2 or 4.<br />

After the body IBODY that contains the initial position of the particle has been identified,<br />

we can call subroutine STEP to move the particle a certain distance DS, dictated<br />

by penelope, along the direction (U,V,W). We start by checking whether the track segment<br />

crosses any of the surfaces that limit IBODY. If after travelling the distance DS the<br />

particle remains within the same body, DSEF is set equal to DS and control is returned<br />

to the main program. It is worth noting that the surfaces KS that define the initial body<br />

are those with FLAG(IBODY,KS)=1 and 2 (proper limiting surfaces) or =3 (limiting surfaces<br />

of limiting bodies). Although it may happen that a surface with FLAG=3 does not<br />

directly limit the body, subroutine STEP cannot know this from the information at hand<br />

and, consequently, all surfaces with FLAG=3 are analyzed after each move. It is clear<br />

that, to reduce the number of surfaces to be considered, we should minimize the number<br />

of bodies used to delimit other bodies.<br />

When the particle leaves IBODY and enters a new material, STEP stops it just after<br />

crossing the interface and determines the new body and material (in this case, the output<br />

values of IBODY and MAT are different from the input ones). To do this, the limiting<br />

surfaces of the parent module and of all the sisters of the initial body must be analyzed (if<br />

they exist). If the new position is outside the parent module, we must analyze all surfaces<br />

that limit the parent’s sisters and go downward in the genealogical tree to determine the<br />

module that contains the point and, if necessary, go upwards again to find out what the<br />

new body is. If the new material is the same as in the initial body, the particle is allowed<br />

to move the remaining distance. Void regions (strict vacuum) are crossed freely (i.e. the<br />

distance travelled within these regions is not counted). Furthermore, when the particle<br />

starts from outside the enclosure, it is allowed to propagate freely until it reaches a<br />

material body. The particle is stopped when it penetrates a different material or when<br />

it leaves the system (i.e. when, after leaving a material body, its straight trajectory does<br />

not intersect a non-void body; in this case, the value MAT=0 is returned). Evidently,<br />

the speed of the geometry subroutines depends greatly on the structure of the modules’<br />

genealogical tree. The responsibility of optimizing it rests with the user.<br />

When STEP moves the particle across an interface, there is a risk that, owing to<br />

numerical truncation errors, the particle is placed on the wrong side of the interface (i.e.<br />

the track is stopped just before the interface). If this occurs, the program could go into<br />

an endless loop in which STEP repeatedly tries to move the particle a very small distance<br />

(of the order of 10 −15 cm) towards the interface but does not succeed, i.e. the particle<br />

is trapped at the interface. To avoid this collapse of the trajectory, after each interface<br />

crossing, STEP applies an additional small displacement (∼ 10 −8 cm) in the direction of<br />

movement, which is physically irrelevant and sufficient to compensate for the effect of<br />

truncation errors. The same strategy is used in subroutine LOCATE: when the particle<br />

is too close to an interface, it is moved 10 −8 cm along the surface gradient direction

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!