Computer Aided Engineering Journal & Forums

Full Version: Monte-Carlo Transport Solver
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi forum

I will post here a Howto on installing a package for Linux that solves Particle Transport problems using Monte Carlo technique.

check :
http://www.fluka.org/fluka.php

The theoretical details of the algorithms are a bit intrincate, and go beyond the scope of this Thread/forum, anyway there is a detailed user guide in PDF format in the package... Some knowledge on theoretical physics is advisable.

A compiler of Fortran 77 is needed to compile the executables to the problem being modeled.
There is also a debian package and the source code of a Pre/Post processor to help creating the input file for the MonteCarlo iterator, as well as accessing the result files with neutron/photon fluences as well as elastic/anelastic interaction ( fissions/ scattering absorption, etc ) distribution, it is called Flair.

I will be back to this late in the afternoon after I finish my TKD training.

Best regards

Alex
Hi there

Ready to start beaming some materials, like a delta stabilized phase of a Pu 239 alloy with Indium...?

Delta phase is metastable, it will undergo phase transition to alpha phase, with a reduced interatomic distance and an increased macroscopic fission cross section if subjected to shock loading ( high pressure ), so in any case do not "squeeze" that stuff if you plan to beam it... Unless You have a biiiiig life insurance... :-D

To install FLUKA about 500 Mbyte of disk space are needed. In addition, a FORTRAN compiler suitable for your platform is required to generate the FLUKA executable(s). At this moment, the only distributed version of FLUKA requires g77.

For the purpose of these instructions, you are supposed to use a Unix system. After a successful download into an arbitrary directory (e.g. /somePath), you will find there a compressed Unix tar file containing the FLUKA package (something like fluka2008.3-linuxAA.tar.gz, which we will call here fluka.tar.gz).

IMPORTANT Please create a dedicated directory for the FLUKA installation (e.g. Flukacode in /somePath)

Code:
cd /somePath
mkdir Flukacode

BEFORE unpacking, move into this directory the file you have just downloaded

Code:
mv fluka.tar.gz Flukacode

The following commands will perform the installation

Code:
cd Flukacode
tar -xzvf fluka.tar.gz
setenv FLUPRO /somePath/Flukacode
make

The last but one command line implements an environment variable ($FLUPRO) which is required by the scripts which link and run FLUKA (they are $FLUPRO/flutil/lfluka and $FLUPRO/flutil/rfluka, respectively). This line is depending on the Unix SHELL one uses. The above example is the correct syntax for tcsh/csh. In case of bash the equivalent command would read

Code:
export FLUPRO=/somePath/Flukacode

You may want to incorporate this command in your shell configuration file (such as .tcshrc or .bashrc in $HOME) to avoid to type it on each new terminal window.

The last command line (make) produces the standard FLUKA executable (flukahp) in the $FLUPRO directory and all the executables of the postprocessing tools available in the $FLUPRO/flutil subdirectory.

In order to be able to perform nucleus-nucleus interactions, a special executable linking the event generator libraries already included in the distributed package, is needed. To create it, the script ldpmqmd in $FLUPRO/flutil has to be launched:

Code:
$FLUPRO/flutil/ldpmqmd

The default name of the executable coming out is flukadpm3. You can set a different name through the option - o. This is useful when linking in addition one's own user routines. A list of options supported by the script lfluka (internally used by ldpmqmd) is shown issuing the command

Code:
$FLUPRO/flutil/lfluka -h

Note that the twin script ldpm2qmd allows to link a previous version of the DPMJET event generator (DPMJET-2.53 instead of DPMJET-3).

In order to run FLUKA, one has to prepare an input file (e.g. myproblem.inp) looking like the examples available in the $FLUPRO directory. It is recommended to work/run in a directory different from the installation one, i.e. outside $FLUPRO. Detailed instructions for building a FLUKA input can be found in the Section 2.2 of the Manual. The run is started launching the script rfluka

Code:
$FLUPRO/flutil/rfluka myproblem [without ".inp"]

The standard executable $FLUPRO/flukahp will be used. A different executable to be used can be specified through the option - e. A list of options supported by the script rfluka is shown issuing the command

Code:
$FLUPRO/flutil/rfluka -h

A lecture focused on installing and running FLUKA is provided as a part of the user course material (Installation, Release Notes).

With the FLUKA package, you received a current version of the FLUKA manual. The manual is the major source of information/help for preparing and running FLUKA. It is available also online.

Take a look also at the RELEASE-NOTES.

Always a good way to get started with a new software tool is to study well documented examples. We are trying to provide a series of such examples for various physics conditions.

Enjoy

Alex
Thanks a lot for the article man. Could you please highlight the codes and commnds using tags like
Code:
your code
etc?
Man... :-(

I wish I could edit my article... the way you told, me but even being logged, article editing is disabled after two minutes of posting...

Best regards

Alex
Reference URL's