### 1.3.2. Types of Sources

#### 1.3.2.1. General Sources

A general source is a source term that is simply added to a general scalar equation. This includes the Energy, Additional Variable, Turbulence and Mass Fraction equations.

There is no restriction as to what the source term may depend on, although additional convergence control may be necessary for strongly-varying terms.

Sources for a particular component in a multicomponent fluid do not introduce any additional mass and so the sum of all component sources (including the constraint) must be zero. Note that sources may not be specified for the constraint component; the implied source for the constraint is equal to the negative of the sum of all specified component sources. For this reason, component sources might be useful to model single phase reactions, but multiphase reactions (in which a particular component is transferred from one phase to another) require the use of mass (continuity) sources. Further details on mass sources, and particular issues related to multicomponent fluids, are provided in Mass (Continuity) Sources.

General sources can be applied on the solid part of a porous domain. Such a source can be multiplied by the solid fraction in the porous domain.

##### 1.3.2.1.1. Source Coefficient / Total Source Coefficient

The converged solution depends only on the source value. For nonlinear sources, a linearization coefficient may be specified to improve convergence. This is specified by the optional Source Coefficient or Total Source Coefficient, which should be a reasonable approximation to the derivative

| (1–20)

where is the source or total source term. Note that this derivative must be negative for stability purposes. If a positive value is specified, the solver will reverse the sign. Leaving the coefficient unspecified is equivalent to using a zero coefficient. For the energy equation, the derivative is taken with respect to temperature.

Although it is possible to set a coefficient when the source term is zero, it is not normally of practical use; it will change convergence rates without adding any source.

#### 1.3.2.2. Momentum Sources

CFX supports three types of momentum sources:

- isotropic loss model

- directional loss model

- general momentum sources

The theory for these momentum source types is given in Momentum Sources in the CFX-Solver Theory Guide. This section gives some additional practical tips on how to use the sources.

##### 1.3.2.2.1. Isotropic and Directional Loss Models

Isotropic and directional loss models are useful for modeling porous momentum losses either with or without the volume effect of porosity. The loss model formulations are the same in both cases, but are set up in different locations in the user interface. If the volume effect of porosity is included, you need to create a porous domain and set the loss model details on the domain details view. If it is not included, the momentum loss model is set on a subdomain. For details on how the volume effect of porosity modifies the governing equations, see Domain Type in the CFX-Pre User's Guide. Note also that loss coefficients may be derived from experimental or analytical data using either true or superficial velocity. When applying a loss model, you must be aware of which velocity was used to derive the loss coefficients.

- When applying a loss model on a subdomain of a fluid domain, the solver assumes the coefficients multiply the superficial velocity, so if the coefficients were derived using true velocity, you will need to adjust the coefficients accordingly. The permeability must be multiplied by the porosity, and the loss coefficient must be divided by the porosity squared.

- When applying a loss model on a porous domain, you may choose whether the coefficients multiply the true or superficial velocity.

For many applications, a certain resistance loss is desired in a specified direction, with flow inhibited in the transverse directions. This is the case when you want to model the effect of flow straightening devices such as honeycombs, porous plates, and turning vanes without modeling the details of the flow around the obstacles. For situations like this, CFX enables the independent specification of loss for the streamwise and transverse directions.

For both the streamwise and transverse directions, both types of the loss formulations available for the isotropic loss model are available. In many cases, however, the loss coefficients are known only for the streamwise direction, and you know only that the flow is inhibited in the transverse direction. When this occurs, you may select the Streamwise Coefficient Multiplier for the transverse loss model. In this case, the transverse coefficients are taken to be the specified factor times the streamwise coefficients. (If the streamwise loss includes a permeability, the implied transverse permeability is divided, not multiplied, by this factor). The transverse multiplier is typically taken to be about 10-100.

In some cases, you may want to inhibit only the transverse flow without having any streamwise loss. In this case, the Zero Loss option may be selected for the streamwise loss. Of course, if this is chosen, the Streamwise Coefficient Multiplier is not appropriate for the transverse loss, because it will result in zero transverse loss.

In all cases, the directional loss model requires the streamwise direction to be specified. It may be described in either Cartesian or Cylindrical coordinates.

##### 1.3.2.2.2. General Momentum Source

Momentum sources can be specified directly in terms of a force per unit volume in a specified direction. To obtain good convergence when the source is a function of velocity, the source should be linearized by including a Momentum Source Coefficient. In CFX, scalar coefficients may be specified as representative of the tensor:

| (1–21)

Typically, the scalar coefficient is chosen to be the maximum of the three principal components of this tensor.

The General Momentum Source option is useful for applications that are not covered by the isotropic loss model or the directional loss model. For example, the velocity in a region may be forced to be a specified value (Dirichlet velocity condition) by setting to a large number, for example, 105 kg m-3 s-1, for the following:

| (1–22)

and selecting as the Momentum Source Coefficient.

When setting a General Momentum Source, there are two optional parameters that may be set:

- Redistribute in Rhie Chow indicates whether S is included in the Rhie Chow redistribution algorithm (see Equation 11–32 in Pressure-Velocity Coupling in the CFX-Solver Theory Guide).

- Include Coefficient in Rhie Chow indicates whether C is included in the Rhie Chow coefficient (see Equation 11–29 in Pressure-Velocity Coupling in the CFX-Solver Theory Guide).

The defaults for both of these parameters are false, but there are cases when they should be activated. For example:

- When setting a momentum source to give a specified velocity (for example, when modeling solidification, a momentum source that scales with solid mass fraction can be used to force the solid to move at the belt velocity), Include Coefficient Rhie Chow should be set in order to ensure that the mass flows are consistent with the specified velocity.

- When the momentum source is meant to induce a pressure change (for example, a fan model), set both parameters to true to avoid pressure wiggles near the subdomain boundary.

###### 1.3.2.2.2.1. Postprocessing the Momentum Sources

If a momentum source has been applied, a new variable [<fluid>.]User Momentum Source.Bforce may be available in the results file. This variable represents the sum of:

1. Any momentum sources for the fluid defined using a Loss Model (Isotropic or Directional), plus

2. Any momentum sources for the fluid defined by a General Momentum Source for which the Redistribute in Rhie Chow check box is selected.

Momentum sources defined by a General Momentum Source where the Redistribute in Rhie Chow check box is not selected (the default) are not included in this variable.

##### 1.3.2.2.3. Immersed Solids Sources

The presence of an immersed solid in the flow field is modeled through a body force similar to the general momentum source.

The velocity in a fluid region that lies inside the immersed solid is then enforced to be the same as the velocity of the immersed solid through a body source given in Equation 1–22. The momentum source coefficient is calculated automatically inside the solver by taking account of advection and diffusion contributions from the mesh elements in the fluid region that lies inside the immersed solid. You can apply a scaling factor to the solver-calculated source coefficient to control how strongly the fluid velocity is forced to match the immersed solid velocity; this affects accuracy and robustness; for details, see Immersed Solid Control in the CFX-Pre User's Guide.

#### 1.3.2.3. Mass (Continuity) Sources

A source term to the continuity equation introduces additional fluid into the simulation. The amount of fluid introduced can be specified as `Fluid Mass Source` (on subdomains), `Fluid Mass Flux` (on boundaries), or `Total Fluid Mass Source`. A fluid mass source is the mass source per unit volume; therefore, the total mass of fluid introduced will depend on the volume of the subdomain in which the source term is applied. Similarly, a fluid mass flux is the mass source per unit area. A total fluid mass source is the total mass of fluid introduced.

Continuity sources differ from other equation sources in that they induce corresponding secondary source terms in all other equations. Therefore, in addition to specifying the mass source itself, the values of velocity, temperature, and so on, must also be specified. These values are used to compute the secondary source terms only when the mass source is positive and have a function similar to boundary condition values that are specified at an opening. In particular, for mass outflow (or negative continuity source) fluid is transported out of the domain with local values of temperature, velocity, turbulence quantities, and so on, while for mass inflow (or positive continuity source), fluid is transported into the domain with specified values. Depending on the simulation, the following variables must be set for the ‘inflow’ (positive mass source) case:

- Additional Variables

  If the parent domain includes Additional Variables that are solved using a transport equation, then you must set the level of the Additional Variable in the fluid that is introduced into the domain. Note that there is no corresponding secondary source term for equations with no advection term (such as diffusive and Poisson Additional Variables). Therefore, values for these variables need not be specified.

- Component Mass Fractions

  For fluids that are Variable Composition Mixtures, you must set the mass fraction values for the fluid that is introduced into the domain. The Constraint component will take a mass fraction such that the sum of the mass fractions is unity.

- Temperature

  You must set a temperature for a continuity source if heat transfer is modeled in the domain. The property recipes of the interior material will be used automatically when needed to convert temperature to enthalpy.

- Velocity

  You must set Cartesian Velocity Components for a continuity source to describe the direction in which the new fluid is moving.

- Eddy Dissipation and Turbulence Intensity

  You must set the turbulence quantities for a continuity source when the domain uses a turbulence model (that is, when `Laminar` is not specified).

You may provide expressions for the scalar variable values introduced with the mass source. An expression for a variable associated with the mass source may depend on other variables specified for the same fluid mass source, but care is required to avoid recursion.

If the continuity source is negative (a mass sink), the values you specify will be ignored by the solver, and local solution variables will be used instead (like at an outlet or the outflow portion of an opening). However, CFX-Pre still requires that you supply values for these variables. This is because it does not know (in general) whether the mass source will evaluate to a positive or negative number.

If the simulation involves multicomponent fluids or heat transfer, however, you may force the solver to use the specified values of mass fraction and temperature even if the mass source is negative. This is controlled by the MCF/Energy Sink Option setting on the Sources tab in CFX-Pre. The MCF/Energy Sink Option setting can be set to one of the following:

- `Local Mass Fractions and Temperature` - The local solution values are used for all variables.

- `Specified Mass Fractions and Local Temperature` - Specified mass fractions are used when the mass source is positive or negative. The enthalpy is evaluated using the specified mass fractions and temperature when the mass source is positive and the specified mass fractions and local temperature when the mass source is negative.

- `Specified Mass Fractions and Temperature` - Specified mass fractions are used when the mass source is positive or negative. The enthalpy is evaluated using the specified mass fractions and temperature when the mass source is positive or negative.

Additional information on theory is available in Mass (Continuity) Sources in the CFX-Solver Theory Guide.

##### 1.3.2.3.1. Mass (Continuity) Source Coefficients

Nonlinear continuity sources may need to be linearized to improve convergence behavior. For continuity sources that are dependent on pressure, convergence behavior can be improved by supplying a pressure coefficient such as Mass Flux Pressure Coefficient, Total Mass Source Pressure Coefficient or Mass Source Pressure Coefficient where the pressure coefficient is defined as:

| (1–23)

For example, in the instance where the continuity source is driven by the difference between the local fluid pressure and some external pressure outside the boundary:

| (1–24)

then the pressure coefficient is given by .

Similarly, for continuity sources that are dependent on volume fraction, convergence behavior can be improved by supplying a volume fraction coefficient such as Mass Flux Volume Fraction Coefficient, Total Mass Source Volume Fraction Coefficient or Mass Source Volume Fraction Coefficient, as appropriate.

#### 1.3.2.4. Bulk Sources

Bulk sources are available in multiphase flows. Information on the use of bulk sources is available in Bulk Sources.

#### 1.3.2.5. Solid Sources

Solid sources are available in a porous domain when there are physics (energy, Additional Variables) associated with the solid part of the porous domain.

Selecting the Multiply by Solid Fraction check box causes the equation source to be scaled by the solid fraction value . For example, if a porous domain has a volume porosity of 0.8 and the Multiply by Solid Fraction check box is selected, 20% of the source is applied to the solid; if the check box is not selected, then 100% of the source is applied to the solid.

#### 1.3.2.6. Radiation Sources

Information on radiation sources is available in Sources.

#### 1.3.2.7. Particle User Sources

Information on particle user sources is available in Particle User Sources.

Release 18.2 - © ANSYS, Inc. All rights reserved.