Webnucleo.org

Mail Lists | Developers
small logo

This tutorial demonstrates how to use the example codes in the wn_simple_gce distribution src/examples directory.

Example 1: Create a simple GCE model and compute the total mass, the mass in stars, and the mass in gas.

wn_simple_gce routines demonstrated in example1.c are:

To compute the total mass, the star mass, and the gas mass for a simple GCE model with initial gas mass of 1.0e10, infall parameters k = 1 and Delta = 0.1, and a gas consumption rate of 0.299 per Gyr, type:


./example1 1.e10 1 0.1 0.299 > ex1_output.txt

The result is ex1_output.txt

-top-

Example 2: Compute the gas consumption rate omega from the gas fraction at a given time.

wn_simple_gce routines demonstrated in example2.c are:

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


./example2 1 0.5 0.1 12. > ex2_output.txt

The result is ex2_output.txt

-top-

Example 3: Use supplied infall functions in place of the default.

wn_simple_gce routines demonstrated in example3.c are:

To compute the total mass, gas mass, star mass, and gas fraction for a simple GCE model with initial gas mass 1.e10, infall parameters k = 1 and Delta = 0.1, a gas consumption rate 0.299 per Gyr, and an omega1 [see Eq. (14) of Clayton (1984)], type:


./example3 1.e10 1 0.1 0.299 0.15 > ex3_output.txt

The result is ex3_output.txt

-top-

Example 4: Compute the primary metallicity as a function of time in a simple GCE model.

wn_simple_gce routines demonstrated in example4.c are:

To compute the primary metallicity in a simple GCE model with infall parameters k = 1 and Delta = 0.1, a gas consumption rate of 0.299 per Gyr, and a primary metallicity yield of 0.012, type:


./example4 1 0.1 0.299 0.012 > ex4_output.txt

The result is ex4_output.txt

-top-

Example 5: Compute a species yield as a function of time.

wn_simple_gce routines demonstrated in example5.c are:

To compute the yield of al27 for a simple GCE model with infall parameters k = 1 and Delta = 0.1, a gas consumption rate of 0.299 per Gyr, a primary metallicity yield of 0.012, and a species primary yield of 1.7e-5, type:


./example5 1.e10 1 0.1 0.299 0.012 al27 1.7e-5 > ex5_output.txt

The result is ex5_output.txt

To run with a secondary component to the yield (the beta term), add that to the command line:


./example5 1.e10 1 0.1 0.299 0.012 al27 1.7e-5 2.1e-3 > ex5_output_beta.txt

The result is ex5_output_beta.txt

It is also possible to add higher order terms:


./example5 1.e10 1 0.1 0.299 0.012 al27 1.7e-5 2.1e-3 -1.e-2 > ex5_output_gamma.txt

The result is ex5_output_gamma.txt

-top-

Example 6: Compute the mass fraction of a species in the gas as a function of time.

wn_simple_gce routines demonstrated in example6.c are:

To compute the gas mass fraction of al27 for a simple GCE model with infall parameters k = 1 and Delta = 0.1, a gas consumption rate of 0.299 per Gyr, a primary metallicity yield of 0.012, and a species primary yield of 1.7e-5, type:


./example6 1 0.1 0.299 0.012 al27 0. 1.7e-5 > ex6_output.txt

The result is ex6_output.txt

To run with a secondary component to the yield (the beta term), add that to the command line:


./example6 1 0.1 0.299 0.012 al27 0. 1.7e-5 2.1e-3 > ex6_output_beta.txt

The result is ex6_output_beta.txt

To run with a species that is radioactive, add the non-zero decay rate to the command line:


./example6 1 0.1 0.299 0.012 al26 967. 2.2e-7 6.5e-6 > ex6_output_rad.txt

The result is ex6_output_rad.txt

-top-

Example 7: Compute the ISM mass fraction ratio of a radioactive species relative to that of a reference (stable or radioactive) isotope as a function of time.

wn_simple_gce routines demonstrated in example7.c are:

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


./example7 1 0.1 0.299 0.012 al26 967. 2.2e-7 6.5e-6 al27 0. 1.7e-5 2.1e-3 > ex7_output.txt

The result is ex7_output.txt

-top-

Example 8: Compute the remainder of a radioactive species (mass fraction in the gas relative to that if the species were stable) as a function of time.

wn_simple_gce routines demonstrated in example8.c are:

To compute the remainder of al26 for a simple GCE model with infall parameters k = 1 and Delta = 0.1, a gas consumption rate of 0.299 per Gyr, a primary yield alpha = 0.012, and species yield parameters alpha = 2.2e-7 and beta = 6.5e-6, type:


./example8 1 0.1 0.299 0.012 al26 967. 2.2e-7 6.5e-6 > ex8_output.txt

The result is ex8_output.txt

-top-

Example 9: Compute the mass fraction of a species in multiple GCE zones at a given time simultaneously.

wn_simple_gce routines demonstrated in example9.c are:

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


./example9 ../../data_pub/zones.txt 7.7 > ex9_output.txt

The result is ex9_output.txt

-top-



Valid XHTML 1.1        Copyright © 2001-2012, Clemson University. All rights reserved.        Valid CSS!
Page last modified on 2010/02/21 17:59