KN1D:
A 1-D Space, 2-D Velocity, Kinetic Transport
Algorithm for Atomic and Molecular Hydrogen in an Ionizing
Plasma
Detailed description of the KN1D Algorithm can
be found here
The code (KN1D) is written 95% in IDL* and should run on any platform
that has IDL. The only exception is that some FORTRAN routines are used to
do a 2-D spline-fitting look-up of Johnson-Hinnov rate coefficients for multistep
ionization and hydrogen line radiation. If you can run without these, then
the code will not need to link to any FORTRAN. Otherwise the code is set
up to run on Linux. (FORTRAN source plus G77 compiler scripts are included
for this.) In principle IDL code could be written to replace the FORTRAN
- just haven't got around to do this yet. All graphics are handled by IDL.
All source code for KN1D is available in the zip file KN1D.zip.
When you unzip the files, they all will appear at the current directory
level. The "manual" file for KN1D is included (kn1d_manual.pdf).
As mentioned above, the code has a few "call_external" calls to FORTRAN
routines. These routines are basically 2D spline interpolation routines
that are used in looking up ionization rates and line radiation emissivities
from the Johnson-Hinnov coefficients (collisional-radiative model). It is
possible to run the code without using these routines, but the package includes
these anyway. Only two shared object modules need to be compiled from the
FORTRAN source code that is included in this package. The following commands
do the trick for Linux (these commands are in the file make_kn1d_so.sh):
g77 fast_b2val.f b2val.f xerror.f i1mach.f fdump.f -shared -o fast_b2val.so
-w
g77 call_b2ink.f b2ink.f xerror.f i1mach.f fdump.f -shared -o call_b2ink.so
-w
If you choose to run the IDL code in a different directory than where
the .so files reside, then you will need to add the .so file path to your
LD_LIBRARY_PATH environment variable. Also, you will need to append the
KN1D source code directory to the IDL_PATH variable used by IDL.
Once you are ready to try the code, I suggest that you run "test_kn1d"
first:
IDL> .run test_kn1d
By looking at test_kn1d.pro (and other test_kn1d*.pro files) you can get
an idea of how to set up the code to run.
The code has been benchmarked against
DEGAS2 for a well-diagnosed test
case with charge-exchange transport only. (Thanks to the efforts of Jerry Hughes from MIT PSFC
and Daren Stotler from PPPL).
The numerical solutions were found to be essentially identical.
- Brian
* IDL is a trademark of Research Systems, Inc., Boulder, CO
Last Revised:
10/18/2005