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.

Documentation from the file



wn_simple_gce/0.1/src/WnSimpleGce.h


Table of Contents

Structures
Name: WnSimpleGce

Description: A structure storing information for a GCE model. The contents of the structure are not made public by the API but rather are accessed through API routines.

-top-


Name: WnSimpleGce__Species

Description: A structure storing information for a species in a GCE model. The contents of the structure are not made public by the API but rather are accessed through API routines.

-top-



User-Supplied Routines
Name: WnSimpleGce__Species__infall_mass_fraction_function()

Description: User-supplied routine to calculate the mass fraction of a species in the infalling material.

Syntax:
         double
         WnSimpleGce__Species__infall_mass_fraction_function(
           double d_time,
           void *p_user_data
         );
             
Input:

d_time: (required) The time (in Gyr) at which to compute the infall rate.

p_user_data: (required) A pointer to a user-defined structure containing extra data for the infall mass fraction function.

Output:

User's routine must return a double giving the mass fraction of the species in the infalling material at the input time. The user sets the infall mass fraction function for the species for a model with WnSimpleGce__Species__setInfallMassFractionFunction(). The default is that the species has zero mass fraction in the infalling matter.


-top-


Name: WnSimpleGce__infallPrimaryMetallicityFunction()

Description: User-supplied routine to calculate the primary metallicity in the infalling material.

Syntax:
         double
         WnSimpleGce__infall_primary_metallicity_function(
           double d_time,
           void *p_user_data
         );
             
Input:

d_time: (required) The time (in Gyr) at which to compute the infall rate.

p_user_data: (required) A pointer to a user-defined structure containing extra data for the infall primary metallicity function.

Output:

User's routine must return a double giving the primary metallicity in the infalling material at the input time. The user sets the infall primary metallicity function for a model with WnSimpleGce__setInfallPrimaryMetallicityFunction(). The default is that the infalling material has zero metallicity.


-top-


Name: WnSimpleGce__infallRateFunction()

Description: User-supplied routine to calculate the infall rate to the disk.

Syntax:
         double
         WnSimpleGce__infall_rate_function(
           double d_time,
           void *p_user_data
         );
             
Input:

d_time: (required) The time (in Gyr) at which to compute the infall rate.

p_user_data: (required) A pointer to a user-defined structure containing extra data for the infall function.

Output:

User's routine must return a double giving the infall rate at the input time. The user sets the infall rate function for a model with WnSimpleGce__setInfallRateFunction(). The default function is standard model 1 by Clayton (1984).


-top-



Routines
Name: WnSimpleGce__Species__clearInfallMassFractionFunction()

Description: Clear the infall mass fraction function for the species. The routine is reset to the default--that is, zero mass fraction for the species in the infall.

Syntax:
         void
         WnSimpleGce__Species__clearInfallMassFractionFunction(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Clear the infall mass fraction function for the species p_species:

         WnSimpleGce__Species__clearInfallMassFractionFunction(
           p_model
         );
               

-top-


Name: WnSimpleGce__Species__free()

Description: Free the memory for a species in a simple GCE model.

Syntax:
         void
         WnSimpleGce__Species__free( WnSimpleGce__Species *self );
             
Input:

self: (required) A pointer to a species in a simple GCE model.

Output:

Upon successful return, the memory for the species has been freed.

Example: Free the memory for the species pointed to by p_species:

         WnSimpleGce__Species__free( p_species );
               

-top-


Name: WnSimpleGce__Species__getName()

Description: Retrieve the name of a species.

Syntax:
         const char *
         WnSimpleGce__Species__getName(
           WnSimpleGce__Species *self
         );
             
Input:

self: (required) A pointer to the species whose name is desired.

Output:

Routine returns the name of the species. If the input species is invalid, error handling is invoked.

Example: Print the name of the species pointed to by p_species:

         printf(
           "The name of the species is %s\n",
           WnSimpleGce__Species__getName( p_species )
         );
               

-top-


Name: WnSimpleGce__Species__new()

Description: Create a new species for a simple GCE model.

Syntax:
         WnSimpleGce__Species *
         WnSimpleGce__Species__new( const char *s_name );
             
Input:

s_name: (required) A string giving the name of the new species.

Output:

The routine returns a pointer to a new WnSimpleGce__Species structure, that is, a new species in a simple GCE model. The newly created species has a decay rate of zero. The decay rate can be updated with the routine WnSimpleGce__Species__updateDecayRate(). The newly created species also has yield coefficients of zero. These can be update with the routine WnSimpleGce__Species__updateYieldCoefficient(). If it is not possible to allocate memory for the new structure, WnSimpleGce error handling is invoked.

Example: Create a new species, oxygen-16, in a simple GCE model pointed to by p_my_model:

         p_o16 = WnSimpleGce__Species__new( "o16" );
               

-top-


Name: WnSimpleGce__Species__setInfallMassFractionFunction()

Description: Set the infall mass fraction function for the species for the model. If the user does not set this function, the species is assumed to have zero mass fraction in the infalling matter.

Syntax:
         void
         WnSimpleGce__Species__setInfallMassFractionFunction(
           WnSimpleGce__Species *self,
           WnSimpleGce__Species__infall_mass_fraction_function pf_func,
           void *p_user_data
         );
             
Input:

self: (required) A pointer to a WnSimpleGce__Species structure.

pf_func: (required) The name of the user's infall mass fraction function for a species. This must be cast as a WnSimpleGce__Species__infall_mass_fraction_function.

p_user_data: (required) A pointer to a user-defined data structure containing extra data for the user's infall mass fraction function.

Example: Set the infall mass fraction function for the species p_species to my_infall_mass_fraction_function and also pass the user-supplied data structure my_data containing the extra data to be applied by my_infall_mass_fraction_function:

         WnSimpleGce__Species__setInfallMassFractionFunction(
           p_species,
           (WnSimpleGce__Species__infall_mass_fraction_function)
              my_infall_mass_fraction_function,
           &my_data
         );
               

-top-


Name: WnSimpleGce__Species__updateDecayRate()

Description: Update the decay rate (per Gyr) for a species in a simple GCE model.

Syntax:
         void
         WnSimpleGce__Species__updateDecayRate(
           WnSimpleGce__Species *self,
           double d_decay_rate
         );
             
Input:

self: (required) A pointer to the species whose decay rate is to be updated.

d_decay_rate: (required) A double giving the decay rate (per Gyr) of the species.

Output:

Upon successful return, the decay rate of the species has been updated to the input value. If the species or the decay rate is invalid, error handling is invoked.

Example: Update the decay rate of al26 (pointed to by p_al26) to 1000. per Gyr:

         WnSimpleGce__Species__updateDecayRate( p_al26, 1000. );
               

-top-


Name: WnSimpleGce__Species__updateYieldCoefficient()

Description: Update the yield coefficient for a species.

Syntax:
         int
         WnSimpleGce__Species__updateYieldCoefficient(
           WnSimpleGce__Species *self,
           unsigned int i_n,
           double d_coefficient
         );
             
Input:

self: (required) A pointer to the species whose yield coefficient is to be updated.

i_n: (required) An unsigned int giving the power of the primary metallicity for which the coefficient is being updated.

d_coefficient: (required) A double giving the value to which to update the coefficient.

Output:

Routine returns 0 if successful, -1 if not. Upon successful return, the yield coefficient for the term in the yield that is the primary metallicity raised to the power i_n has been updated to the input value. If the species is invalid, error handling is invoked.

Example: Update the primary metallicity part (n=0) of the yield of al27 (pointed to by p_al27) to 0.0034:

         WnSimpleGce__Species__updateYieldCoefficient( p_al27, 0, 0.0034 );
               

-top-


Name: WnSimpleGce__clearInfallPrimaryMetallicityFunction()

Description: Clear the infall primary metallicity function for the model. The routine is reset to the default--that is, zero infall primary metallicity.

Syntax:
         void
         WnSimpleGce__clearInfallPrimaryMetallicityFunction(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Clear the infall primary metallicity function for the simple GCE model p_model:

         WnSimpleGce__clearInfallPrimaryMetallicityFunction(
           p_model
         );
               

-top-


Name: WnSimpleGce__computeGasMass()

Description: Compute the gas mass in the disk (or Solar annulus) for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computeGasMass(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the gas mass.

Output:

Routine returns the total mass at the input time for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the gas mass at 4.5 Gyr:

         d_time = 4.5;
         printf(
           "At %g Gyr, the gas mass is %g.\n",
           d_time,
           WnSimpleGce__computeGasMass( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__computeInfallCycleNumber()

Description: Compute the infall cycle number (integral of the infall rate divided by the gas mass from zero to the input time) for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computeInfallCycleNumber(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the infall cycle number.

Output:

Routine returns the infall cycle number at the input time for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the infall cycle number at 7.3 Gyr:

         d_time = 7.3;
         printf(
           "At %g Gyr, the infall cycle number is %g.\n",
           d_time,
           WnSimpleGce__computeCycleNumber( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__computeInfallRate()

Description: Compute the infall rate for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computeInfallRate(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the infall rate.

Output:

Routine returns the infall rate at the input time for the input model. for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the infall rate at 8.5 Gyr:

         d_time = 8.5;
         printf(
           "At %g Gyr, the infall rate is %g.\n",
           d_time,
           WnSimpleGce__computeInfallRate( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__computeOmegaFromGasFraction()

Description: Compute the omega (in per Gyr) that gives the input gas fraction (ratio of gas mass to total mass) at the input time.

Syntax:
         int 
         WnSimpleGce__computeOmegaFromGasFraction(
           WnSimpleGce *self,
           double d_time,
           double d_gas_fraction
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the omega that gives the desired gas fraction.

Output:

Upon successful return, the omega for the model has been updated to the value that gives the desired gas fraction at the input time. and the routine returns 1 (true). The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model, time, or gas fraction is invalid, error handling is invoked. If the routine is unable to find the omega, the routine returns 0 (false).

Example: For the simple GCE model pointed to by p_model, find the omega that gives a gas fraction of 0.091 at 13 Gyr:

         d_time = 13.;
         d_gas_fraction = 0.091;
        
         WnSimpleGce__computeOmegaFromGasFraction(
           p_model, d_time, d_gas_fraction
          );
        
         printf(
           "To get a gas fraction of %g at %g Gyr, omega must be %g per Gyr.\n",
           d_gas_fraction,
           d_time,
           WnSimpleGce__getOmega( p_model )
         );
               

-top-


Name: WnSimpleGce__computePrimaryMetallicity()

Description: Compute the primary metallicity for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computePrimaryMetallicity(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the primary metallicity.

Output:

Routine returns the primary metallicity at the input time for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the primary metallicity at 7.3 Gyr:

         d_time = 7.3;
         printf(
           "At %g Gyr, the primary metallicity is %g.\n",
           d_time,
           WnSimpleGce__computePrimaryMetallicity( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__computeSpeciesMassFraction()

Description: Compute the mass fraction for the input species in the gas for the input model at the given time.

Syntax:
         double
         WnSimpleGce__computeSpeciesMassFraction(
           WnSimpleGce *self,
           WnSimpleGce__Species *p_species,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

p_species: (required) A pointer to a WnSimpleGce__Species.

d_time: (required) A double giving the time (in Gyr) at which to compute the mass fraction in the gas of the species.

Output:

Routine returns the mass fraction of the species at the input time for the input model. If the model, species, or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model and the WnSimpleGce__Species p_species, print the mass fraction at 11 Gyr:

         d_time = 11.;
         printf(
           "At %g Gyr, the mass fraction of %s is %g.\n",
           d_time,
           WnSimpleGce__Species__getName( p_species ),
           WnSimpleGce__computeSpeciesMassFraction( p_model, p_species, d_time )
         );
               

-top-


Name: WnSimpleGce__computeSpeciesYield()

Description: Compute the yield for the input species for the input model at the given time.

Syntax:
         double
         WnSimpleGce__computeSpeciesYield(
           WnSimpleGce *self,
           WnSimpleGce__Species *p_species,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

p_species: (required) A pointer to a WnSimpleGce__Species.

d_time: (required) A double giving the time (in Gyr) at which to compute the yield of the species.

Output:

Routine returns the yield of the species at the input time for the input model. If the model, species, or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model and the WnSimpleGce__Species p_species, print the yield at 11 Gyr:

         d_time = 11.;
         printf(
           "At %g Gyr, the yield of %s is %g.\n",
           d_time,
           WnSimpleGce__Species__getName( p_species ),
           WnSimpleGce__computeSpeciesYield( p_model, p_species, d_time )
         );
               

-top-


Name: WnSimpleGce__computeStarMass()

Description: Compute the mass in the disk (or Solar annulus) locked up in stars (and stellar remnants) for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computeStarMass(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the mass in stars and stellar remnants.

Output:

Routine returns the mass in stars and remnants at the input time for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the star mass at 3.2 Gyr:

         d_time = 3.2;
         printf(
           "At %g Gyr, the mass locked in stars is %g.\n",
           d_time,
           WnSimpleGce__computeStarMass( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__computeTotalMass()

Description: Compute the total mass in the disk (or Solar annulus) for the given model at the input time.

Syntax:
         double
         WnSimpleGce__computeTotalMass(
           WnSimpleGce *self,
           double d_time
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_time: (required) A double giving the time (in Gyr) at which to compute the total mass.

Output:

Routine returns the total mass at the input time for the input model. The routine uses the default infall rate to compute this value unless the user has specified a different infall rate function with WnSimpleGce__setInfallRateFunction(). If the model or time is invalid, error handling is invoked.

Example: For the simple GCE model pointed to by p_model, print the total mass at 4.5 Gyr:

         d_time = 4.5;
         printf(
           "At %g Gyr, the total mass is %g.\n",
           d_time,
           WnSimpleGce__computeTotalMass( p_model, d_time )
         );
               

-top-


Name: WnSimpleGce__free()

Description: Free the memory for a simple GCE model.

Syntax:
         void
         WnSimpleGce__free( WnSimpleGce *self );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Output:

Upon successful return, the memory for the model has been freed.

Example: Free the memory for the WnSimpleGce model pointed to by p_my_model:

         WnSimpleGce__free( p_my_model );
               

-top-


Name: WnSimpleGce__getInfallDelta()

Description: Retrieve the current value of Delta (in Gyr) for the input model.

Syntax:
         double
         WnSimpleGce__getInfallDelta(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Print the Delta for the simple GCE model pointed to by p_model:

         printf(
           "Delta for the model is %g per Gyr.\n",
           WnSimpleGce__getInfallDelta( p_model )
         );
               

-top-


Name: WnSimpleGce__getInfallKValue()

Description: Retrieve the current value of the infall k for the input model.

Syntax:
         unsigned int
         WnSimpleGce__getInfallKValue(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Print the k for the simple GCE model pointed to by p_model:

         printf(
           "The infall k for the model is %d per Gyr.\n",
           WnSimpleGce__getInfallKValue( p_model )
         );
               

-top-


Name: WnSimpleGce__getInitialGasMass()

Description: Retrieve the current value of the initial mass.

Syntax:
         double
         WnSimpleGce__getInitialGasMass(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Print the initial mass for the simple GCE model pointed to by p_model:

         printf(
           "The initial mass for the model is %g solar masses.\n",
           WnSimpleGce__getInitialGasMass( p_model )
         );
               

-top-


Name: WnSimpleGce__getOmega()

Description: Retrieve the current value of omega (per Gyr) for the input model.

Syntax:
         double
         WnSimpleGce__getOmega(
           WnSimpleGce *self
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

Example: Print the omega for the simple GCE model pointed to by p_model:

         printf(
           "Omega for the model is %g per Gyr.\n",
           WnSimpleGce__getOmega( p_model )
         );
               

-top-


Name: WnSimpleGce__new()

Description: Create a new simple GCE model.

Syntax:
         WnSimpleGce * WnSimpleGce__new( );
             
Output:

The routine returns a pointer to a new WnSimpleGce structure, that is, a new simple GCE model. If it is not possible to allocate memory for the new structure, WnSimpleGce error handling is invoked.

Example: Create a new simple GCE model pointed to by p_my_model:

         p_my_model = WnSimpleGce__new( );
               

-top-


Name: WnSimpleGce__setInfallPrimaryMetallicityFunction()

Description: Set the infall primary metallicity function for the model. If the user does not set this function, the infalling material is assumed to have zero metallicity.

Syntax:
         void
         WnSimpleGce__setInfallPrimaryMetallicityFunction(
           WnSimpleGce *self,
           WnSimpleGce__infall_primary_metallicity_function pf_func,
           void *p_user_data
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

pf_func: (required) The name of the user's infall primary metallicity function. This must be cast as a WnSimpleGce__infall_primary_metallicity_function.

p_user_data: (required) A pointer to a user-defined data structure containing extra data for the user's infall primary metallicity function.

Example: Set the infall primary metallicity function for the simple GCE model p_model to my_infall_primary_metallicity function and also pass the user-supplied data structure my_data containing the extra data to be applied by my_infall_primary_metallicity_function:

         WnSimpleGce__setInfallPrimaryMetallicityFunction(
           p_model,
           (WnSimpleGce__infall_primary_metallicity_function)
              my_infall_primary_metallicity_function,
           &my_data
         );
               

-top-


Name: WnSimpleGce__setInfallRateFunction()

Description: Set the infall rate function for the model. If the user does not set this function, the model uses the default infall function (Clayton's standard model 1).

Syntax:
         void
         WnSimpleGce__setInfallRateFunction(
           WnSimpleGce *self,
           WnSimpleGce__infall_rate_function pf_func,
           void *p_user_data
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

pf_func: (required) The name of the user's infall rate function. This must be cast as a WnSimpleGce__infall_rate_function.

p_user_data: (required) A pointer to a user-defined data structure containing extra data for the user's infall function.

Example: Set the infall function for the simple GCE model p_model to my_infall_function and also pass the user-supplied data structure my_data containing the extra data to be applied by my_infall_function:

         WnSimpleGce__setInfallRateFunction(
           p_model,
           (WnSimpleGce__infall_rate_function) my_infall_function,
           &my_data
         );
               

-top-


Name: WnSimpleGce__updateInfallDelta()

Description: Update the Delta (the time offset) for the default infall rate function (Clayton's standard model 1).

Syntax:
         void
         WnSimpleGce__updateInfallDelta(
           WnSimpleGce *self,
           double d_Delta
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_Delta: (required) A double giving the value to which the infall Delta value (in Gyr) is to be updated.

Output:

Upon successful return, the infall Delta value of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the infall Delta value of the simple GCE model p_my_model to 0.2 Gyr:

         WnSimpleGce__updateInfallDelta( p_my_model, 0.2 );
               

-top-


Name: WnSimpleGce__updateInfallKValue()

Description: Update the k value for the default infall rate function (Clayton's standard model 1).

Syntax:
         void
         WnSimpleGce__updateInfallKValue(
           WnSimpleGce *self,
           unsigned int i_k
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

i_k: (required) An unsigned int giving the value to which the infall k value is to be updated.

Output:

Upon successful return, the infall k value of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the infall k value of the simple GCE model p_my_model to 2:

         WnSimpleGce__updateInfallKValue( p_my_model, 2 );
               

-top-


Name: WnSimpleGce__updateInfallPrimaryMetallicity()

Description: Update the infall primary metallicity for the input model.

Syntax:
         void
         WnSimpleGce__updateInfallPrimaryMetallicity(
           WnSimpleGce *self,
           double d_infall_primary_metallicity
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_infall_primary_metallicity: (required) A double giving the value to which the infall primary metallicity is to be updated.

Output:

Upon successful return, the infall primary metallicity of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the infall primary metallicity of the simple GCE model p_my_model to 0.005:

         WnSimpleGce__updateInfallPrimaryMetallicity( p_my_model, 0.005 );
               

-top-


Name: WnSimpleGce__updateInitialGasMass()

Description: Update the initial gas mass for the input model.

Syntax:
         void
         WnSimpleGce__updateInitialGasMass(
           WnSimpleGce *self,
           double d_initial_gas_mass
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_initial_gas_mass: (required) A double giving the value to which the model's initial gas mass is to be updated. The units are arbitrary, but should be consistent with the infall rate.

Output:

Upon successful return, the initial gas mass of the model has been updated to the input value. If the model or the initial gas mass is invalid, error handling is invoked.

Example: Update the initial gas mass of the simple GCE model p_my_model to 1.e5 (Solar masses):

         WnSimpleGce__updateInitialGasMass( p_my_model, 1.e5 );
               

-top-


Name: WnSimpleGce__updateInitialPrimaryMetallicity()

Description: Update the initialprimary metallicity for the input model.

Syntax:
         void
         WnSimpleGce__updateInitialPrimaryMetallicity(
           WnSimpleGce *self,
           double d_initial_primary_metallicity
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_initial_primary_metallicity: (required) A double giving the value to which the primary metallicity yield is to be updated.

Output:

Upon successful return, the initial primary metallicity of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the initial primary metallicity of the simple GCE model p_my_model to 0.015:

         WnSimpleGce__updateInitialPrimaryMetallicity( p_my_model, 0.015 );
               

-top-


Name: WnSimpleGce__updateOmega()

Description: Update the omega (the gas consumption rate--in per Gyr) for the input model.

Syntax:
         void
         WnSimpleGce__updateOmega(
           WnSimpleGce *self,
           double d_omega
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_omega: (required) A double giving the value to which the omega (in per Gyr) is to be updated.

Output:

Upon successful return, the omega of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the omega of the simple GCE model p_my_model to 0.5 per Gyr:

         WnSimpleGce__updateOmega( p_my_model, 0.5 );
               

-top-


Name: WnSimpleGce__updatePrimaryMetallicityYield()

Description: Update the primary metallicity yield for the input model.

Syntax:
         void
         WnSimpleGce__updatePrimaryMetallicityYield(
           WnSimpleGce *self,
           double d_primary_metallicity_yield
         );
             
Input:

self: (required) A pointer to a WnSimpleGce model.

d_primary_metallicity_yield: (required) A double giving the value to which the primary metallicity yield is to be updated.

Output:

Upon successful return, the primary metallicity yield of the model has been updated to the input value. If the model is invalid, error handling is invoked.

Example: Update the primary metallicity yield of the simple GCE model p_my_model to 0.015:

         WnSimpleGce__updatePrimaryMetallicityYield( p_my_model, 0.015 );
               

-top-




Valid XHTML 1.1        Copyright © 2001-2012, Clemson University. All rights reserved.        Valid CSS!
Page last modified on 2009/04/14 17:03