diff --git a/source/user/tutorial/add_arche.rst b/source/user/tutorial/add_arche.rst index 5ecc22d1..844b6482 100644 --- a/source/user/tutorial/add_arche.rst +++ b/source/user/tutorial/add_arche.rst @@ -138,7 +138,7 @@ where ``lib`` is the library in which the archetype came from and ``name`` is the archetype name. You need one `spec` block in the archetypes section for each archetype you use in your simulation. Let's build the archetypes block in our input file. -Using the template below and the table below, +Using the template above and the table below, fill in the template with the variables listed in the table below. +-------------+------------------+----------------------------+ @@ -161,56 +161,34 @@ fill in the template with the variables listed in the table below. | ``arch4`` | ``Sink`` | Name of archetype | +-------------+------------------+----------------------------+ +The order of the archetypes in this block is of no consequence. Once complete, append the archetypes section under the control section of input file [#f1]_. + +Check: Complete Archetypes block ++++++++++++++++++++++++++++++++++++++++ + +The archetypes section of your input file should now look like: -Archetype Block Template ------------------------- .. code-block:: XML - + - lib1 - arch1 + cycamore + Enrichment - lib2 - arch2 + cycamore + Reactor - lib3 - arch3 + cycamore + Source - lib4 - arch4 + cycamore + Sink - - - -Once complete, your ``archetypes`` block should look like: - -.. code-block:: XML - - - - cycamore - Enrichment - - - cycamore - Reactor - - - cycamore - Source - - - cycamore - Sink - -The order of the archetypes in this block is of no consequence. Once complete, append the archetypes section under the control section of input file [#f1]_. - .. rubric:: Footnotes .. [#f1] The exact order of the sections in a |Cyclus| input file are of minor consequence. The ``control`` sequence must go first, but the other sequences can go in any order that makes sense to the user. The traditional organization of an input file is: control, archetypes, commodities, facilities, regions/institutions, and recipes. diff --git a/source/user/tutorial/add_commod_recipe.rst b/source/user/tutorial/add_commod_recipe.rst index 14827347..918552b8 100644 --- a/source/user/tutorial/add_commod_recipe.rst +++ b/source/user/tutorial/add_commod_recipe.rst @@ -112,48 +112,6 @@ template. | com4 | tails | 1.0 | +-------------+-------------+---------------------+ -1. Let's start with ``u_ore``. In the ```` line replace ``com1`` with ``u_ore`` -inside a ``commodity`` block. - -.. code-block:: XML - - - u_ore - - -2. In the ```` section replace ``val1`` with ``1.0``. - -.. code-block:: XML - - - - u_ore - 1.0 - - - - -3. Repeat this process for the other three commodities. Your final result should look like: - -.. code-block:: XML - - - u_ore - 1.0 - - - fresh_uox - 1.0 - - - tails - 1.0 - - - spent_uox - 1.0 - - Once complete, append the commodities section under the archetypes section [#f1]_. Understanding Recipes @@ -207,8 +165,8 @@ Activity: Creating a Recipe ++++++++++++++++++++++++++++ -Using the tables below, fill out the recipe -template for natural uranium, fresh fuel, and spent fuel. +Using the tables below, fill out three recipe +templates for natural uranium, fresh fuel, and spent fuel. +---------------------+--------------------+--------------------+ | Natural Uranium Composition | @@ -244,124 +202,7 @@ template for natural uranium, fresh fuel, and spent fuel. | :math:`^{137}`\ Cs | 55137 | 0.04 | +---------------------+--------------------+--------------------+ -1. Let's start with the Natural Uranium recipe. Start by placing a ```` -block to signify that this is a recipe and tab in and place the fill -```` tag such as: - -.. code-block:: XML - - - nat_u - - -2. To signify that the composition of this recipe is in terms of Mass, fill the -```` tag with ``mass``. - -.. code-block:: XML - - - nat_u - mass - - -3. To add a nuclide to this recipe, call the ``nuclide`` tag, tab in, add the -```` and ```` tags: - -.. code-block:: XML - - - nat_u - mass - - id1 - comp1 - - - -4. We will fill the ```` tag with the uranium-235 ``Nuc Id``, ``92235``, and -fill the composition tag with its mass composition, ``0.00711``. - -.. code-block:: XML - - - nat_u - mass - - 92235 - 0.00711 - - - -5. Following the same procedure, we can add uranium-238 to this recipe such as: - -.. code-block:: XML - - - nat_u - mass - - 92235 - 0.00711 - - - 92238 - 0.99289 - - - -6. We can add other recipes in separate ``recipe`` blocks. -The recipe section of this tutorial is placed below. - -.. code-block:: XML - - - nat_u - mass - - 92235 - 0.00711 - - - 92238 - 0.99289 - - - - - fresh_uox - mass - - 92235 - 0.04 - - - 92238 - 0.96 - - - - - spent_uox - mass - - 92235 - 0.011 - - - 92238 - 0.94 - - - 94239 - 0.009 - - - 55137 - 0.04 - - - -Once complete, append this facility under the commodity section of your input file [#f1]_. +Once complete, append these recipes under the commodity section of your input file [#f1]_. Let's take a look at the ``fresh_uox`` fuel recipe (note that ``-`` is an illegal character for @@ -373,5 +214,74 @@ names in cyclus and ``_`` should be used instead): The recipe name ``fresh_uox`` is specified, as are the isotope nuclide IDs and the corresponding mass fraction of each nuclide. The ``fresh_uox`` is composed of 4% U-235 and 96% U-238. +Check: Complete Commodity and Recipe blocks ++++++++++++++++++++++++++++++++++++++++++++++++ + +The commodity and recipe sections of you input file should now look like: + +.. code-block:: XML + + + u_ore + 1.0 + + + fresh_uox + 1.0 + + + spent_uox + 1.0 + + + tails + 1.0 + + + + nat_u + mass + + 92235 + 0.00711 + + + 92238 + 0.99289 + + + + fresh_uox + mass + + 92235 + 0.04 + + + 92238 + 0.96 + + + + spent_uox + mass + + 92235 + 0.011 + + + 92238 + 0.94 + + + 94239 + 0.009 + + + 55137 + 0.04 + + + .. rubric:: Footnotes .. [#f1] The exact order of the sections in a |Cyclus| input file are of minor consequence. The ``control`` sequence must go first, but the other sequences can go in any order that makes sense to the user. The traditional organization of an input file is: control, archetypes, commodities, facilities, regions/institutions, and recipes. diff --git a/source/user/tutorial/add_proto.rst b/source/user/tutorial/add_proto.rst index f5ce974d..1f88e10b 100644 --- a/source/user/tutorial/add_proto.rst +++ b/source/user/tutorial/add_proto.rst @@ -83,8 +83,7 @@ Optional parameters: Activity: Configure the Source prototype ++++++++++++++++++++++++++++++++++++++++ Our source, ``UraniumMine``, will provide the natural uranium ore for our enrichment facility. -This facility takes two inputs, ``name`` and ``outcommod``. Using the Source -Archetype and the table below, create the UraniumMine prototype. +This facility takes two inputs, ``name`` and ``outcommod``. Using the Source archetype template above and the table below, create the UraniumMine prototype. +-----------------------+---------------------------+ | Variable | Value | @@ -94,33 +93,6 @@ Archetype and the table below, create the UraniumMine prototype. | ``out_commodity | ``u_ore`` | +-----------------------+---------------------------+ -1. The template for the Source archetype is of the form: - -.. code-block:: XML - - - name - - - out_commodity - - - - -2. Filling in the variables ``name``, ``Archetype``, and ``out_commod`` as -``UraniumMine``, ``Source``, and ``u_ore`` leads to: - -.. code-block:: XML - - - UraniumMine - - - u_ore - - - - Once complete, append this facility under the commodity section and before the recipe section of your input file [#f1]_. Example: Enrichment Prototype @@ -192,25 +164,8 @@ Optional parameters: Activity: Creating the Enrichment Prototype +++++++++++++++++++++++++++++++++++++++++++ The enrichment facility, ``EnrichmentPlant`` will intake the natural ``u_ore`` -from ``UraniumMine`` and create ``fresh_uox`` and ``tails`` as its products. -The template for the Enrichment archetype is of the form: - -.. code-block:: XML - - - name - - - feed_commodity - feed_recipe - product_commodity - tails_commodity - max_feed_inventory - - - - -Using the template above and the table below, generate the input enrichment facility prototype. +from ``UraniumMine`` and create ``fresh_uox`` and ``tails`` as its products. +Using the Enrichment archetype template above and the table below, generate the input enrichment facility prototype. +-------------------------+---------------------------+ | Variable | Value | @@ -228,24 +183,6 @@ Using the template above and the table below, generate the input enrichment faci | ``max_feed_inventory`` | 1000000 | +-------------------------+---------------------------+ - -After filling in these variables, your enrichment facility prototype will look like: - -.. code-block:: XML - - - EnrichmentPlant - - - u_ore - nat_u - fresh_uox - tails - 1000000 - - - - Once complete, append this facility under the Source prototype of your input file [#f1]_. @@ -303,37 +240,6 @@ The Reactor archetype is of the form: - -There are many optional input parameters to the Cycamore Reactor archetype. -We advise exploring the `Reactor archetype documentation `_ to find them all. - -Activity: Creating the Reactor Prototype -++++++++++++++++++++++++++++++++++++++++ - -Now let's model the reactor this fuel will go through! In this simple example, -let's model a single PWR in the United States. It has a power capacity of 1178 -MWe. The template for the reactor is given below: - -.. code-block:: XML - - - name - - - in_commod1 - in_recipe1 - out_commod1 - out_recipe1 - cycle_length - refuel_length - assem_mass - n_core - n_batch - power - - - - Where: * ``fuel_incommods``: input fuel commodity -- you can list more than one by adding more ``val`` blocks @@ -347,7 +253,15 @@ Where: * ``n_assem_batch``: number of batches replaced per refueling. * ``power_cap``: amount of electricity the reactor generates. -Using the template above and the table below, create the Reactor prototype. +There are many optional input parameters to the Cycamore Reactor archetype. +We advise exploring the `Reactor archetype documentation `_ to find them all. + +Activity: Creating the Reactor Prototype +++++++++++++++++++++++++++++++++++++++++ + +Now let's model the reactor this fuel will go through! In this simple example, +let's model a single PWR in the United States. It has a power capacity of 1178 +MWe. Using the Reactor archetype template above and the table below, create the Reactor prototype. +-----------------------+-----------------------------------+ | Variable | Value | @@ -375,28 +289,6 @@ Using the template above and the table below, create the Reactor prototype. | ``power`` | ``1178`` | +-----------------------+-----------------------------------+ -Once completed, your prototype should look like: - -.. code-block:: XML - - - 1178MWe ReactorPlant Unit 1 - - - fresh_uox - fresh_uox - spent_uox - spent_uox - 18 - 1 - 33000 - 3 - 1 - 1178 - - - - Once complete, append this facility under the Enrichment facility of your input file [#f1]_. @@ -462,8 +354,8 @@ Optional parameters: Activity: Creating the Sink Prototype +++++++++++++++++++++++++++++++++++++ Our sink, ``NuclearRepository``, will store the ``spent_uox`` and ``tails`` after -their use in the fuel cycle. Using the Sink Archetype template and the table below, -create the UraniumMine prototype. +their use in the fuel cycle. Using the Sink archetype template above and the table below, +create the NuclearRepository prototype. +-------------------------+---------------------------+ | Variable | Value | @@ -475,44 +367,12 @@ create the UraniumMine prototype. | ``input_commodity2`` | ``tails`` | +-------------------------+---------------------------+ -The sink facility archetype is: - -.. code-block:: XML - - - Sink_name - - - - input_commodity1 - input_commodity2 - - - - - -After filling in these variables, your sink facility prototype will look like: - -.. code-block:: XML - - - NuclearRepository - - - - spent_uox - tails - - - - - Once complete, append this facility under the Reactor prototype of your input file [#f1]_. Check: Complete Facility block ++++++++++++++++++++++++++++++++++++++++ -The facility section of your input file should be of the form: +The facility section of your input file should now look like: .. code-block:: XML diff --git a/source/user/tutorial/add_reg_inst.rst b/source/user/tutorial/add_reg_inst.rst index 028f1224..689ca350 100644 --- a/source/user/tutorial/add_reg_inst.rst +++ b/source/user/tutorial/add_reg_inst.rst @@ -34,13 +34,13 @@ simulation. +-------------+------------------+----------------------------+ | Variable | Value | Purpose | +=============+==================+============================+ -| ``lib6`` | ``agents`` | Library of the archetype | +| ``lib5`` | ``agents`` | Library of the archetype | +-------------+------------------+----------------------------+ -| ``arch6`` | ``NullRegion`` | Name of archetype | +| ``arch5`` | ``NullRegion`` | Name of archetype | +-------------+------------------+----------------------------+ -| ``lib7`` | ``agents`` | Library of the archetype | +| ``lib6`` | ``agents`` | Library of the archetype | +-------------+------------------+----------------------------+ -| ``arch7`` | ``NullInst`` | Name of archetype | +| ``arch6`` | ``NullInst`` | Name of archetype | +-------------+------------------+----------------------------+ .. code-block:: XML @@ -48,12 +48,12 @@ simulation. ... ... - lib6 - arch6 + lib5 + arch5 - lib7 - arch7 + lib6 + arch6 @@ -266,41 +266,10 @@ Putting a region and institution blocks together, a complete region template is Activity: Write the Region template ----------------------------------- -Using the template below, let's create the region section of our input file. - -.. code-block:: XML - - - region_name - - - - - - - prototype1 - amount1 - - - prototype2 - amount2 - - - prototype3 - amount3 - - - institution_name - - - - - - -Now the next part of the region template is the other facilities in the +The next part of the region template is the other facilities in the region's fuel cycle. In our example, these facilities are ``UraniumMine``, ``EnrichmentPlant``, and ``NuclearRepository``. Using -the above exercise and the table below, fill out the rest of the region +the template above and the table below, fill out the rest of the region template. +-----------------------+-----------------------------+----------+ @@ -317,9 +286,13 @@ template. | ``region_name`` | ``USA`` | N/A | +-----------------------+-----------------------------+----------+ +Once complete, append this facility under the Sink prototype of your input file. + Check: Complete Region block +++++++++++++++++++++++++++++++++++ +The region section of your input file should now look like: + .. code-block:: XML @@ -358,67 +331,16 @@ Save your input file as ``tutorial_oncethrough.xml`` Activity: Add an extra institution into the Region ------------------------------------------------- -Having multiple institutions help organize facilities and their affiliation. -In our ``USA`` region, let's add a second institution called ``ReactorUtility``. -``ReactorUtility`` is the institution that holds the ``1178MWe ReactorPlant Unit 1`` prototype and ``United -States Nuclear`` holds the ``UraniumMine``, ``EnrichmentPlant``, and ``NuclearRepository`` -prototypes. Using the region and institution templates, let's -add the second institution to the region. - -1. Let's build the ``ReactorUtility`` institution. This institution has one ``1178MWe ReactorPlant Unit 1`` prototype. Using this information we can write this institution as: - -.. code-block:: XML - - - - - 1178MWe ReactorPlant Unit 1 - 1 - - - ReactorUtility - - - - - -1. We have our ``USA`` region block with the ``United States Nuclear`` institution. This institution has one ``UraniumMine`` prototype, ``EnrichmentPlant`` prototype, and one ``NuclearRepository`` prototype: +Having multiple institutions can help organize facilities and their affiliation. +In our ``USA`` region, we have the ``United States Nuclear`` institution that +holds the ``UraniumMine``, ``EnrichmentPlant``, and ``NuclearRepository`` +prototypes. Now let's add another institution. -.. code-block:: XML - - - USA - - - - - - - UraniumMine - 1 - - - EnrichmentPlant - 1 - - - NuclearRepository - 1 - - - United States Nuclear - - - - - - - - - +Our second institution will be called ``ReactorUtility``. This institution has one ``1178MWe ReactorPlant Unit 1`` prototype. +Using this information we can add a second institution block into our ``USA`` +region block after the ``United States Nuclear`` institution. -3. We will add the ``ReactorUtility`` institution into the blank lines of our ``USA`` region - block. Once complete, your region prototype should look like: +Once complete, your region prototype should look like: .. code-block:: XML diff --git a/source/user/tutorial/sim_parm.rst b/source/user/tutorial/sim_parm.rst index 3f78cdd8..e974e083 100644 --- a/source/user/tutorial/sim_parm.rst +++ b/source/user/tutorial/sim_parm.rst @@ -102,28 +102,15 @@ with the variables listed in the table below in your favorite text editor. | ``decay`` | ``never`` | radioactive decay | +-------------------+---------------+---------------------------------+ -Using this table, let's set the simulation parameters. - -1. To tell |Cyclus| that this is the simulation section of the input file, -first add a ``simulation`` block: - -.. code-block:: XML - - - - -2. Place the ``control`` header in as such - -.. code-block:: XML - - - - - +**Note**: There are two blank lines between the end of the control section and +end of the simulation section. This section of the simulation block will hold +the rest of the simulation parameter blocks (commodities, facilities, regions, +institutions, and recipe blocks). -Adding spaces to indent the ``control`` header improves ease of reading. +Check: Complete Control block ++++++++++++++++++++++++++++++++ -3. After filling in the parameters listed in the table above, close the control and simulation sections as: +The control section of your input file should now look like: .. code-block:: XML @@ -137,8 +124,3 @@ Adding spaces to indent the ``control`` header improves ease of reading. - -**Note**: There are two blank lines between the end of the control section and -end of the simulation section. This section of the simulation block will hold -the rest of the simulation parameter blocks (commodities, facilities, regions, -institutions, and recipe blocks).