| (2.1) |
| (2.2) |
| (2.3) |
| (2.4) |
| (2.5) |
| (2.6) |
| (2.7) |
| (2.8) |
| (2.9) |
|
| (2.11) |
| (2.12) |
| (2.13) |
| (2.14) |
| (2.15) |
| (2.16) |
| (2.17) |
| (2.18) |
| (2.19) |
| (2.20) |
| (2.21) |
| (2.22) |
| (2.23) |
| (2.24) |
| (2.25) |
| (2.26) |
| (2.27) |
| (2.28) |
| (2.29) |
| (2.30) |
| (2.31) |
| (2.32) |
| (2.33) |
| (2.34) |
| (2.35) |
| (2.36) |
| (2.37) |
| (2.38) |
| (2.39) |
|
| (2.41) |
| (2.42) |
| (2.43) |
| (2.44) |
|
| (2.46) |
| (2.47) |
| (2.48) |
|
| (2.52) |
| (2.53) |
| (2.54) |
|
| (2.57) |
| (2.58) |
| (2.59) |
| (2.60) |
| (2.61) |
| (2.62) |
| (2.63) |
| (2.64) |
|
|
| (2.70) |
| (2.71) |
| (2.72) |
| (2.73) |
| (2.74) |
| (2.75) |
| (2.76) |
| (2.77) |
| (2.78) |
| (2.79) |
| (2.80) |
| (2.81) |
| (2.82) |
| (2.83) |
ftp ftp.pppl.gov user: anonymous Password: < your email adress > ftp> cd pub/degas2 ftp> binary ftp> get degas2.tar ftp> byeIf you want to download DEGAS 2 through your browser now, here's a link to it. Currently, there are three forms:
tar xf degas2.tar
uncompress degas2.tar.Z tar xf degas2.tar
gunzip degas2.tar.gz tar xf degas2.tar
elementsfile ../data/elements.nc backgroundfile bk_uers.nc geometryfile ge_uers.nc problemfile pr_uers.nc reactionfile reactions.nc speciesfile ../data/species.nc aladinfile ../data/aladinput.nc aladoutfile ../data/aladoutput.nc elements_infile ../data/elements.input problem_infile pr_uers.input reaction_infile reactions.input species_infile ../data/species.input materials_infile ../data/materials.input materialsfile ../data/materials.nc pmi_infile ../data/pmi.input pmifile ../data/pmi.nc cramdproblemfile cramdprob.nc tallyfile tally_uers.nc outputfile degas2_uers_out.nc oldsourcefile os_uers.ncNote that some of these are outdated or rarely used (unused entries may be deleted from the file, if desired). Most of the files come in pairs with the name XXX_infile corresponding to a text input file and XXXfile being a netCDF file generated by a program like datasetup, problemsetup, etc.
-0.013 0.0 -0.008 1 0 0 0 0 1 0.056 1.088The code just plots the data on a 2-D slice through the 3-D problem space. Specifying the slice requires: an origin (first line), a vector for each edge of the slice (second and third lines), and the length of each edge (fourth line). Since most DEGAS 2 applications will involve either cylindrical or toroidal symmetry, i.e., with the y-coordinate ignorable, the specification of the vectors is usually going to be as in the example. In general, though, one could take a slice which goes in the third direction as well. The vectors do not need to be orthogonal.
cd ~/degas2 mkdir SUN cd SUN cp ../src/Makefile .Once the Makefile is present here, it will "update itself" with respect to the copy in the src directory when needed. To get an idea of how ftangle works, just "make" the main FORTRAN file for randomtest:
gmake randomtest.fAt some point, you may want to visually compare this file with the original source code randomtest.web (in the src directory, with the other source files) to gain an appreciation for the amount of work the FWEB macros do in DEGAS 2. For more information on these macros, see the documentation in array.hweb and the other header files. Now, finish making randomtest:
gmake randomtestTo run randomtest, just type
./randomtestThe output to the right of the "=" sign should match the numbers in parentheses.
cd ~/degas2 mkdir tex cd tex cp ../src/Makefile . gmake randomtest.dviThe DVI file can then be printed or viewed (using xdvi), as desired. In fact, the Makefile also provides additional "targets", e.g., randomtest.print (uses lpr to print to your default printer), randomtest.view (launches xdvi) for you, and randomtest.ps (a PostScript file generated via dvips). You can generate woven documents for all of the ".web" source files. For some of the more useful ones, see Sec. 3.13. You could also just generate the TEX file (again, from the degas2\tex directory),
gmake randomtest.texYou could then use latex, pdflatex, or whatever other TEX application you wished.
DEGASROOT = /u/somedir
mkdir <some-afs-directory>/degas2/CRAY ln -s <same-afs-directory>/degas2/CRAY ~/degas2/CRAY cd ~/degas2/CRAY cp ~/degas2/src/Makefile . gmake randomtestThis will use ftangle on the local workstation to generate the FORTRAN source code files from the FWEB files in the src directory. It is advisable to set up a Makefile.local (see Sec. 3.6.3) in this directory that contains the same flags that will be used on the remote machine, particularly DEBUG, FORTRAN90 and MPI. Then, log on to the remote machine and do:
ln -s <same-afs-directory>/degas2 ~/degas2 cd <some-work-directory>/CRAY cp ~/degas2/CRAY/Makefile . make randomtestIn addition to the usual variables in Makefile.local, one needs to add STANDALONE=no. This will tell make that the FORTRAN (e.g., .f) files have already been generated on your local workstation, and that it can find them in ~/degas2/CRAY on the remote machine, which should be linked back to your local workstation via AFS. The degas2/data directory will likely also be needed on the remote machine. You can manually copy the directory and its contents to the remote machine (e.g., via ftp) or keep a copy in the AFS directory and use a link to allow the code on the remote machine to find the files. E.g., for the second option, starting on the local workstation:
cd ~/degas2 cp -R data <same-afs-directory>/degas2And on the remote machine
cd <same-work-directory> ln -s <same-afs-directory>/degas2/data dataBe aware that in either case, the data directory could eventually get out of sync with the one on your local workstation. If this is a likely possibility, one could consider also linking the data directory on the local workstation to the one in the AFS directory, making the latter the only real copy.
setenv CVSROOT /afs/pppl.gov/common/cvs cd cvs co degas2(this will place the code in ~/degas2; see also Sec. 3.6.3). Of course, the command setting the CVSROOT variable can be more conveniently executed from a login (e.g., ~/.login) or shell startup script (e.g., ~/.cshrc). The user will also have access to all older versions of the source and data files through the appropriate CVS commands. More importantly, the user will be able to update the CVS repository. For this reason, such access is controlled by the primary authors of DEGAS 2. Contact them if you feel that you can contribute to the DEGAS 2 source code (see Sec. 6.1).
@m BOXRUN 0so that it now reads
@m BOXRUN 32Save the file and exit the editor.
cd ~/degas2/examples/Analytic_fluid_bench
cp degas2_boxgen.in ../../SUN/degas2.in cd ../../SUN(overwriting any degas2.in file you may have had there already!).
gmake datasetup ./datasetup
gmake problemsetup ./problemsetup
gmake boxgen ./boxgen
source_num_flights = 100 ;Change the "100" to either "1600" or "6400". The example contains the output for both cases. Save the file and exit the editor.
gmake tallysetup ./tallysetup
gmake flighttest ./flighttest
| (3.1) |
|
| (3.5) |
|
|
| (3.9) |
| (3.10) |
| (3.11) |
|
@m DIM 2 @m BOXRUN 0 @m SOLN 1so that they now read
@m DIM 1 @m BOXRUN 41 @m SOLN 0Save the file and exit the editor. The DIM flag controls the dimensionality of the geometry. By setting it to 1, we get a purely one-dimensional geometry, with periodic boundary conditions in the y and z directions. The SOLN flag controls the analytic solution used with the "Analytic_fluid_bench" example (Sec. 3.7.1); since that's not needed here, we can turn it off. The files plate.web, sources.web, and flighttest.web each have the line
@m COUETTE 0near the top. Edit these files, changing the "0" to a "1" in each case (be sure to revert to the default setting of "0" before running other problems).
cd ~/degas2/examples/Couette_flow
cp degas2.in ../../SUN/degas2.in cd ../../SUN(overwriting any degas2.in file you may have had there already!).
gmake datasetup ./datasetup
gmake problemsetup ./problemsetupIf you look at the problem input file, you will see that there is only one reaction, that for the neutral-neutral collisions. Note also that the test species D2 also appears in the list of background species (the usual background species e and D+ appear here just because boxgen expects them to be there; they are not used in this simulation).
gmake boxgen ./boxgen
source_num_flights = 100 ;The results in this directory were obtained with 10 BGK iterations of 4000000 flights each. Such a run could easily require more than a day if run on a single processor (this run was executed in about an hour using 10 1.7 GHz AMD Athlon PCs). You can probably run a smaller number of flights (say, 100000) and still get reasonable results. Save the file and exit the editor.
gmake tallysetup ./tallysetup
gmake flighttest ./flighttestThe number of BGK iterations is controlled by the value of the bgk_max macro in flighttest.web. The value used here is 10. If you just want to get an idea of how the calculation proceeds, you can choose a smaller number. Note that the macro parameters controlling the convergence tests, bgk_cvg_dens and bgk_cvg_pres, are set to ridiculously small values (10-8) to ensure that all 10 iterations are completed.
| (3.13) |
| (3.14) |
| (3.15) |
| (3.16) |
@m BOXRUN 0 @m SOLN 1so that they now read
@m BOXRUN 40 @m SOLN 0Save the file and exit the editor. The second parameter disables the analytic solutions that are used in the original boxgen example (Sec. 3.7.1). Note that the DIM parameter should remain at its default value of 2.
cd ~/degas2/examples/CMod-1D
cp degas2.in ../../SUN/degas2.in cd ../../SUN(overwriting any degas2.in file you may have had there already!).
gmake datasetup ./datasetup
gmake problemsetup ./problemsetup
gmake boxgen ./boxgen
source_num_flights = 40000 ;Save the file and exit the editor.
gmake tallysetup ./tallysetup
gmake flighttest ./flighttestThe code will execute 5 iterations automatically, each with 40,000 flights. The number of BGK iterations is controlled by the parameter bgk_max in flighttest.web; the default setting is 5. The BGK iterations can alternatively be controlled by the convergence parameters bgk_cvg_dens and bgk_cvg_pres. The corresponding tests monitor global measures of the changes in the density and pressure of the BGK species. Note that these can be satisfied only if there are sufficiently many flights to achieve a correspondingly high precision in the local density and pressure values, no matter how many BGK iterations are run. In this example, the parameters chosen are such that bgk_max will be governing the number of iterations.
|
@m bgk_max 5to
@m bgk_max 0You may notice that the tallies used for the conservation checks predominantly utilize collision estimators while the standard (zone-resolved) tallies are based on track length estimators. The reason is that the former will explicitly demonstrate conservation of mass, momentum, and energy since they are computed using the instantaneous test particle attributes. The track length estimators will generally provide more accurate values for the code output, but will exhibit conservation only in a statistical sense. You can demonstrate this by replacing the estimator lists in each of the "total" tallies with the lists from the corresponding zone-resolved tallies.
| (3.17) |
| (3.18) |
| (3.19) |
| (3.20) |
| (3.21) |
| (3.22) |
| (3.23) |
8.27750E-01F1(x) =
1.99146E+00 2.25513E+00 2.32691E+00 2.36544E+00 2.40806E+00Interpolation into this array with a random number x yields Ö{Eout}, and thus v0. F2(h,x) =
5.16532E-01 6.99576E-01 8.11503E-01 8.99906E-01 9.67300E-01 3.70481E-01 6.11799E-01 7.63020E-01 8.72539E-01 9.61285E-01 3.80010E-01 6.18834E-01 7.63825E-01 8.75375E-01 9.61256E-01 3.57688E-01 5.95520E-01 7.51752E-01 8.59766E-01 9.57489E-01 3.48497E-01 5.17881E-01 6.53833E-01 7.79846E-01 9.23956E-01A 2-D interpolation into this table with the same first random number x and a second one h gives cosq0. F3(z,h,x) =
-9.54674E-01 -5.93616E-01 -4.55439E-03 6.11607E-01 9.54292E-01 -9.39719E-01 -5.34726E-01 7.70975E-02 5.91124E-01 9.38723E-01 -9.47749E-01 -5.99118E-01 -5.34413E-03 5.58645E-01 9.59176E-01 -9.52932E-01 -5.09963E-01 1.11845E-01 6.68895E-01 9.59592E-01 -9.63812E-01 -6.32861E-01 2.84474E-02 6.49311E-01 9.65024E-01 -9.49486E-01 -5.27460E-01 4.71202E-02 5.40823E-01 9.43092E-01 -9.18789E-01 -5.34890E-01 3.87104E-03 5.97719E-01 9.43635E-01 -9.35546E-01 -5.66353E-01 -6.17420E-02 5.65376E-01 9.28863E-01 -9.39133E-01 -5.88361E-01 4.03247E-02 5.36441E-01 9.41553E-01 -9.42917E-01 -5.66390E-01 4.88304E-03 5.72368E-01 9.58254E-01 -9.59566E-01 -6.35221E-01 -7.50576E-02 5.72627E-01 9.59374E-01 -9.43053E-01 -6.23133E-01 -8.35145E-02 5.13894E-01 9.33565E-01 -9.42753E-01 -6.40605E-01 -1.50300E-02 5.51493E-01 9.32335E-01 -9.28625E-01 -5.03451E-01 3.69856E-02 6.04412E-01 9.51354E-01 -9.47567E-01 -5.75171E-01 6.78900E-02 6.17675E-01 9.61149E-01 -9.42125E-01 -6.25972E-01 -6.74072E-02 5.10579E-01 9.26111E-01 -9.24288E-01 -5.62514E-01 -6.67559E-02 5.49679E-01 9.57450E-01 -9.45958E-01 -5.88903E-01 6.07203E-02 5.98492E-01 9.45981E-01 -9.64714E-01 -6.17340E-01 -2.49212E-02 5.61052E-01 9.49261E-01 -9.59291E-01 -6.47473E-01 -8.40439E-02 4.58677E-01 9.33637E-01 -9.43142E-01 -5.25077E-01 4.79891E-02 6.22436E-01 9.53027E-01 -9.43214E-01 -5.90395E-01 2.32011E-02 5.42675E-01 9.35411E-01 -9.40994E-01 -4.99927E-01 7.81558E-02 6.19613E-01 9.44418E-01 -9.35018E-01 -5.38589E-01 8.60652E-02 6.47157E-01 9.51505E-01 -9.49873E-01 -5.38587E-01 8.93784E-02 6.39298E-01 9.66431E-01A third random number z is used with the other two in a 3-D interpolation of this table to obtain cosf0. The re-use of these random numbers in interpolating these three separate dependent variables means that DEGAS 2 has to treat the random numbers as fixed independent variables, just like electron density or ion temperature, rather than generating the random numbers on the fly in the interpolation process. Hence, the appearance of 1st_random_number, 2nd_random_number, and 3rd_random_number in the independent variables list (see the PMI format class). So, each file for such PMI contains
| (3.24) |
| (3.25) |
| (3.26) |
| (3.27) |
| (3.28) |
| (3.29) |
| (3.30) |
| (3.31) |
| (3.32) |
| (3.33) |
| (4.1) |
| (4.2) |
| (4.3) |
| (4.4) |
| (4.5) |
| Source: | Plate | Recombination | ||||
| 1 s | 2 s | 3 s | 1 s | 2 s | 3 s | |
| D Density | ||||||
| smin=7 % | 82 % | 99.2 % | 100 % | 90 % | 99.4 % | 99.9 % |
| smin=5 % | 75 % | 95 % | 99.8 % | 82 % | 98 % | 99.9 % |
| smin=0 % | 56 % | 86 % | 96 % | 52 % | 88 % | 99 % |
| D2 Density | ||||||
| smin=0 % | 64 % | 92 % | 98 % | 59 % | 92 % | 99.2 % |
| D2+ Density | ||||||
| smin=0 % | 63 % | 92 % | 100 % | 68 % | 97 % | 100 % |
| D+ Ion Source Rate | ||||||
| smin=7 % | 74 % | 99.6 % | 100 % | 83 % | 99.3 % | 100 % |
| smin=5 % | 57 % | 94 % | 100 % | 63 % | 98 % | 99.8 % |
| smin=0 % | 38 % | 73 % | 93 % | 38 % | 66 % | 85 % |
| Electron Energy Source Rate | ||||||
| smin=7 % | 92 % | 99 % | 99.1 % | 93 % | 99 % | 99.3 % |
| smin=5 % | 79 % | 98 % | 99.1 % | 86 % | 98 % | 99.1 % |
| smin=0 % | 38 % | 72 % | 91 % | 45 % | 78 % | 94 % |
| D+ Ion Energy Source Rate | ||||||
| smax=70 % | 69 % | 94 % | 99 % | 68 % | 96 % | 99.7 % |
| smax=50 % | 69 % | 94 % | 99.1 % | 65 % | 97 % | 100 % |
| smax=20 % | 68 % | 94 % | 100 % | 61 % | 98 % | 100 % |
| D+ Ion Parallel Momentum Source Rate | ||||||
| smax=70 % | 72 % | 88 % | 99.2 % | 75 % | 92 % | 99.4 % |
| smax=50 % | 74 % | 97 % | 100 % | 76 % | 97 % | 99 % |
| smax=20 % | 58 % | 89 % | 100 % | 0 % | 0 % | 0 % |
| Configuration | Seconds / 1000 flights | srsd ratio | FOM |
| Baseline | 49 | 1.0 | 49 |
| No Suppressed Ionization | 15 | 1.9 | 54 |
| Collision Estimator | 10 | 4.3 | 185 |
| D2 Russian Roulette | 8 | 2.3 | 41 |
|
|
|
|
|