Extra small distance in CG
Extra small distance (epsilon) is utilized in Combinatorial Geometry to avoid numerical error.
Usually, we do not need to modify this extra small distance in egs5 calculation using CG.
When we set up small geometry, we may need to consider adjusting of epsilon.
Due to a nature of CG program, some fraction of geometry must be larger than epsilon.
As a measuement of geometry size, we can consider charD of egs5 code.
For example, we can say that 1% of charD must be greater than epsilon.
Default value of epsilon is set as 1.0e-4 cm.
If minimum value of charD is less than 1.0e-2 cm, epsilon should be modified
as value smaller than (0.01 x charD).
Example of wrong result when using inadequate value of epsilon is described
here.
In this example, both ucsampl5.f and ucsampcg.f were modified to
investigate validity of CG geometry.
Initial geometry of both codes are the iron slab of 3 cm.
New geometry of both code is 10 thin layer, whose thickness is 1 micro meter.
The total thickness of new geometry is 10 micro meter.
Geometries are shown in
ucsampl5_x.pdf and
ucsampcg_x.pdf .
The ratio of energy deposition in each region is shown
here .
When epsilon=1.e-4, the output of ucsampl5_x and ucsampcg_x differs by factor of two.
When epsilon=1.0e-5 or 1.0e-6, the outputs of ucsampl5_x and ucsampcg_x are the identical.
When user uses tiny body or zone in CG like this example, user needs to modify
values of these variables.
How do we modify epsilon?
We have lines of
data cgmnst/1.0d-4/
data cgeps1/1.0d-4/
data cgeps2/1.0d-4/
data rcceps/1.0d-4/
data trceps/1.0d-4/
data rppeps/1.0d-4/
data spheps/1.0d-4/
data toreps/1.0d-4/
data elleps/1.0d-4/
data arbeps/1.0d-4/
data receps/1.0d-4/
data wedeps/1.0d-4/
data boxeps/1.0d-4/
data hafeps/1.0d-4/
data hexeps/1.0d-4/
data teceps/1.0d-4/
data geleps/1.0d-4/
in auxcode/cg_related.f .
We need to modify values of begining 3 lines and necessary lines.
If we use XXX and YYY type of body in CG input, we need to modify
values of XXXeps, YYYeps, cgmnst, cgeps1 and cgeps2.
For example, if rpp is used in input, we need to modify values of rppeps, cgmnst, cgeps1 and cgeps2.
If sph and rcc are used in input, we need to modify values of
spheps, rcceps, cgmnst, cgeps1 and cgeps2.
This modification of epsilon values can be done from user code.
Of course, a line of
include 'auxcommons/geom_common.f'
needs to be added in the user code in this case.
As we may have enhansement of numerical error in quadratic surface,
we need to be careful in setting small values.
Dynamic range of geometry size in CG is linked.
(English,
Japanese)
Mr.Sato of Aloka corpolation asked us the identical problem in the same period.
Y.Namito (KEK)
Last modified on 10 June 2009.