Source terms in governing equations describe generation or loss of a transported quantity inside the domain due to external effects or internal processes. In CFD, examples include gravity and buoyancy in momentum equations, chemical reactions in species transport, and volumetric heat sources in the energy equation. They differ from numerical discretization errors and can occur in steady or transient simulations.

Multiple Choice

What are source terms in the governing equations, and give examples in CFD?

Source terms are parts of the governing equations that describe generation or loss of the transported quantity inside the domain, independent of transport across boundaries. They add to or remove mass, momentum, energy, or species due to external effects or internal processes. In CFD, you’ll see gravity as a body force in the momentum equations, and buoyancy terms when density differences influence the flow. Chemical reactions contribute production or consumption terms in the species transport equations. Volumetric heat generation or absorption appears as source terms in the energy equation. Other examples include phase-change effects, radiation absorption, and other internal sources or sinks that alter the amount of a conserved quantity without being tied to fluxes across faces. Discretization errors are not source terms; they are numerical artifacts, and source terms can be present in both steady and transient simulations.

Source terms in CFD: what they are and why they matter

If you’ve ever peeked at the equations that describe fluid flow, heat transfer, or reacting mixtures, you’ve probably noticed there are terms for transport—advection, diffusion, convection, and so on. But beyond those transport mechanisms there’s another class that doesn’t come from movement across a boundary. These are the source terms: contributions to the governing equations that come from inside the domain itself. They represent generation or loss of a conserved quantity due to external effects or internal processes, independent of how the quantity crosses the domain boundaries.

Let me explain what that means in a practical, down-to-earth way. Imagine you’re tracking how much of a chemical species is present in a fluid inside a cavity. If the species just moves around and diffuses, you’d describe its evolution with a transport equation that has terms for advection and diffusion. But if there are chemical reactions happening inside the fluid, or if you’re heating the fluid from within (say, a heater in the wall or a laser depositing energy), the amount of that species—or the energy in the system—changes due to sources or sinks inside the domain. Those internal changes are captured by source terms.

A quick mental checklist: sources are about inside-the-domain generation or depletion, not the flow of stuff in or out across the boundaries. They can act on mass, momentum, energy, or species concentration, and they can appear in steady or transient simulations. The distinction matters, because source terms can fundamentally alter the behavior of the solution, sometimes in subtle ways (like buoyancy effects that kick in only when density differences matter) and sometimes in dramatic ways (like rapid chemical production in a reacting flow).

Common examples you’ll encounter in CFD

  1. Gravity and buoyancy
  • Gravity is the classic body force that nudges every parcel of fluid downward. In momentum equations, gravity appears as a body force term. In thermal flows, density variations with temperature pair with gravity to produce buoyancy forces (the Boussinesq approximation is a familiar way to handle this in many simulations). You don’t see gravity crossing a boundary; you feel it as an internal push that changes the momentum field.
  1. Volumetric heat sources and sinks
  • When heat is generated or absorbed inside the domain, you add a source term to the energy equation. Examples include electrical heating, resistive heating in electrical components, or radiative heat absorption that isn’t tied directly to a boundary heat flux. Conversely, internal cooling mechanisms—like heat sinks embedded in a solid—act as negative source terms, removing energy from the domain.
  1. Chemical reactions and species production/consumption
  • In reacting flows, chemical kinetics produce or consume species within the fluid. Each species can have its own source term describing production rate due to reactions, possibly coupled to temperature, pressure, and the concentrations of other species. This is a whole subfield in itself (reacting-flow modeling), because the reaction rates can be highly sensitive to conditions, and the interplay between transport and reactions can lead to rich, sometimes chaotic, dynamics.
  1. Phase changes and phase-change energy
  • If the problem involves melting, solidification, vaporization, or condensation, phase-change terms enter the governing equations. They represent latent heat effects and mass transfer between phases within the domain. Think of ice melting in water or water vapor condensing in a humid air region—the energy and mass budgets are adjusted inside the domain through these source-like terms.
  1. Radiation absorption or emission within the domain
  • In radiative heat transfer, portions of the domain might absorb or scatter radiation, effectively adding or removing energy locally. This internal exchange can be important in high-temperature systems, combustion chambers, or materials with strong emissivity properties. The effect shows up as a source term in the energy equation.
  1. Phase-specific production or sinks for species
  • In multiphase models, you might have source terms related to mass transfer between phases. For instance, dissolving a gas into a liquid or releasing vapor from a liquid can add or remove species mass inside the fluid region, independent of boundary fluxes.
  1. Internal generation or loss of momentum through sources
  • There are situations where momentum isn’t just transported but also generated or dissipated inside the domain. For example, a magnetohydrodynamic (MHD) setup might have Lorentz-force terms tied to current and magnetic fields that act as internal momentum sources or sinks. Similarly, drag or mechanical actuation within a porous medium can be represented as internal source terms in the momentum balance.
  1. Radiation-pressure, chemical, or biological sources (in specialized contexts)
  • Some CFD problems span beyond classic fluids and heat transfer. In atmospheric modeling, for instance, photochemical production of species or biological growth within a plume can be represented by source terms tied to local conditions. In aerospace or industrial contexts, radiation-driven chemistry or microphysical processes add complexity that’s handled via internal source terms.

Seeing source terms in the math (without getting lost in symbols)

If you squint at a conventional set of governing equations, you’ll notice a familiar pattern. For a conserved quantity q, the general form looks like:

partial_t q + divergence of flux(q) = sources(q)

  • The left-hand side contains time change and transport across space.

  • The right-hand side houses the source term(s), which can depend on local state variables like temperature, concentration, velocity, or phase indicators.

In fluid dynamics, you’ll often see:

  • Mass conservation: a source term might represent mass addition or removal inside the domain (think of gas generation from a chemical reaction).

  • Momentum conservation: body forces (gravity) show up as source-like terms in the momentum equations.

  • Energy conservation: internal heat generation or absorption adds a source term to the energy equation.

  • Species conservation: production or consumption rates from reactions appear as source terms in species transport equations.

A few practical notes to stay grounded

  • Not all simulations require explicit internal sources. If your problem has only boundary-driven fluxes and no internal generation or sinks, the source terms can be zero or simply ignored. But many real-world problems rely on them entirely, especially in reacting flows or heat-intensive devices.

  • Source terms can be constants, functions of space, or functions of the evolving state. In a reacting flow, reaction rates depend on temperature and concentrations; in a heat-generating device, the internal heat source might be uniformly distributed or localized to hotspots.

  • They aren’t the same as discretization errors. Source terms model real physics, while numerical artifacts come from how the equations are discretized on a grid. It’s important to distinguish them because a spurious source could indicate a bug or a mis-specified model, whereas a genuine source term reflects the physics you’re trying to capture.

  • They can be present in steady-state or transient simulations. Gravity doesn’t vanish in a steady state, and a reactor that maintains a constant heat source inside will still have internal energy production even if the macroscopic quantities settle into a steady pattern.

When to pause and question a source term

  • If your model suddenly behaves oddly, check whether a source term was added or omitted unintentionally. For instance, neglecting buoyancy in a natural-convection scenario can totally mask the flow pattern you expect.

  • If you’re modeling phase change, ensure the latent heat term is correctly implemented and that mass transfer between phases is accounted for consistently with energy balances.

  • If you’re validating a reacting-flow simulation, compare predicted species production rates against experimental data or established benchmarks. Reaction source terms are often the trickiest part to tune, because chemistry can be highly nonlinear and temperature-sensitive.

Connecting to real-world applications

Think about a compact heat exchanger or a combustion chamber. In a heat exchanger, volumetric heat generation within a small region of the solid or fluid can act as a source term in the energy equation, influencing temperature fields and, in turn, the flow due to buoyancy or density changes. In a combustion chamber, chemical reactions are the star players, injecting energy and changing species concentrations inside the domain. Gravity and buoyancy then feed back into the flow pattern, potentially driving complex convection cells that you’d miss if you treated the problem as a purely transport-only system.

Porous media, fans, and flows with phase change also hinge on source terms. In a packed bed reactor, heat generation inside catalyst pellets adds a local energy source term, while flow through the pores experiences momentum losses that can be framed as internal production or destruction terms in the momentum equations. It all ties back to the same idea: what’s happening inside the domain, not just at the borders, can reshape the entire solution.

A few practical tips for working with source terms in CFD

  • Start with the physics you want to capture. Do you need to model heat generation, chemical reactions, or phase change? Pin down the dominant processes first, then layer in additional sources as needed.

  • Use modular approaches. Many CFD tools let you define source terms as user-defined functions. Start with simple forms (constant, linear) to verify stability, then increase fidelity (temperature- or concentration-dependent rates) as you gain confidence.

  • Validate piece by piece. If you’re unsure about a source term, turn it off temporarily to see how the solution behaves. Turning specific sources on and off is a good way to isolate their influence.

  • Watch for coupling effects. Source terms don’t exist in isolation. A heat source alters temperature, which can change density, which then reshapes buoyancy forces. The chain can be long and nonlinear, so expect some surprises along the way.

  • Stay mindful of units and normalization. A mismatch in units for a source term can produce nonsensical results. Keep a careful eye on dimensional consistency across equations.

  • Don’t forget the boundary conditions. Source terms inside the domain interact with boundary fluxes. If you change internal generation, you might also need to revisit how the boundaries are treated to keep the problem physically meaningful.

A closing thought: sources as the inside story of a flow

Source terms are the inside story of what’s happening in a CFD problem. They capture the ways in which a system can generate or lose mass, energy, or momentum without leaning on what’s happening at the edges. They’re the backbone of modeling internal processes—gravity that stirs the motion, reactions that reshape the chemical makeup, heat that warms the heart of the domain, phase changes that whisper from liquid to vapor, and radiation that quietly alters the energy balance.

As you work with CFD tools—whether it’s a commercial solver like ANSYS Fluent, or an open-source option like OpenFOAM—you’ll encounter source terms in earnest. They’re not just a line item in the equations; they’re a lens for understanding how real-world phenomena breathe life into simulations. Get comfortable with them, and you’ll start to see why some flows behave the way they do, and how engineers harness those internal processes to design better devices, safer systems, and more efficient technologies.