|
29 | 29 | * Only in step 4 will any simulation happen, and per default all geometries |
30 | 30 | * defined before the master, but after the previous will be simulated here. |
31 | 31 | * |
32 | | -* There is a dedicated manual available for the Union_components |
| 32 | +* There is a dedicated manual available for the Union components |
33 | 33 | * |
34 | 34 | * Algorithm: |
35 | | -* Described elsewhere |
| 35 | +* The general algorithm for the Union system is described elsewhere. |
| 36 | +* |
| 37 | +* I here give a brief introduction as to what changes occur when using an |
| 38 | +* inhomogenous process in your Union make material. It is expected that you |
| 39 | +* understand the basic algorithm of the Union system before reading this. |
| 40 | +* |
| 41 | +* In Union, the neutron moves through a network of objects in a 3 dimensional world. |
| 42 | +* When the neutron hits a material, the probability to scatter is calculated, |
| 43 | +* and a Monte Carlo choice is taken, as to whether that neutron should scatter, |
| 44 | +* or pass through. For a homogenous material (i.e constant attenuation coefficient <span class="latex">$\mu$</span>), |
| 45 | +* this probability is the Beer-Lambert law, |
| 46 | +* |
| 47 | +* <div class="latex"> |
| 48 | +* $P_s = 1 - e^{-\mu l}$ |
| 49 | +* </div> |
| 50 | +* |
| 51 | +* Where <span class="latex">$P_s$</span> is the scattering probability, |
| 52 | +* and <span class="latex">$l$</span> is length of the neutron path throughout the object. |
| 53 | +* |
| 54 | +* |
| 55 | +* For an inhomogenous material, this Beer-Lambert law must be modified, as <span class="latex">$\mu$</span> is a function of the position. |
| 56 | +* Therefore the Beer-Lambert law becomes, |
| 57 | +* |
| 58 | +* <div class="latex"> |
| 59 | +* $P_s = \int^l_0 1 - e^{-\mu(l')l'}dl'$ |
| 60 | +* </div> |
| 61 | +* |
| 62 | +* Calculating this <span class="latex">$\mu$</span> in the inhomogenous case is often trivial, but not feasible, |
| 63 | +* from a software development point of view (seeing as many different functions of <span class="latex">$\mu$</span> might be wanted). |
| 64 | +* Instead the inhomogenous processes performs an approximate integral, by |
| 65 | +* evaluating <span class="latex">$\mu$</span> at a number of points along the neutron path (This number is in fact number_of_sample_points). |
| 66 | +* |
| 67 | +* For this incoherent process, the linear attenuation coefficient is, |
| 68 | +* |
| 69 | +* <div class="latex"> |
| 70 | +* $\mu = pack/V_u * 100 * \sigma$ |
| 71 | +* </div> |
| 72 | +* |
| 73 | +* Where <span class="latex">$pack$</span> is the packing factor of the material (defaults to 1), <span class="latex">$V_u$</span> is the |
| 74 | +* Unit cell volume, and <span class="latex">$\sigma$</span> is the scattering cross section in barns. |
| 75 | +* <span class="latex">$\mu$</span> therefore has units of <span class="latex">$m^{-1}$</span>. |
| 76 | +* |
| 77 | +* For this component each factor in the attenuation coefficient can be a "tiny expression". |
| 78 | +* This means that it can be a mathematical equation such as <span class="latex">$\sigma_{expr} = "5.08 + 1000 * z * 2.35"$</span>. |
| 79 | +* When the attenuation coefficient is calculated, then the current value of <span class="latex">$z$</span> is used to get <span class="latex">$\sigma$</span>. |
| 80 | +* |
| 81 | +* The parameters that the tiny expression can rely upon are currently: |
| 82 | +* The positions, <span class="latex">$x, y, z$</span> |
| 83 | +* The velocities <span class="latex">$vx, vy, vz$</span> |
| 84 | +* and the time <span class="latex">$t$</span> |
| 85 | +* |
| 86 | +* For more information on tiny expressions, see the link below. |
| 87 | +* |
| 88 | +* |
36 | 89 | * |
37 | 90 | * %P |
38 | 91 | * INPUT PARAMETERS: |
|
0 commit comments