Webnucleo.org

Mail Lists | Developers
small logo


Warning: This is no longer the latest available version of this module. Please see the releases page for the most recent version. The Webnucleo group strongly recommends the use of the latest version of any of its online modules.

This tutorial demonstrates how to use example codes in the libnucnet distribution src/examples directory. The sample input files used in the tutorial are included in the distribution release and may be located in the data_pub directory.

Example 12: Create a collection of nuclear reactions, add reactions, and output the data to an xml file.

libnucnet routines demonstrated in example12.c are:

To run example12, type the following on the command line:


./example12 ../../data_pub/example_reac.txt ex12_output.xml

The result is ex12_output.xml

-top-

Example 13: Validate a Libnucnet__Reac input xml file against Webnucleo's schema.

libnucnet routines demonstrated in example13.c are:

To run example13, type the following on the command line:


./example13 ../../data_pub/example_reac.xml

The result is


Valid input Libnucnet__Reac xml file!

-top-

Example 14: Create a collection of nuclear reactions from an input xml file and output their reaction strings.

libnucnet routines demonstrated in example14.c are:

To run example14, type the following on the command line:


./example14 ../../data_pub/example_reac.xml > ex14_output.txt

The result is ex14_output.txt

You can also select out certain reactions with an xpath expression. For example, to select only (n,gamma) reactions, type:


./example14 ../../data_pub/example_reac.xml "[ reactant = 'n' and product = 'gamma' ]" > ex14_xpath_output.txt

The result is ex14_xpath_output.txt

-top-

Example 15: Create a collection of nuclear reactions from an input xml file, remove any duplicate files from the NACRE data source, and output the updated data.

libnucnet routines demonstrated in example15.c are:

To run example15, type the following on the command line:


./example15 ../../data_pub/example_reac.xml ex15_output.xml

The result is ex15_output.xml

-top-

Example 16: Create a collection of nuclear reactions from an input xml file over the web, output their reaction strings, update the data from a local xml file, and output the updated data.

libnucnet routines demonstrated in example16.c are:

To run example16, type the following on the command line:


./example16 http://www.webnucleo.org/home/modules/libnucnet/0.3/data_pub/example_reac.xml ../../data_pub/example_reac_new.xml "[ product = 'h2' ]" > ex16_output.txt

The result is ex16_output.txt

-top-

Example 17: Create a collection of nuclear reactions from an input xml file and print out the duplicate reactant and product factors.

libnucnet routines demonstrated in example17.c are:

To run example17, type the following on the command line:


./example17 ../../data_pub/example_reac.xml > ex17_output.txt

The result is ex17_output.txt

You can also select out certain reactions with an xpath expression. For example, try:


./example17 ../../data_pub/example_reac.xml "[ reactant = 'he4' and ( product = 'be9' or product = 'c12' ) ]" > ex17_xpath_output.txt

The result is ex17_xpath_output.txt

-top-

Example 18: Print out the reactants and products for a reaction.

libnucnet routines demonstrated in example18.c are:

To run example18, type the following on the command line:


./example18 ../../data_pub/example_reac.xml "ne28 -> na26 + n + n + electron + anti-neutrino_e" > ex18_output.txt

The result is ex18_output.txt

-top-

Example 19: Create a collection of nuclear reactions from an input xml file and print out the data for a particular reaction chosen by its reaction string.

libnucnet routines demonstrated in example19.c are:

To run example19, type the following on the command line:


./example19 ../../data_pub/example_reac.xml "si28 + h1 -> p29 + gamma" > ex19_output.txt

The result is ex19_output.txt

-top-

Example 20: Create a collection of nuclear reactions from an input xml file and print out the data for a reaction or reactions chosen by an xpath expression.

libnucnet routines demonstrated in example20.c are:

To print out the data for all reactions on magnesium-24, type:


./example20 ../../data_pub/example_reac.xml "[ reactant = 'mg24' ]" > ex20_output.txt

The result is ex20_output.txt

-top-

Example 21: Create a collection of nuclear reactions from an input xml file and print out the reaction rate at the input temperature.

libnucnet routines demonstrated in example21.c are:

To compute the rates at a t9 (temperature in billions of K) of 1, type:


./example21 ../../data_pub/example_reac.xml 1. > ex21_output.txt

The result is ex21_output.txt

This routine also can take an xpath expression. To compute the rates for all (n,gamma) rates at a t9 (temperature in billions of K) of 1, type:


./example21 ../../data_pub/example_reac.xml 1. "[ reactant = 'n' and product = 'gamma' ]" > ex21_xpath_output.txt

The result is ex21_xpath_output.txt

-top-

Example 22: Create a collection of nuclear reactions from an input xml file and print the rate as a function of temperature for a particular reaction chosen by its reaction string.

libnucnet routines demonstrated in example22.c are:

To run example22, type the following on the command line:


./example22 ../../data_pub/example_reac.xml "cl35 + h1 -> ar36 + gamma" > ex22_output.txt

The result is ex22_output.txt

-top-

Example 23: Create a collection of nuclear reactions from an input xml file and print the rate as a function of temperature for a reaction or reactions chosen by an xpath expression.

libnucnet routines demonstrated in example23.c are:

To print out the rates as a function of temperature of all reactions with oxygen-16 as a reactant, type:


./example23 ../../data_pub/example_reac.xml "[ reactant = 'o16' ]" > ex23_output.txt

The result is ex23_output.txt

-top-



Valid XHTML 1.1        Copyright © 2001-2012, Clemson University. All rights reserved.        Valid CSS!
Page last modified on 2009/01/27 16:05