.. _introduction: Introduction to DCHAIN input deck creation ========================================== An input file (“deck”) of the modern DCHAIN-PHITS code (referred to as DCHAIN-SP prior to 2019 / PHITS v3.14) consists of a series of keyword arguments with values provided by the user that can be categorized into about ten “cards.” (Strictly speaking, the division of most of the input parameters into cards is only required for the legacy DCHAIN input syntax; however, grouping input parameters by functionality remains useful for organization.) While this document serves to be a standalone explanation of the input parameters for DCHAIN, do note that **the primary intended use case of DCHAIN is in coupled calculations using the PHITS tally [T-Dchain] which will automatically generate this input deck and several supporting files needed by DCHAIN**. Almost all of the input parameters in DCHAIN can be specified with parameters of the same name in the PHITS [T-Dchain] tally. For more detailed explanations of DCHAIN’s methods, please refer to the `main DCHAIN reference paper `__ :cite:`Ratliff_DCHAIN` and older reference documents `JAERI-Data/Code 99-008 `__ :cite:`DCHAIN_ref` and `JAERI-M 8727 `__ :cite:`tasaka1980dchain`. As DCHAIN is written in Fortran, variables beginning with letters “I” through “N” are integers while the others are real floating point numbers unless stated otherwise. String/character variables are usually started with the letter “H”. When entering these parameters into the DCHAIN input deck, each parameter name must be in entirely upper-case letters (``EXAMPLE``) or lower-case letters (``example``); parameter names listed in mixed cases (``Example``) will not be recognized. When writing the input deck, the keyword/parameter name is stated, followed by an equals sign surrounded on either side by at least one space (``=``), followed by the value being assigned to that keyword parameter, resulting in a line which has the form “``keyword``\ ``= value``”. Additionally, the keyword parameter names are only included in the deck for entries where only a single value is listed per line (this is the case for most entries). For instances where multiple values are provided per line or in succession (such as Cards 6a, 7a, 9a, and 9b), the name of the keyword and following equals sign are omitted from the input deck. Each line has a maximum width of 1350 columns. Lines with an asterisk (\*) or exclamation point (!) in the first column are recognized as comment lines. If an exclamation point (!) is placed anywhere in a line, all text to the right of it is considered a comment. Section :ref:`3 ` details each of the input parameters available in DCHAIN and categorizes them into cards. Where applicable, the default values of each parameter are stated in parentheses such as “(D=value)”. If the default value of a parameter set by the PHITS [T-Dchain] tally differs from the DCHAIN default value, it will be also listed as “(D\ :sub:`P`\ =value)” alongside the DCHAIN default. Generally, these defaults only differ due to features being added with time and wishing to not cause problems for legacy simulations. When there is a difference between the DCHAIN and PHITS default values for a parameter, the PHITS default is typically the recommended value. Next to each parameter is a symbol denoting if it can be set/changed in [T-Dchain] with the same name (:phits-same:`PHITS: same name`) or by other means (:phits-other:`PHITS: other means`) or if it can only be changed from within the DCHAIN input file (:phits-not-settable:`PHITS: not settable`). For additional information on some of these input parameters and more general information surrounding DCHAIN, please refer to Section :ref:`4 `. When publishing results obtained with DCHAIN-PHITS, please cite the main DCHAIN reference paper :cite:`Ratliff_DCHAIN`.