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 10: Create a collection of nuclear reactions, add reactions, and output the data to an xml file.

libnucnet routines demonstrated in example10.c are:

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


example10 ../../data_pub/example_reac.txt ex10_output.xml

The result is ex10_output.xml

-top-

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

libnucnet routines demonstrated in example11.c are:

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


example11 ../../data_pub/example_reac.xml

The result is


Valid input Libnucnet__Reac xml file!

-top-

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

libnucnet routines demonstrated in example12.c are:

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


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

The result is ex12_output.txt

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


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

The result is ex12_xpath_output.txt

-top-

Example 13: 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 example13.c are:

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


example13 http://www.webnucleo.org/home/modules/libnucnet/0.1/data_pub/example_reac.xml ../../data_pub/example_reac_new.xml "[ product = 'h2' ]" > ex13_output.txt

The result is ex13_output.txt

-top-

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

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, try:


example14 ../../data_pub/example_reac.xml "[ reactant = 'he4' and ( product = 'be9' or product = 'c12' ) ]" > 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 and print out the data for a particular reaction chosen by its reaction string.

libnucnet routines demonstrated in example15.c are:

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


example15 ../../data_pub/example_reac.xml "si28 + h1 -> p29 + gamma" > ex15_output.txt

The result is ex15_output.txt

-top-

Example 16: 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 example16.c are:

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


example16 ../../data_pub/example_reac.xml "[ reactant = 'mg24' ]" > 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 reaction rate at the input temperature.

libnucnet routines demonstrated in example17.c are:

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


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

The result is ex17_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:


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

The result is ex17_xpath_output.txt

-top-

Example 18: 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 example18.c are:

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


example18 ../../data_pub/example_reac.xml "cl35 + h1 -> ar36 + gamma" > 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 the rate as a function of temperature for a reaction or reactions chosen by an xpath expression.

libnucnet routines demonstrated in example19.c are:

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


example19 ../../data_pub/example_reac.xml "[ reactant = 'o16' ]" > ex19_output.txt

The result is ex19_output.txt

-top-



Valid XHTML 1.1        Copyright © 2001-2012, Clemson University. All rights reserved.        Valid CSS!
Page last modified on 2007/10/16 19:19