Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/fastAerosol/README.txt is written in an unsupported language. File is not indexed.

0001  =========================================================
0002                       Geant4 - FastAerosol advanced example
0003  =========================================================
0004 
0005                              README
0006                       ---------------------
0007 Authors:
0008 
0009 Ara Knaian    : ara@nklabs.com
0010 Nate MacFadden: natemacfadden@gmail.com
0011 NK Labs, LLC (http://www.nklabs.com)
0012 
0013 Related Publication:
0014 
0015 MacFadden, N., Knaian, A., 2020, "Efficient Modeling of Particle
0016 Transport through Aerosols in GEANT4", Manuscript in preparation.
0017 
0018 ----------------------
0019 
0020  Using the FastAerosol geometry classes, it is possible to efficiently
0021  and accurately simulate particle transport through aerosols containing
0022  billions of randomly-positioned droplets, using an ordinary workstation.
0023  This example demonstrates the use of these classes. It is based off
0024  exampleB1.
0025 
0026  1- GEOMETRY DEFINITION
0027 
0028    FADetectorConstruction builds a user-defined-shape aerosol of
0029    non-intersecting, arbitrarily-shaped droplets. The default
0030    bulk shape is a 500 x 500 x 5000 mm box centerred at the origin;
0031    the default droplet shape is a r = 1 mm sphere. Intersection checking
0032    for non-spherical droplets is performed with the droplet's bounding
0033    raidus. These droplets are randomly placed in the bulk.
0034 
0035    A 500 x 500 x 50 mm box-shaped aluminum detector is placed at
0036    (0,0,2625) mm so that particles shot along +Z from (0,0,-2612.5) mm
0037    travel through the aerosol before being captured in the detector.
0038 
0039    The background material is atmospheric air at an altitude of 14 km.
0040    The droplet material is liquid water. 
0041 
0042  2- AEROSOL MODELLING
0043 
0044    The example can be configured to allow modeling of the aerosol using 
0045    one of three methods, to allow for benchmarking and testing.
0046    The methods are (a) using the demonstrated FastAerosol class,
0047    (b) using a single low-density volume, and (c) using parameterized
0048    volumes. Alternating between these build methods can be done by
0049    setting one of "/geometry/fastAerosolCloud", "/geometry/smoothCloud",
0050    and "/geometry/parameterisedCloud" true for a, b, and c respectively.
0051 
0052    By default, FastAerosol dynamically populates droplets in the bulk
0053    as particles transport through it. This reduces memory consumption,
0054    especially when the number of primaries is small compared to the
0055    number of droplets. Pre-population is slower and uses more memory,
0056    but allows saving the droplet distribution over the full volume.
0057    Pre-population may be enabled using the "/geometery/prePopulate true"
0058    UI command. The example saves the droplet positions in files called
0059    "distribution_r???mm_n???mm-3.csv" where ??? denotes the droplet
0060    radius and number density respectively).
0061 
0062    User-specified distibution functions for droplet position and rotation
0063    may be specified for FastAerosol simulations. Examples of this can be
0064    found in lines 311-317 and 326-330 of FADetectorConstruction.cc.
0065 
0066    The example can be configured to model the aerosol using a
0067    G4PVParameterized object, instead of using FastAerosol object.
0068    This can be used to demonstrate that FastAerosol gives nearly
0069    identical transport results as parameterized geometery, but
0070    achieves order-of-magnitude performance gains.
0071    
0072    To build the aerosol as a G4PVParameterised object, a droplet
0073    distribution is required. The example is set up to use the droplet
0074    distribution automatically generated and saved by a previously-run
0075    pre-populated FastAerosol simulation, as this allows better comparison
0076    between the two classes. By default, the example looks for this
0077    distribution under the file name "distribution_r???mm_n???mm-3.csv",
0078    so the generated pre-populated FastAerosol distribution can be used
0079    by simply running a pre-populated FastAerosol simulation with the 
0080    same geometry before running the parameterised simulation.
0081         
0082    For comparison, the example can also be run using a single volume
0083    containg air and water mixed together at the correct average density.
0084    For small-enough droplets, this works well. However, it becomes
0085    increasingly innacurate as the droplets appoach a critical size range,
0086    which is about r = 1 mm for the materials and energies used in this
0087    example. This demonstraties the need to model some aerosols at a
0088    droplet level for accurate physics results.
0089 
0090  2- PHYSICS LIST
0091  
0092    This example uses the QGSP_BIC physics list. A global step length
0093    limiter physics process is also included, because this can significantly
0094    speed up calculations using FastAerosol when particle trajectories 
0095    curve due to the application of fields.
0096    
0097  3- ACTION INITALIZATION
0098 
0099     Nothing special.
0100 
0101  4- PRIMARY GENERATOR
0102   
0103    Particles are shot from (0,0,-2612.5) mm with a spread in X and Y of
0104    +/-55 mm with momentum in the +z direction. The example shoots 50 MeV
0105    protons by default.
0106 
0107  5- DETECTOR RESPONSE
0108 
0109    Scoring is done with a scoring grid, to allow histograms of the energy
0110    deposited to allow comparison of the results between geometry modeling
0111    methods. 
0112 
0113  6- SAMPLE EVALUATION
0114 
0115    It is recommended to run the test.mac script for a test/sample
0116    evaluation. This will simulate the transport of 100 protons (50 MeV)
0117    through an aerosol. The default bulk shape is "box"; other allowed
0118    shapes are "ellipsoid", "cylinder", and "pipe". All shapes are aligned
0119    along the z axis and maximally sized to fit in the 500 x 500 x 5000 mm
0120    bounding box. 
0121 
0122    By default, droplets are dynamically populated in the aerosol. One
0123    can populate all droplets at the beginning of the simulation by
0124    setting prePopulate to true. This saves the generated distribution
0125    of droplet centers. One can also run the same experiment, except
0126    modelling the aerosol as a parameterised solid, by setting
0127    parameterisedCloud to true and FastAerosolCloud to false. This
0128    requires a distribution of droplet centers; the one generated by a
0129    pre-opulated FastAerosol simulation automatically works. One can
0130    also simulate the cloud as a single average-density object by setting
0131    FastAerosolCloud and parameterisedCloud to false and smoothCloud to
0132    true.
0133 
0134  7 - OUTPUT
0135 
0136    The energy deposited into the aluminum detector by any particles is
0137    measured with command line scoring by a 20 x 20 x 1 scoring grid
0138    and saved via "/score/dumpQuantityToFile" as a csv file named
0139    "eDep_FastAerosol_r1p0mm_n1E-3p7mm-3_bulkbox_dropletsphere.csv"
0140    for the default aerosol build parameters.
0141 
0142    The GNU program "/usr/bin/time" may be used measure the simulation
0143    time and memory load. If simulating a pre-populated FastAerosol cloud,
0144    the time to populate the cloud is printed at population time in the
0145    program. This population time is also saved as
0146    "popTime_r???mm_n???mm-3.csv".
0147 
0148    The distribution of droplet centers is saved as
0149    "distribution_r???mm_n???mm-3.csv" where each row of this csv file
0150    corresponds to a droplet with the 1st, 2nd, and 3rd columns
0151    corresponding the the x, y, and z position of it's center respectively.
0152    
0153 8 - HOW TO RUN THE EXAMPLE
0154     Batch mode: fastAerosol test.mac
0155     Interactive mode: fastAerosol (init_vis.mac is executed to set-up visualisation)
0156      
0157