Source Terms¶
Source term models cover the internal generation of pressure (in fluids and solids), energy, species component mass and electrical potential for each of the main differential equations. Several representations are available for fluids, and the user should be aware of some consistencies required with density models (see details below). For all of the source models, the user must heed the following warning:
Make sure the equation term multipliers for the source terms being used are set to unity (Section 4.12  Problem Description and Equation specification in Volume 1).
Solid Body Source¶
Solid Body Source = CONSTANT <species_number> <float1> <float2> <float3>
Description / Usage¶
This card is used to specify the model for the body force source term on the solid mechanics momentum equations. This card is used most to impose gravitational forces on solid phase material elements in the problem. It can be also used to impose body forces on the pseudosolid mesh material if that is desirable.
Definitions of the input parameters are as follows:
CONSTANT 
A string identifying the constant force model. Currently, this is the only body force model for solid materials.

JXB 
A string identifying a body force model based on external current density fields J and external magnetic fields B. See Technical discussion.

Technical Discussion¶
Just as there is a body force vector that can be applied to fluid material regions, there is a capability to apply a similar body force term to solid material regions. Most often this is used to apply gravitational forces in which case the values of the components supplied on this card would be the solid density multiplied by the gravitational acceleration vector.
The JXB model requires external nodal fields loaded through External Field capability. These fields must be named JE_N_1, JE_N_2, and JE_N_3 for the three components of the current density and BE_N_1, BE_N_2, and BE_N_3 for the three components of the magnetic field.
References¶
No References.
Mass Source¶
Mass Source = CONSTANT 0.
Description / Usage¶
This source term is inactive in Goma but the card must be present in the input at this time. Definitions of the input parameters are as follows.
CONSTANT 
Name of the model (to prevent heartburn for Goma). 0. A floating point number (the value zero). 
Technical Discussion¶
No Discussion.
References¶
No References.
Heat Source¶
Heat Source = {model_name} <float_list> [varies]
Description / Usage¶
This required card is used to specify the model for the source term on the energy equation. Definitions of the input parameters are as follows:
{model_name} 
Name of the model for the source term on the energy equation. The permissible values are

<float_list> 
One or more floating point numbers (<float1> through <floatn>) whose values are determined by the selection for {model_name}. Note that not all models have a <float_list>. 
Sourceterm model choices and their parameters are discussed below. WARNING: make sure the equation term multipliers for the source terms are set to unity (see the Equation Cards segment in the previous chapter).
CONSTANT <float1> 
The constant source model adds a constant homogenous source term [E/L3t] to the heat equations. The <float_list> has a single value: <float1>  Heat source. 
USER <float1>… <floatn> 
The USER option indicates that a userdefined model has been introduced into the usr_heat_source routine in the user_mp.c file. The <float_list> is of arbitrary length subject to the user’s requirements to parameterize the model. 
USER_GEN <float1>… <floatn> 
The USER_GEN option provides a userdefined model with lowlevel, general capabilities. For this option one must make the appropriate modifications to the routine usr_heat_source_gen in the user_mp_gen.c file. The difference between the USER and USER_GEN capabilities is described at the beginning of this chapter. 
JOULE 
The JOULE model is used to specify a Joule heating source term. No input is required for this model as the sole independent parameter of the model for the voltage equation is the “Electrical Conductivity”, which is specified in the material file. 
EPOXY <float1> 
The EPOXY model is used to specify the heat generated by an epoxy curing reaction. The single input value is the:

VISC_DISS <float> 
The VISC_DISS model is used to specify the heat generated by viscous dissipation. The <float_list> has a single value:

BUTLER_VOLMER <integer> <float1> <float2> <float3> <float4> <float5> <float6> <float7> <float8> 
The BUTLER_VOLMER model is used to specify the current source or sink due to a homogeneuous electrochemical reaction involving a single species (e.g., the hydrogen oxidation and oxygen reduction reactions in a hydrogenfeuled polymerelectrolyte membrane fuel cell), which is computed using the ButlerVolmer kinetic model (as described in the Theory section of the BUTLER_VOLMER current source card). This is due to that the voltage equation is used to solve for the electrical potential in the liquid electrolyte phase whereas the energy equation is utilized to solve for the electrical potential in the solidelectrode phase such that the electrode potential unknowns is represented by the temperature unknown. Parameters required for this BUTLER_VOLMER heat source model are the same as those for the BUTLER_VOLMER current source model; accordingly, detailed description of the model parameters can be found in the Current Source section of this manual. 
ELECTRODE_KINETICS 
The ELECTRODE_KINETICS model is used to specify the current generated or consumed in the solid electrode phase in electrochemical processes involving concentrated electrolyte solution and multiple species as in thermal batteries. As in the case of the BUTLER_VOLMER model, this is due to that the voltage equation is used to solve for the electrical potential in the liquid electrolyte phase whereas the energy equation is utilized to solve for the electrical potential in the solid electrode phase such that the electrode potential unknowns is represented by the temperature unknown. The {model_name} ELECTRODE_KINETICS toggles on the option in the equation assembly; no parameters are required. 
Technical Discussion¶
The energy equation solved by Goma, which can be found elsewhere, is a convectionconduction equation given by
The heat sourceterm model represented by H is specified by this input record. The CONSTANT, USER and USER_GEN options provide the standard means of specifying model input and will not be discussed.
JOULE Model: The JOULE model is used to specify a Joule heating term. It is based on heat generation in a medium of specified electrical resistance subjected to an electrical voltage potential. It computes the heat source as:
where J is the current flux density which is represented as –σ∇φ and φ is represented using the voltage equation. No input is required for this model since the Electrical Conductivity is specified in the material file for the voltage equation.
EPOXY Model: The EPOXY model is used to specify the heat generated by a condensation reaction, which is the heat of reaction, ΔHrxn, multiplied by the reaction rate as measured by the extent of reaction. The form of the equation is:
This card is used in conjunction with the EPOXY Species Source so that the reaction rate Rα can be determined.
VISC_DISS Model: In heat transfer problems that are accompanied by fluid flow, the energy balance equation contains a term which represents the (rate of) work done on the fluid by viscous forces. These forces have the potential to raise the fluid temperature and therefore it may be necessary to include these forces in your analysis. Typically, problems in which this term is significant may be characterized as highspeed flows with large velocity gradients, rapid extrusion and lubrication problems. The Brinkman number (Br = (μV2) ⁄ (kΔT)) is an indicator of the importance of viscous heating relative to the heat flow caused by temperature gradients.
Mathematically, the Heat Source term, H, in the energy equation is given by
where (( •) indicates a double dot product. This mechanism is an irreversible process whereby mechanical energy is degraded into thermal energy, as the right hand side expands to the sum of quadratic terms which will always be positive, at least for Newtonian fluids. In Goma, the VISC_DISS model computes the source term in function visc_diss_heat_source in mm_std_models.c; the expression looks like
where μ is the viscosity and γ is the shear rate.
The multiplier allows the user the flexibility to choose appropriate units for the momentum and energy equations. For example, for many problems the momentum equations are scaled appropriately using viscosity units of psisec. But in the absence of this multiplier, this would force the energy equation to be in units of psi/sec; in other words, (density*heat capacity) would need to be in units of psi/(deg C) and thermal conductivity would need to be in units of psiin2/(secdeg C)  these aren’t exactly common units! Instead, we can set the multiplier to 6891 (i.e., 6891 Pa = 1 psi) in order to have the energy equation in units of J/sec  i.e. leaving (density*heat capacity) in units of J/(m3 deg C) and thermal conductivity in terms of J/(msec deg C). Another use of the multiplier is to allow appropriate scales when the momentum equation is diffusiondominated and the thermal equation is convectiondominated. Suppose we keep all quantities in MKS units. The convection terms in the thermal equation can then be scaled to roughly order unity by dividing through by (density*heat capacity)  i.e. set heat capacity=1/density, thermal conductivity = thermal diffusivity, and set the dissipation multiplier to 1/(density*heat capacity).
So, in essence, this multiplier allows flexibility in the choice of mechanical and thermal units in a convenient manner  i.e. it’s on the term that couples the energy and momentum equations.
BUTLER_VOLMER and ELECTRODE_KINETIC Models: As mentioned above, these two models are used to specify the current generated or consumed in the solid electrode phase in electrochemical processes such as polymerelectrolytemembrane fuel cells and thermal batteries. This is due to that the voltage equation is used to solve for the electrical potential in the liquid electrolyte phase whereas the energy equation is utilized to solve for the electrical potential in the solidelectrode phase such that the electrode potential unknown is actually represented by the temperature unknown. Further details for the BUTLER_VOLMER model are presented in the current source model section of this manual and that for the ELECTRODE_KINETIC model can be found in the reference provided below (Chen et al. 2000).
VARIABLE_DENSITY Model: Work was begun on a VARIABLE_DENSITY model for drying problems but has not been completed. The roots for this may be found in the source code but the model is not yet functional; it was not listed above as a valid Heat Source option.
References¶
SAND20000207: Final Report on LDRD Project: A Phenomenological Model for Multicomponent Transport with Simultaneous Electrochemical Reactions in Concentrated Solutions, K. S. Chen, G. H. Evans, R. S. Larson, D. R. Noble and W. G. Houf, January 2000.
Species Source¶
Species Source = {model_name} <species> <float_list> [varies]
Description / Usage¶
This required card is used to specify the model for the source term on the species convection diffusion equations. Definitions of the input parameters are as follows:
{model_name} 
Name of the model for the source term on the species convection diffusion equations. The permissible values are

<species> 
An integer designating the species equation. 
<float_list> 
One or more floating point numbers (<float1> through <floatn>) whose values are determined by the selection for {model_name}. 
Sourceterm model choices and their parameters are discussed below. Details are contained in the Technical Discussion section below. The <species> definition given above applies to all the following choices for which it is specified; its definition will not be repeated.
CONSTANT <species> <float1> 
This model of a constant species source has a single input value: <float1>Constant species source 
BUTLER_VOLMER <species> <float1> <float2> <float3> <float4> <float5> <float6> <float7> <float8> <float9> 
This is the homogeneous species source or sink term (in units of moles per unit volume, e.g. moles/cm3s) as described by the ButlerVolmer kinetic model (see the Theory section below). One integer and 9 flotas are required:

ELECTRODE_KINETICS 
The ELECTRODE_KINETICS model is used to specify the species generation or consumption in electrochemical processes involving concentrated electrolyte solutions and multiple species such as thermal batteries. The {model_name} ELECTRODE_KINETICS toggles on the option in the equation assembly; no parameters are required. 
ELECTROOSMOTIC <int1> <int2> <float1> <float2> <float3> <float4> <float5> <float6> <float7> <float8> <float9> <float10> 
This is the source or sink term (in units of moles per unit volume, e.g. moles/cm3s) for thw water species due to electroosmotic drag by the protons (H+). Two integers and 10 flotas are required:

EPOXY <species> <floatlist> 
The EPOXY model adds a reaction source term for a condensation polymerization reaction based on an extent of reaction variable. Six model parameters make up the <float_list> for the EPOXY species source model, as follows:
This model will be used with the EPOXY Heat Source model to compute the reaction rate. 
EPOXY_DEA <species> <floatlist> 
The EPOXY_DEA model was created specifically for a diethanolamineepoxy curing reaction, a different model of the reaction kinetics from the EPOXY source model. The <float_list> for EPOXY_DEA species source model has five values, where

FOAM 
The FOAM model was created specifically for the removable epoxy foam decomposition kinetics. However, the basis for evolving the density change can be applied to other reactive material models. There are eight float inputs in <float_list> which are used to specify two Arrheniustype reaction rates r1 and r2 and two reference temperatures T1 and T2:
where Aj and Ej are the Arrhenius preexponential factor and activation energy, respectively, for reaction rate rj, and T1 and T2 are used to define a dimensionless problem temperature T∗ = (T – T1) ⁄ (T2 – T ). 
USER <species> <floatlist> 
The USER option indicates that a userdefined model has been introduced into the usr_species_source routine in the user_mp.c file. The <float_list> is of arbitrary length subject to the user’s requirements to parameterize the model. 
Examples¶
Sample card for the CONSTANT model:
Species Source = CONSTANT 0 2.
Sample card for the BUTLER_VOLMER model:
Species Source = BUTLER_VOLMER 1 1. .02 1. 4.e5 1. 1. 353. 1.18 4.
Sample card for the ELECTROOSMOTIC model:
Species Source = ELECTROOSMOTIC 2 1 1. .02 1. 4.e5 1. 1. 353. 1.18 4.0 1.4
Technical Discussion¶
A discussion of units for species flux terms can be found under FAQs on the Diffusivity card.
The CONSTANT option offers the simplest way for prescribing a constant homogeneous rate of species generation or consumption involving in a speciestransport process.
In the BUTLER_VOLMER model, the current source or sink due to a homogeneuous electrochemical reaction involving a single species (e.g., the hydrogen oxidation and oxygen reduction reactions in a hydrogenfeuled polymerelectrolytemembrane fuel cell) is computed using the ButlerVolmer kinetic model as described below in the Theory section.
The ELECTRODE_KINETIC model computes the molar rate of electrolytespecies generation or consumption in electrochemical processes involving concentrated electrolyte solutions and multiple species as in thermal batteries. The molar rate of electrolytespecies consumption is evaluated using ButlerVolmer kinetics along with Faraday’s law. Further details can be found in the reference listed below in the References subsection (Chen et al. 2000).
The ELECTROOSMOTIC model computes the waterspecies flux due to the electroosmotic drag of protons (H+), which is proportional to the average current density with the proportionality constant being the electroosmotic drag coefficient, nd.
The EPOXY model adds a reaction source term for a condensation polymerization reaction based on an extent of reaction variable. The extent of reaction is tracked as a convection equation with a reaction source term. The form of the EPOXY species source term is
where α is the extent of reaction, the rate constants, k1 and k2, can depend on temperature in the Arrhenius manner, and m and n are exponents.
where R is the gas constant in the appropriate units, Ai is the prefactor, and Ei is the activation energy for reaction. Six parameters are required to define the model: A1 and A2 (prefactors), E1 and E2 (activation energies), and m and n (exponents), with R being the universal gas constant.
The EPOXY_DEA model was created specifically for diethanolamineepoxy curing reaction. While the expression for the source term is identical to the EPOXY model (with n=1.6),
the reaction kinetics differs, having three reaction regimes for exponent m and rate constant k2. For T< 65 C, m = 2 and
for 65 C < T< 90C, m = 74*k2 and
and for T > 90C, m = k2 = 0. Rate constant k1 is fixed for all these regimes and is determined from the prefactor A1 and activation energy E1.
The FOAM model computes the mixture volume change rate as:
where ρmix is the mixture density as defined in the REACTIVE_FOAM density model (which is required for this model) and Vi is the specific volume of component i.
The USER option indicates that a userdefined model has been introduced into the usr_species_source routine in the user_mp.c file. The <float_list> is of arbitrary length subject to the user’s requirements to parameterize the model.
Theory¶
The rate of species generation or consumption in electrochemical processes involving a single species such as polymerelectrolytemembrane fuel cells can be computed using the ButlerVolmer kinetic model and the Faraday’s law (cf. Newman 1991, Chen et al. 2000, Chen and Hickner 2006):
where r is the homogeneous species source or sink in units of moles/cm3s; s is the stoichiometric coefficient with a sign comvention such that r represents a source when s > 0 and sink when s < 0; n is the number of electrons involved in the electrochemical reaction; ai0 denotes the product of interfacial area per unit volume by exchange current density, which has units of A/cm3; c and cref are, respectively, species and reference molar concentrations in units of moles/cm3; β is reaction order; αa and αc are, respetively, the anodic and cathodic transfer coefficients; F is the Faraday’s constant ( ≡ 96487 C/mole) and R is the universal gasl constant ( ≡ 8.314 J/moleK); and are, respectively, the electrode and electrolyte potentials in unit of V; U0 is the opencircuit potential in unit of V; and T is temperature in unit of K.
References¶
for EPOXY_DEA Model GTM011.0: Validation of 828/DEA/GMB Encapsulant using GOMA, August 20, 1999, A. C. Sun
for BUTLER_VOLMER and ELECTRODE_KINETIC Models:
J. Newman, Electrochemical Systems, 2nd Edition, PrenticeHall, Englewood Cliff, NJ (1991).
K. S. Chen, G. H. Evans, R. S. Larson, D. R. Noble, and W. G. Houf, “Final Report on LDRD Project: A Phenomenological Model for Multicomponent Transport with Simultaneous Electrochemical Reactions in Concentrated Solutions”, Sandia Report SAND20000207 (2000).
K. S. Chen and M. A. Hickner, “Modeling PEM fuel cell performance using the finiteelement method and a fullycoupled implicit solution scheme via Newton’s technique”, in ASME Proceedings of FUELCELL200697032 (2006).
Current Source¶
Current Source = {model_name} <optional integer> <float_list> [E/M]
Description / Usage¶
This card is used to specify the model for the source term on the voltage potential equation. Values for the permissible {model_names} and the associated <optional integer> and <floatlist> parameters are given below.
{model_name} 
Name of the model for the source term on the voltage equation having permissible values

<optional integer> 
This is required for the BUTLER_VOLMER model only. 
<float_list> 
One or more floating point numbers (<float1> through <floatn>) whose values are determined by the selection for {model_name}. Note that not all models have a <float_list>. 
Sourceterm model choices and their parameters are discussed below. WARNING: make sure the equation term multipliers for the source terms are set to unity (see the Equation Cards segment in the previous chapter).
CONSTANT <float1> 
For the CONSTANT current source term, there is a single input parameter corresponding to the current density.

USER <float_list> 
For a userdefined model, the set of parameters specified in the <floatlist> are defined in file user_mp.c in the function usr_current_source. 
BUTLER_VOLMER <integer> <float1> <float2> <float3> <float4> <float5> <float6> <float7> <float8> 
This is the homogeneous current source or sink term (in units of amphere per unit volume, e.g. A/cm3) as described by the ButlerVolmer kinetic model (see the Theory section below).One integer and 8 flotas are required:

ELECTRODE_KINETICS 
This is a toggle, turning the model on; no parameters are required. 
FICKIAN_CHARGED 
This is a toggle, turning the model on; no parameters are required. 
NET_CHARGE 
This is a toggle, turning the model on; no parameters are required. 
STEFAN_MAXWELL_CHARGED 
This is a toggle, turning the model on; no parameters are required. 
Examples¶
Sample card for the CONSTANT model:
Current Source = CONSTANT 0.50
Sample card for the BUTLER_VOLMER model:
Current Source = BUTLER_VOLMER 0 1. 1000. 0.5 4.e5 1. 1. 353. 0.
Technical Discussion¶
The CONSTANT and USER models are those standardly available in Goma.
In the BUTLER_VOLMER model the current source or sink due to a homogeneuous electrochemical reaction involving a single species (e.g., the hydrogen oxidation and oxygen reduction reactions in a hydrogenfeuled polymerelectrolytemembrane fuel cell) is computed using the ButlerVolmer kinetic model as described below in the Theory section.
In the FICKIAN_CHARGED model, current source or sink for electrochemical processes involving dilute electrolyte solution and multiple species as in LIGA electrodeposition is computed.
The NET_CHARGE model is used to compute the net charge or current source in a region where the concentrations of positively and negatively charged species differ as in the space layer of a atmospheric copper sulfidation process, in which the copper hole and vacancy concentrations differ such that charge separation occur (see the reference listed below in the Reference subsection, Chen 2004, for further details).
In the STEFAN_MAXWELL_CHARGED and ELECTRODE_KINETICS models, current sources or sinks for electrochemical processes involving concentrated electrolyte solutions and multiple species as in thermal batteries are computed.
Further details of these models can be found in the SAND Reports and proceeding paper referenced below in the Theory subsection.
Theory¶
BUTLER_VOLMER model: for the ButlerVolmer kinetic model with the exchange current density being dependent on a single species is given by (cf. Newman 1991, Chen et al. 2000, Chen and Hickner 2006):
where j is the homogeneous current source or sink in units of A/cm3; s is the stoichiometric coefficient with a sign convention such that j represents a source when s > 0 and sink when s < 0; ai0 denotes the product of interfacial area per unit volume by exchange current density, which has units of A/cm3; c and cref are, respectively, species and reference molar concentrations in units of moles/cm3; β is reaction order; αa and αc are, respetively, the anodic and cathodic transfer coefficients; F is the Faraday’s constant ( ≡ 96487 C/mole) and R is the universal gasl constant ( ≡ 8.314 J/mole K); Φ1 and Φ2 are, respectively, the electrode and electrolyte potentials in unit of V; U0 is the opencircuit potential in unit of V; and T is temperature in unit of K.
NET_CHARGE model: The net charge or current source in a region with charge separation (e.g., in a space charge layer in which hole and vacancy concentrations differ as in the atmospheric copper sulfidation corrosion process) is given by
where j is the net charge or current source in units of A/cm3; zi is the charge number and ci is the molar concentration in units of moles/cm3, respectively, of species i; F is the Faraday’s constant ( ≡ 96487 C/mole); and n is the number of charge species present.
References¶
Newman, Electrochemical Systems, 2nd Edition, PrenticeHall, NJ (1991).
K. S. Chen, G. H. Evans, R. S. Larson, D. R. Noble, and W. G. Houf, “Final Report on LDRD Project: A Phenomenological Model for Multicomponent Transport with Simultaneous Electrochemical Reactions in Concentrated Solutions”, Sandia Report SAND20000207 (2000).
K. S. Chen and G. H. Evans, “Multidimensional Multispecies Modeling of Transient Electrodeposition in LIGA Microfabrication”, Sandia Report SAND20042864 (2004).
K. S. Chen, “Multidimensional Modeling of Atmospheric CopperSulfidation Corrosion on nonPlanar Substrates”, Sandia Report SAND20045878 (2004).
K. S. Chen and M. A. Hickner, “Modeling PEM fuel cell performance using the finiteelement method and a fullycoupled implicit solution scheme via Newton’s technique”, in ASME Proceedings of FUELCELL200697032 (2006).
Initialize¶
Initialize = {char_string} <integer> <float> [varies]
Description / Usage¶
This optional card provides a mechanism to set one of the field variables to a constant value within the current material block. Definitions of the input parameters are as follows:
<char_string> 
Permissible values for this input string are any variable names identified in source file rf_fem_const.h beginning at the section labeled Variable Names of unknowns, though they should be active in this material block. Examples include, but are not limited to, the following: VELOCITY1, VELOCITY2, VELOCITY3 (V123),MESH_DISPLACEMENT (MD123), SOLID_DISPLACEMENT (SD123), MASS_FRACTION, TEMPERATURE, PRESSURE,VOLTAGE, FILL, LS, POLYMER_STRESS (6 components, 8 modes), VELOCITY_GRADIENT (9 components), SHEAR_RATE, VOLF_PHASE (6 phases), POR_LIQ_PRES, POR_GAS_PRES, POR_POROSITY, POR_SATURATION, POR_LAST, LAGR_MULT (LM123), SURF_CHARGE, EXT_VELOCITY, EFIELD(123), SHELL (4 variables), SPECIES (7 variables). Note: for a comprehensive list of initializable variables, consult Volume 1 “Initialize” card. 
<integer> 
Species number to be initialized if the value of {char_string} is one of the SPECIES variables (see Technical Discussion); otherwise, set <integer> to zero. 
<float> 
Value to which the variable should be initialized. 
Multiple applications of this card are valid; Goma automatically counts the number of Initialize cards.
Technical Discussion¶
This card provides the means to set initial values for any of the field variables in the element block for a particular material. Since the setting of variables initialized on this card takes place after reading the initial guess (see function init_vec in file rf_util.c), it can be used to override the value in the initial guess file.
In order to set a field to a specific value over the entire problem domain, a similar Initialize capability is provided as a global variable in the General Specifications section of the Goma input file. Please check in the Problem Description section of this manual.
Note, the SPECIES_UNK variables are NOT used to initialize any of the species variables. Rather, the special definition called MASS_FRACTION is the variables used in Goma input or mat files for this input record. Multiple species are initialized by combining MASS_FRACTION with the second parameter (<integer>) on this card. These cards are particularly handy for mass transfer problems, where the initial conditions need to specify different concentrations of the same species in different materials.
Note: for a comprehensive list of initializable variables, consult Volume 1 “Initialize” card.